From 9194219586f3d1eb320371187df82d34a86652a7 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Tue, 27 Apr 2021 14:33:40 +0200 Subject: [PATCH] Add XCM Origin and converter (#2896) * Add XCM Origin and converter * IsMajority filter can be location-prefixed * Update xcm/pallet-xcm/src/lib.rs Co-authored-by: Alexander Popiak * Update xcm/src/v0/multi_location.rs Co-authored-by: Alexander Popiak * Introduce UsingComponents to allow reuse of fee payment in XCM * Use Drop rather than finalize * Add errors for weight. * Apply suggestions from code review Co-authored-by: Alexander Popiak * Fixes * Update xcm/xcm-builder/src/weight.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Various XCM fixes and improvements * Fixes * Update xcm/xcm-builder/src/weight.rs Co-authored-by: Alexander Popiak * Update xcm/xcm-builder/src/weight.rs Co-authored-by: Alexander Popiak * Update xcm/xcm-builder/src/weight.rs Co-authored-by: Alexander Popiak * Fixes Co-authored-by: Alexander Popiak Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> --- polkadot/Cargo.lock | 353 +++++++++--------- polkadot/runtime/rococo/src/lib.rs | 11 +- polkadot/xcm/pallet-xcm/Cargo.toml | 1 + polkadot/xcm/pallet-xcm/src/lib.rs | 28 +- polkadot/xcm/src/v0/mod.rs | 11 +- polkadot/xcm/src/v0/multi_location.rs | 14 + polkadot/xcm/src/v0/traits.rs | 2 + polkadot/xcm/xcm-builder/Cargo.toml | 2 + polkadot/xcm/xcm-builder/src/lib.rs | 2 +- polkadot/xcm/xcm-builder/src/mock.rs | 2 +- polkadot/xcm/xcm-builder/src/weight.rs | 131 +++++-- polkadot/xcm/xcm-executor/src/lib.rs | 12 +- .../xcm/xcm-executor/src/traits/weight.rs | 6 +- 13 files changed, 357 insertions(+), 218 deletions(-) diff --git a/polkadot/Cargo.lock b/polkadot/Cargo.lock index a9e8c2918f..7af0910c08 100644 --- a/polkadot/Cargo.lock +++ b/polkadot/Cargo.lock @@ -456,7 +456,7 @@ checksum = "6736e2428df2ca2848d846c43e88745121a6654696e349ce0054a420815a7409" [[package]] name = "beefy-gadget" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget#2a804f5b19ac5b9a9c4d63a3faa3cd9cb1364542" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget#846e0ef3b929d8922ddadaaea8e664754fada39a" dependencies = [ "beefy-primitives", "futures 0.3.14", @@ -470,7 +470,6 @@ dependencies = [ "sc-network-gossip", "sp-api", "sp-application-crypto", - "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-core", @@ -484,7 +483,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget#2a804f5b19ac5b9a9c4d63a3faa3cd9cb1364542" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget#846e0ef3b929d8922ddadaaea8e664754fada39a" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -505,7 +504,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget#2a804f5b19ac5b9a9c4d63a3faa3cd9cb1364542" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget#846e0ef3b929d8922ddadaaea8e664754fada39a" dependencies = [ "parity-scale-codec", "sp-api", @@ -527,21 +526,26 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.57.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4865004a46a0aafb2a0a5eb19d3c9fc46ee5f063a6cfc605c69ac9ecf5263d" +checksum = "66c0bb6167449588ff70803f4127f0684f9063097eca5016f37eb52b92c2cf36" dependencies = [ "bitflags", "cexpr", + "cfg-if 0.1.10", "clang-sys", + "clap", + "env_logger 0.7.1", "lazy_static", "lazycell", + "log", "peeking_take_while", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", + "which 3.1.1", ] [[package]] @@ -1001,13 +1005,13 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.2.0" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c" +checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a" dependencies = [ "glob", "libc", - "libloading 0.7.0", + "libloading", ] [[package]] @@ -1857,7 +1861,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", ] @@ -1875,7 +1879,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "3.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -1894,7 +1898,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "Inflector", "chrono", @@ -1917,7 +1921,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -1930,7 +1934,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -1945,7 +1949,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "serde", @@ -1956,7 +1960,7 @@ dependencies = [ [[package]] name = "frame-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "bitflags", "frame-metadata", @@ -1982,7 +1986,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1994,7 +1998,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -2006,7 +2010,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "proc-macro2", "quote", @@ -2016,7 +2020,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-metadata", "frame-support", @@ -2037,7 +2041,7 @@ dependencies = [ [[package]] name = "frame-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -2054,7 +2058,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -2068,7 +2072,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "sp-api", @@ -2077,7 +2081,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "parity-scale-codec", @@ -2100,7 +2104,7 @@ checksum = "03d47dad3685eceed8488986cad3d5027165ea5edb164331770e2059555f10a5" dependencies = [ "lazy_static", "libc", - "libloading 0.5.2", + "libloading", "winapi 0.3.9", ] @@ -3358,16 +3362,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "libloading" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" -dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.9", -] - [[package]] name = "libm" version = "0.2.1" @@ -3810,9 +3804,9 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "6.17.3" +version = "6.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da125e1c0f22c7cae785982115523a0738728498547f415c9054cb17c7e89f9" +checksum = "eb5b56f651c204634b936be2f92dbb42c36867e00ff7fe2405591f3b9fa66f09" dependencies = [ "bindgen", "cc", @@ -4466,7 +4460,7 @@ checksum = "13370dae44474229701bb69b90b4f4dca6404cb0357a2d50d635f1171dc3aa7b" [[package]] name = "pallet-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -4481,7 +4475,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -4496,7 +4490,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4519,7 +4513,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4533,7 +4527,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget#2a804f5b19ac5b9a9c4d63a3faa3cd9cb1364542" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget#846e0ef3b929d8922ddadaaea8e664754fada39a" dependencies = [ "beefy-primitives", "frame-support", @@ -4548,7 +4542,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4562,7 +4556,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4578,7 +4572,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4593,7 +4587,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4613,7 +4607,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4630,7 +4624,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4651,7 +4645,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4666,7 +4660,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4685,7 +4679,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4701,7 +4695,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4716,7 +4710,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -4733,7 +4727,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -4749,7 +4743,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4767,7 +4761,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4782,7 +4776,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -4795,7 +4789,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -4811,7 +4805,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4833,7 +4827,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4848,7 +4842,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -4861,7 +4855,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "enumflags2", "frame-support", @@ -4875,7 +4869,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4890,7 +4884,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -4909,7 +4903,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -4925,7 +4919,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -4938,7 +4932,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4962,7 +4956,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -4973,7 +4967,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -4986,7 +4980,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -5004,7 +4998,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -5019,7 +5013,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-support", "frame-system", @@ -5035,7 +5029,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5052,7 +5046,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5063,7 +5057,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -5079,7 +5073,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-benchmarking", "frame-support", @@ -5094,7 +5088,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5116,6 +5110,7 @@ dependencies = [ "sp-runtime", "sp-std", "xcm", + "xcm-executor", ] [[package]] @@ -6919,7 +6914,7 @@ dependencies = [ "prost", "prost-types", "tempfile", - "which", + "which 4.0.2", ] [[package]] @@ -7305,7 +7300,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "env_logger 0.8.2", "hex-literal", @@ -7590,7 +7585,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-trait", "derive_more", @@ -7619,7 +7614,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "futures 0.3.14", "futures-timer 3.0.2", @@ -7642,7 +7637,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7658,7 +7653,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7679,7 +7674,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -7690,7 +7685,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "chrono", "fdlimit", @@ -7728,7 +7723,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "derive_more", "fnv", @@ -7762,7 +7757,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "blake2-rfc", "hash-db", @@ -7792,7 +7787,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parking_lot 0.11.1", "sc-client-api", @@ -7804,7 +7799,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-trait", "derive_more", @@ -7851,7 +7846,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "derive_more", "futures 0.3.14", @@ -7875,7 +7870,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7888,7 +7883,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-trait", "futures 0.3.14", @@ -7915,7 +7910,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "log", "sc-client-api", @@ -7929,7 +7924,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "derive_more", "lazy_static", @@ -7959,7 +7954,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "derive_more", "parity-scale-codec", @@ -7976,7 +7971,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "log", "parity-scale-codec", @@ -7991,7 +7986,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "log", "parity-scale-codec", @@ -8009,7 +8004,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-trait", "derive_more", @@ -8049,7 +8044,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "derive_more", "finality-grandpa", @@ -8073,7 +8068,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-warp-sync" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "derive_more", "futures 0.3.14", @@ -8094,7 +8089,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "ansi_term 0.12.1", "futures 0.3.14", @@ -8112,7 +8107,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-trait", "derive_more", @@ -8132,7 +8127,7 @@ dependencies = [ [[package]] name = "sc-light" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "hash-db", "lazy_static", @@ -8151,7 +8146,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-std", "async-trait", @@ -8204,7 +8199,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "futures 0.3.14", "futures-timer 3.0.2", @@ -8221,7 +8216,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "bytes 0.5.6", "fnv", @@ -8249,7 +8244,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "futures 0.3.14", "libp2p", @@ -8262,7 +8257,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8271,7 +8266,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "futures 0.3.14", "hash-db", @@ -8305,7 +8300,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "derive_more", "futures 0.3.14", @@ -8329,7 +8324,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "futures 0.1.29", "jsonrpc-core", @@ -8347,7 +8342,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-trait", "directories", @@ -8411,7 +8406,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "log", "parity-scale-codec", @@ -8426,7 +8421,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -8446,7 +8441,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "chrono", "futures 0.3.14", @@ -8466,7 +8461,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "ansi_term 0.12.1", "atty", @@ -8493,7 +8488,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8504,7 +8499,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "derive_more", "futures 0.3.14", @@ -8526,7 +8521,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "futures 0.3.14", "futures-diagnose", @@ -8948,7 +8943,7 @@ dependencies = [ [[package]] name = "sp-allocator" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "log", "sp-core", @@ -8960,7 +8955,7 @@ dependencies = [ [[package]] name = "sp-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "hash-db", "log", @@ -8977,7 +8972,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -8989,7 +8984,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "serde", @@ -9001,7 +8996,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "integer-sqrt", "num-traits", @@ -9015,7 +9010,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "sp-api", @@ -9027,7 +9022,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -9038,7 +9033,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "sp-api", @@ -9050,7 +9045,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "futures 0.3.14", "log", @@ -9068,7 +9063,7 @@ dependencies = [ [[package]] name = "sp-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "serde", "serde_json", @@ -9077,7 +9072,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-trait", "futures 0.3.14", @@ -9104,7 +9099,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "merlin", "parity-scale-codec", @@ -9125,7 +9120,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -9135,7 +9130,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -9147,7 +9142,7 @@ dependencies = [ [[package]] name = "sp-core" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "base58", "blake2-rfc", @@ -9191,7 +9186,7 @@ dependencies = [ [[package]] name = "sp-database" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -9200,7 +9195,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "proc-macro2", "quote", @@ -9210,7 +9205,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "environmental", "parity-scale-codec", @@ -9221,7 +9216,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "finality-grandpa", "log", @@ -9238,7 +9233,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", @@ -9250,7 +9245,7 @@ dependencies = [ [[package]] name = "sp-io" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "futures 0.3.14", "hash-db", @@ -9274,7 +9269,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "lazy_static", "sp-core", @@ -9285,7 +9280,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-trait", "derive_more", @@ -9302,7 +9297,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "ruzstd", "zstd", @@ -9311,7 +9306,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "serde", @@ -9324,7 +9319,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -9335,7 +9330,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "sp-api", "sp-core", @@ -9345,7 +9340,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "backtrace", ] @@ -9353,7 +9348,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "serde", "sp-core", @@ -9362,7 +9357,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "either", "hash256-std-hasher", @@ -9383,7 +9378,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9400,7 +9395,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -9412,7 +9407,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "serde", "serde_json", @@ -9421,7 +9416,7 @@ dependencies = [ [[package]] name = "sp-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "sp-api", @@ -9434,7 +9429,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -9444,7 +9439,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "hash-db", "log", @@ -9466,12 +9461,12 @@ dependencies = [ [[package]] name = "sp-std" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" [[package]] name = "sp-storage" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9484,7 +9479,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "log", "sp-core", @@ -9497,7 +9492,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "parity-scale-codec", "sp-api", @@ -9510,7 +9505,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "log", "parity-scale-codec", @@ -9523,7 +9518,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "derive_more", "futures 0.3.14", @@ -9539,7 +9534,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "hash-db", "memory-db", @@ -9553,7 +9548,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "futures 0.3.14", "futures-core", @@ -9565,7 +9560,7 @@ dependencies = [ [[package]] name = "sp-version" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9577,7 +9572,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9734,7 +9729,7 @@ dependencies = [ [[package]] name = "substrate-browser-utils" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "chrono", "console_error_panic_hook", @@ -9760,7 +9755,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "platforms", ] @@ -9768,7 +9763,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.14", @@ -9791,7 +9786,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-std", "derive_more", @@ -9805,7 +9800,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "async-trait", "futures 0.1.29", @@ -9834,7 +9829,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "futures 0.3.14", "substrate-test-utils-derive", @@ -9844,7 +9839,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "proc-macro-crate 1.0.0", "quote", @@ -10586,7 +10581,7 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "try-runtime-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#4cbeeca68750d40c8899a3a0fb6058886034862d" +source = "git+https://github.com/paritytech/substrate?branch=master#926c1ec0a6739b035f5211f8fd664d17612a4127" dependencies = [ "frame-try-runtime", "log", @@ -10626,7 +10621,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59" dependencies = [ "cfg-if 0.1.10", - "rand 0.3.23", + "rand 0.7.3", "static_assertions", ] @@ -11328,6 +11323,15 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "which" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +dependencies = [ + "libc", +] + [[package]] name = "which" version = "4.0.2" @@ -11450,6 +11454,7 @@ dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", + "pallet-transaction-payment", "parity-scale-codec", "polkadot-parachain", "sp-arithmetic", diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 2ef95f3820..45e485f9d6 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -92,7 +92,7 @@ use xcm_builder::{ AccountId32Aliases, ChildParachainConvertsVia, SovereignSignedViaLocation, CurrencyAdapter as XcmCurrencyAdapter, ChildParachainAsNative, SignedAccountId32AsNative, ChildSystemParachainAsSuperuser, LocationInverter, IsConcrete, FixedWeightBounds, - FixedRateOfConcreteFungible, BackingToPlurality, SignedToAccountId32 + BackingToPlurality, SignedToAccountId32, UsingComponents, }; use constants::{time::*, currency::*, fee::*, size::*}; use frame_support::traits::InstanceFilter; @@ -110,7 +110,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("rococo"), impl_name: create_runtime_str!("parity-rococo-v1.5"), authoring_version: 0, - spec_version: 231, + spec_version: 232, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, @@ -646,7 +646,7 @@ impl xcm_executor::Config for XcmConfig { type LocationInverter = LocationInverter; type Barrier = Barrier; type Weigher = FixedWeightBounds; - type Trader = FixedRateOfConcreteFungible; + type Trader = UsingComponents>; type ResponseHandler = (); } @@ -657,7 +657,8 @@ parameter_types! { /// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior location /// of this chain. pub type LocalOriginToLocation = ( - // We allow an origin from the Collective pallet to be used in XCM as a corresponding Plurality + // We allow an origin from the Collective pallet to be used in XCM as a corresponding Plurality of the + // `Unit` body. BackingToPlurality, CollectiveBodyId>, // And a usual Signed origin to be used in XCM as a corresponding AccountId32 SignedToAccountId32, @@ -881,8 +882,8 @@ impl pallet_collective::Config for Runtime { type Event = Event; type MotionDuration = MotionDuration; type MaxProposals = MaxProposals; - type MaxMembers = MaxMembers; type DefaultVote = pallet_collective::PrimeDefaultVote; + type MaxMembers = MaxMembers; type WeightInfo = (); } diff --git a/polkadot/xcm/pallet-xcm/Cargo.toml b/polkadot/xcm/pallet-xcm/Cargo.toml index c0448c312c..75d737ed69 100644 --- a/polkadot/xcm/pallet-xcm/Cargo.toml +++ b/polkadot/xcm/pallet-xcm/Cargo.toml @@ -14,6 +14,7 @@ frame-support = { git = "https://github.com/paritytech/substrate", default-featu frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } xcm = { path = "..", default-features = false } +xcm-executor = { path = "../xcm-executor", default-features = false } [features] default = ["std"] diff --git a/polkadot/xcm/pallet-xcm/src/lib.rs b/polkadot/xcm/pallet-xcm/src/lib.rs index 17035f98f7..148c90ddc3 100644 --- a/polkadot/xcm/pallet-xcm/src/lib.rs +++ b/polkadot/xcm/pallet-xcm/src/lib.rs @@ -20,7 +20,8 @@ use sp_std::{marker::PhantomData, convert::TryInto, boxed::Box}; use codec::{Encode, Decode}; -use xcm::v0::{BodyId, MultiLocation::{self, X1}, Junction::Plurality}; +use xcm::v0::{BodyId, OriginKind, MultiLocation, Junction::Plurality}; +use xcm_executor::traits::ConvertOrigin; use sp_runtime::{RuntimeDebug, traits::BadOrigin}; use frame_support::traits::{EnsureOrigin, OriginTrait, Filter, Get}; @@ -62,6 +63,7 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { Attempted(xcm::v0::Outcome), + Sent(MultiLocation, MultiLocation, Xcm<()>), } #[pallet::error] @@ -78,11 +80,12 @@ pub mod pallet { #[pallet::weight(1_000)] fn send(origin: OriginFor, dest: MultiLocation, message: Xcm<()>) -> DispatchResult { let origin_location = T::SendXcmOrigin::ensure_origin(origin)?; - Self::send_xcm(origin_location, dest, message) + Self::send_xcm(origin_location.clone(), dest.clone(), message.clone()) .map_err(|e| match e { XcmError::CannotReachDestination(..) => Error::::Unreachable, _ => Error::::SendFailure, })?; + Self::deposit_event(Event::Sent(origin_location, dest, message)); Ok(()) } @@ -149,10 +152,11 @@ pub fn ensure_xcm(o: OuterOrigin) -> Result(PhantomData); -impl> Filter for IsMajorityOfBody { +pub struct IsMajorityOfBody(PhantomData<(Prefix, Body)>); +impl, Body: Get> Filter for IsMajorityOfBody { fn filter(l: &MultiLocation) -> bool { - matches!(l, X1(Plurality { id, part }) if id == &Body::get() && part.is_majority()) + let maybe_suffix = l.match_and_split(&Prefix::get()); + matches!(maybe_suffix, Some(Plurality { id, part }) if id == &Body::get() && part.is_majority()) } } @@ -180,3 +184,17 @@ impl, F: Filter> EnsureOrigin fo O::from(Origin::Xcm(MultiLocation::Null)) } } + +/// A simple passthrough where we reuse the `MultiLocation`-typed XCM origin as the inner value of +/// this crate's `Origin::Xcm` value. +pub struct XcmPassthrough(PhantomData); +impl< + Origin: From, +> ConvertOrigin for XcmPassthrough { + fn convert_origin(origin: MultiLocation, kind: OriginKind) -> Result { + match (kind, origin) { + (OriginKind::Xcm, l) => Ok(crate::Origin::Xcm(l).into()), + (_, origin) => Err(origin), + } + } +} diff --git a/polkadot/xcm/src/v0/mod.rs b/polkadot/xcm/src/v0/mod.rs index 47a16e336f..b13d3a95af 100644 --- a/polkadot/xcm/src/v0/mod.rs +++ b/polkadot/xcm/src/v0/mod.rs @@ -39,8 +39,10 @@ pub use traits::{Error, Result, SendXcm, ExecuteXcm, Outcome}; /// Basically just the XCM (more general) version of `ParachainDispatchOrigin`. #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, Debug)] pub enum OriginKind { - /// Origin should just be the native origin for the sender. For Cumulus/Frame chains this is - /// the `Parachain` origin. + /// Origin should just be the native dispatch origin representation for the sender in the + /// local runtime framework. For Cumulus/Frame chains this is the `Parachain` or `Relay` origin + /// if coming from a chain, though there may be others if the `MultiLocation` XCM origin has a + /// primary/native dispatch origin form. Native, /// Origin should just be the standard account-based origin with the sovereign account of @@ -50,6 +52,11 @@ pub enum OriginKind { /// Origin should be the super-user. For Cumulus/Frame chains, this is the `Root` origin. /// This will not usually be an available option. Superuser, + + /// Origin should be interpreted as an XCM native origin and the `MultiLocation` should be + /// encoded directly in the dispatch origin unchanged. For Cumulus/Frame chains, this will be + /// the `pallet_xcm::Origin::Xcm` type. + Xcm, } /// Response data to a query. diff --git a/polkadot/xcm/src/v0/multi_location.rs b/polkadot/xcm/src/v0/multi_location.rs index 2dd448c745..5226c67cc7 100644 --- a/polkadot/xcm/src/v0/multi_location.rs +++ b/polkadot/xcm/src/v0/multi_location.rs @@ -442,6 +442,20 @@ impl MultiLocation { MultiLocationReverseIterator(self) } + /// Ensures that self begins with `prefix` and that it has a single `Junction` item following. If + /// so, returns a reference to this `Junction` item. + pub fn match_and_split(&self, prefix: &MultiLocation) -> Option<&Junction> { + if prefix.len() + 1 != self.len() { + return None + } + for i in 0..prefix.len() { + if prefix.at(i) != self.at(i) { + return None + } + } + return self.at(prefix.len()) + } + /// Mutates `self`, suffixing it with `new`. Returns `Err` in case of overflow. pub fn push(&mut self, new: Junction) -> result::Result<(), ()> { let mut n = MultiLocation::Null; diff --git a/polkadot/xcm/src/v0/traits.rs b/polkadot/xcm/src/v0/traits.rs index 938f5ddd19..e863433d85 100644 --- a/polkadot/xcm/src/v0/traits.rs +++ b/polkadot/xcm/src/v0/traits.rs @@ -72,6 +72,8 @@ pub enum Error { NotWithdrawable, /// Indicates that the consensus system cannot deposit an asset under the ownership of a particular location. LocationCannotHold, + /// The assets given to purchase weight is are insufficient for the weight desired. + TooExpensive, } impl From<()> for Error { diff --git a/polkadot/xcm/xcm-builder/Cargo.toml b/polkadot/xcm/xcm-builder/Cargo.toml index 3f6f0a451e..1f52f27a6a 100644 --- a/polkadot/xcm/xcm-builder/Cargo.toml +++ b/polkadot/xcm/xcm-builder/Cargo.toml @@ -16,6 +16,7 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", de sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } # Polkadot dependencies polkadot-parachain = { path = "../../parachain", default-features = false } @@ -33,4 +34,5 @@ std = [ "sp-runtime/std", "frame-support/std", "polkadot-parachain/std", + "pallet-transaction-payment/std", ] diff --git a/polkadot/xcm/xcm-builder/src/lib.rs b/polkadot/xcm/xcm-builder/src/lib.rs index 4dc63aff79..aeb981c192 100644 --- a/polkadot/xcm/xcm-builder/src/lib.rs +++ b/polkadot/xcm/xcm-builder/src/lib.rs @@ -46,7 +46,7 @@ mod fungibles_adapter; pub use fungibles_adapter::FungiblesAdapter; mod weight; -pub use weight::{FixedRateOfConcreteFungible, FixedWeightBounds}; +pub use weight::{FixedRateOfConcreteFungible, FixedWeightBounds, UsingComponents}; mod matches_fungible; pub use matches_fungible::{IsAbstract, IsConcrete}; diff --git a/polkadot/xcm/xcm-builder/src/mock.rs b/polkadot/xcm/xcm-builder/src/mock.rs index 599fdbfcd2..fe4c9b230b 100644 --- a/polkadot/xcm/xcm-builder/src/mock.rs +++ b/polkadot/xcm/xcm-builder/src/mock.rs @@ -272,6 +272,6 @@ impl Config for TestConfig { type LocationInverter = LocationInverter; type Barrier = TestBarrier; type Weigher = FixedWeightBounds; - type Trader = FixedRateOfConcreteFungible; + type Trader = FixedRateOfConcreteFungible; type ResponseHandler = TestResponseHandler; } diff --git a/polkadot/xcm/xcm-builder/src/weight.rs b/polkadot/xcm/xcm-builder/src/weight.rs index 53044b0089..f855d23a40 100644 --- a/polkadot/xcm/xcm-builder/src/weight.rs +++ b/polkadot/xcm/xcm-builder/src/weight.rs @@ -14,19 +14,22 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use sp_std::{result::Result, marker::PhantomData}; +use sp_std::{result::Result, marker::PhantomData, convert::TryInto}; use parity_scale_codec::Decode; -use xcm::v0::{Xcm, Order, MultiAsset, MultiLocation}; -use frame_support::{traits::Get, weights::{Weight, GetDispatchInfo}}; +use xcm::v0::{Xcm, Order, MultiAsset, MultiLocation, Error}; +use sp_runtime::traits::{Zero, Saturating, SaturatedConversion}; +use frame_support::traits::{Get, OnUnbalanced as OnUnbalancedT, tokens::currency::Currency as CurrencyT}; +use frame_support::weights::{Weight, GetDispatchInfo, WeightToFeePolynomial}; use xcm_executor::{Assets, traits::{WeightBounds, WeightTrader}}; pub struct FixedWeightBounds(PhantomData<(T, C)>); impl, C: Decode + GetDispatchInfo> WeightBounds for FixedWeightBounds { fn shallow(message: &mut Xcm) -> Result { - let min = match message { + Ok(match message { Xcm::Transact { call, .. } => { call.ensure_decoded()?.get_dispatch_info().weight + T::get() } + Xcm::RelayedFrom { ref mut message, .. } => T::get() + Self::shallow(message.as_mut())?, Xcm::WithdrawAsset { effects, .. } | Xcm::ReserveAssetDeposit { effects, .. } | Xcm::TeleportAsset { effects, .. } => { @@ -45,16 +48,16 @@ impl, C: Decode + GetDispatchInfo> WeightBounds for FixedWeigh T::get() + inner } _ => T::get(), - }; - Ok(min) + }) } fn deep(message: &mut Xcm) -> Result { - let mut extra = 0; - match message { - Xcm::Transact { .. } => {} + Ok(match message { + Xcm::RelayedFrom { ref mut message, .. } => Self::deep(message.as_mut())?, Xcm::WithdrawAsset { effects, .. } | Xcm::ReserveAssetDeposit { effects, .. } - | Xcm::TeleportAsset { effects, .. } => { + | Xcm::TeleportAsset { effects, .. } + => { + let mut extra = 0; for effect in effects.iter_mut() { match effect { Order::BuyExecution { xcm, .. } => { @@ -65,34 +68,116 @@ impl, C: Decode + GetDispatchInfo> WeightBounds for FixedWeigh _ => {} } } - } - _ => {} - }; - Ok(extra) + extra + }, + _ => 0, + }) } } +/// Function trait for handling some revenue. Similar to a negative imbalance (credit) handler, but for a +/// `MultiAsset`. Sensible implementations will deposit the asset in some known treasury or block-author account. +pub trait TakeRevenue { + /// Do something with the given `revenue`, which is a single non-wildcard `MultiAsset`. + fn take_revenue(revenue: MultiAsset); +} + +/// Null implementation just burns the revenue. +impl TakeRevenue for () { + fn take_revenue(_revenue: MultiAsset) {} +} + /// Simple fee calculator that requires payment in a single concrete fungible at a fixed rate. /// /// The constant `Get` type parameter should be the concrete fungible ID and the amount of it required for /// one second of weight. -pub struct FixedRateOfConcreteFungible(Weight, PhantomData); -impl> WeightTrader for FixedRateOfConcreteFungible { - fn new() -> Self { Self(0, PhantomData) } - fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result { +pub struct FixedRateOfConcreteFungible< + T: Get<(MultiLocation, u128)>, + R: TakeRevenue, +>(Weight, u128, PhantomData<(T, R)>); +impl, R: TakeRevenue> WeightTrader for FixedRateOfConcreteFungible { + fn new() -> Self { Self(0, 0, PhantomData) } + + fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result { let (id, units_per_second) = T::get(); - let amount = units_per_second * (weight as u128) / 1_000_000_000_000u128; + use frame_support::weights::constants::WEIGHT_PER_SECOND; + let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND as u128); let required = MultiAsset::ConcreteFungible { amount, id }; - let (used, _) = payment.less(required).map_err(|_| ())?; + let (unused, _) = payment.less(required).map_err(|_| Error::TooExpensive)?; self.0 = self.0.saturating_add(weight); - Ok(used) + self.1 = self.1.saturating_add(amount); + Ok(unused) } + fn refund_weight(&mut self, weight: Weight) -> MultiAsset { - let weight = weight.min(self.0); - self.0 -= weight; let (id, units_per_second) = T::get(); + let weight = weight.min(self.0); let amount = units_per_second * (weight as u128) / 1_000_000_000_000u128; + self.0 -= weight; + self.1 = self.1.saturating_sub(amount); let result = MultiAsset::ConcreteFungible { amount, id }; result } } + +impl, R: TakeRevenue> Drop for FixedRateOfConcreteFungible { + fn drop(&mut self) { + let revenue = MultiAsset::ConcreteFungible { amount: self.1, id: T::get().0 }; + R::take_revenue(revenue); + } +} + +/// Weight trader which uses the TransactionPayment pallet to set the right price for weight and then +/// places any weight bought into the right account. +pub struct UsingComponents< + WeightToFee: WeightToFeePolynomial, + AssetId: Get, + AccountId, + Currency: CurrencyT, + OnUnbalanced: OnUnbalancedT, +>(Weight, Currency::Balance, PhantomData<(WeightToFee, AssetId, AccountId, Currency, OnUnbalanced)>); +impl< + WeightToFee: WeightToFeePolynomial, + AssetId: Get, + AccountId, + Currency: CurrencyT, + OnUnbalanced: OnUnbalancedT, +> WeightTrader for UsingComponents { + fn new() -> Self { Self(0, Zero::zero(), PhantomData) } + + fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result { + let amount = WeightToFee::calc(&weight); + let required = MultiAsset::ConcreteFungible { + amount: amount.try_into().map_err(|_| Error::Overflow)?, + id: AssetId::get(), + }; + let (unused, _) = payment.less(required).map_err(|_| Error::TooExpensive)?; + self.0 = self.0.saturating_add(weight); + self.1 = self.1.saturating_add(amount); + Ok(unused) + } + + fn refund_weight(&mut self, weight: Weight) -> MultiAsset { + let weight = weight.min(self.0); + let amount = WeightToFee::calc(&weight); + self.0 -= weight; + self.1 = self.1.saturating_sub(amount); + let result = MultiAsset::ConcreteFungible { + amount: amount.saturated_into(), + id: AssetId::get(), + }; + result + } + +} +impl< + WeightToFee: WeightToFeePolynomial, + AssetId: Get, + AccountId, + Currency: CurrencyT, + OnUnbalanced: OnUnbalancedT, +> Drop for UsingComponents { + fn drop(&mut self) { + OnUnbalanced::on_unbalanced(Currency::issue(self.1)); + } +} diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index 5c51341543..96cdc47a29 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -60,7 +60,9 @@ impl ExecuteXcm for XcmExecutor { return Outcome::Error(XcmError::WeightLimitReached); } let mut trader = Config::Trader::new(); - match Self::do_execute_xcm(origin, true, message, &mut 0, Some(shallow_weight), &mut trader) { + let result = Self::do_execute_xcm(origin, true, message, &mut 0, Some(shallow_weight), &mut trader); + drop(trader); + match result { Ok(surplus) => Outcome::Complete(maximum_weight.saturating_sub(surplus)), // TODO: #2841 #REALWEIGHT We can do better than returning `maximum_weight` here, and we should otherwise // we'll needlessly be disregarding block execution time. @@ -76,7 +78,9 @@ impl XcmExecutor { assets.into_assets_iter().collect::>() } - /// Execute the XCM and return any unexpected and unknowable surplus weight. + /// Execute the XCM and return the portion of weight of `shallow_weight + deep_weight` that `message` did not use. + /// + /// NOTE: The amount returned must be less than `shallow_weight + deep_weight` of `message`. fn do_execute_xcm( origin: MultiLocation, top_level: bool, @@ -95,8 +99,8 @@ impl XcmExecutor { .map_err(|()| XcmError::Barrier)?; // The surplus weight, defined as the amount by which `shallow_weight` plus all nested - // `shallow_weight` values (ensuring no double-counting) is an overestimate of the actual weight - // consumed. + // `shallow_weight` values (ensuring no double-counting and also known as `deep_weight`) is an + // over-estimate of the actual weight consumed. let mut total_surplus: Weight = 0; let maybe_holding_effects = match (origin.clone(), message) { diff --git a/polkadot/xcm/xcm-executor/src/traits/weight.rs b/polkadot/xcm/xcm-executor/src/traits/weight.rs index b28ef85a30..1d6d5eeec4 100644 --- a/polkadot/xcm/xcm-executor/src/traits/weight.rs +++ b/polkadot/xcm/xcm-executor/src/traits/weight.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use sp_std::result::Result; -use xcm::v0::{Xcm, MultiAsset}; +use xcm::v0::{Xcm, MultiAsset, Error}; use frame_support::weights::Weight; use crate::Assets; @@ -46,14 +46,14 @@ pub trait WeightBounds { } /// Charge for weight in order to execute XCM. -pub trait WeightTrader { +pub trait WeightTrader: Sized { /// Create a new trader instance. fn new() -> Self; /// Purchase execution weight credit in return for up to a given `fee`. If less of the fee is required /// then the surplus is returned. If the `fee` cannot be used to pay for the `weight`, then an error is /// returned. - fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result; + fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result; /// Attempt a refund of `weight` into some asset. The caller does not guarantee that the weight was /// purchased using `buy_weight`.