diff --git a/cumulus/Cargo.lock b/cumulus/Cargo.lock index 80c659a30c..195c1ff58e 100644 --- a/cumulus/Cargo.lock +++ b/cumulus/Cargo.lock @@ -453,7 +453,7 @@ checksum = "6736e2428df2ca2848d846c43e88745121a6654696e349ce0054a420815a7409" [[package]] name = "beefy-gadget" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#ad64f84dc7e2929eee0b821dc41d9a1ef93ab10b" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#5726a43094cad395d6e253bbc8b93ff7e54f2453" dependencies = [ "beefy-primitives", "futures 0.3.14", @@ -481,7 +481,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#ad64f84dc7e2929eee0b821dc41d9a1ef93ab10b" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#5726a43094cad395d6e253bbc8b93ff7e54f2453" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -502,7 +502,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#ad64f84dc7e2929eee0b821dc41d9a1ef93ab10b" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#5726a43094cad395d6e253bbc8b93ff7e54f2453" dependencies = [ "parity-scale-codec", "sp-api", @@ -1402,6 +1402,26 @@ dependencies = [ "tracing", ] +[[package]] +name = "cumulus-pallet-dmp-queue" +version = "0.1.0" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "rand 0.8.3", + "rand_chacha 0.3.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", + "xcm", + "xcm-executor", +] + [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" @@ -1543,9 +1563,9 @@ dependencies = [ name = "cumulus-shell-runtime" version = "0.1.0" dependencies = [ + "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-executive", @@ -1609,6 +1629,7 @@ dependencies = [ name = "cumulus-test-parachain-runtime" version = "0.1.0" dependencies = [ + "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", @@ -2296,7 +2317,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", ] @@ -2314,7 +2335,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "3.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -2333,7 +2354,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "Inflector", "chrono", @@ -2356,7 +2377,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -2369,7 +2390,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -2384,7 +2405,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "serde", @@ -2395,7 +2416,7 @@ dependencies = [ [[package]] name = "frame-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "bitflags", "frame-metadata", @@ -2421,7 +2442,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2433,7 +2454,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -2445,7 +2466,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "proc-macro2 1.0.26", "quote 1.0.9", @@ -2455,7 +2476,7 @@ dependencies = [ [[package]] name = "frame-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -2472,7 +2493,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "sp-api", @@ -2481,7 +2502,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "parity-scale-codec", @@ -3564,8 +3585,8 @@ dependencies = [ [[package]] name = "kusama-runtime" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "beefy-primitives", "bitvec", @@ -4414,7 +4435,7 @@ dependencies = [ [[package]] name = "metered-channel" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "derive_more 0.99.11", "futures 0.3.14", @@ -4829,7 +4850,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -4844,7 +4865,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -4859,7 +4880,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-benchmarking", "frame-support", @@ -4882,7 +4903,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-benchmarking", "frame-support", @@ -4896,7 +4917,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "0.1.0" -source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#ad64f84dc7e2929eee0b821dc41d9a1ef93ab10b" +source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#5726a43094cad395d6e253bbc8b93ff7e54f2453" dependencies = [ "beefy-primitives", "frame-support", @@ -4911,7 +4932,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -4924,7 +4945,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -4939,7 +4960,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-benchmarking", "frame-support", @@ -4954,7 +4975,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-election-provider-support", "frame-support", @@ -4972,7 +4993,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -4988,7 +5009,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-benchmarking", "frame-support", @@ -5009,7 +5030,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5024,7 +5045,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5042,7 +5063,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5057,7 +5078,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-benchmarking", "frame-support", @@ -5072,7 +5093,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5089,7 +5110,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5105,7 +5126,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5123,7 +5144,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5137,7 +5158,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5150,7 +5171,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5166,7 +5187,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5180,7 +5201,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5193,7 +5214,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "enumflags2", "frame-support", @@ -5207,7 +5228,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-benchmarking", "frame-support", @@ -5222,7 +5243,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5241,7 +5262,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5254,7 +5275,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-election-provider-support", "frame-support", @@ -5276,7 +5297,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2 1.0.26", @@ -5287,7 +5308,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5300,7 +5321,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-benchmarking", "frame-support", @@ -5317,7 +5338,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5331,7 +5352,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5347,7 +5368,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5364,7 +5385,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5375,7 +5396,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5390,7 +5411,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-support", "frame-system", @@ -5404,7 +5425,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "enumflags2", "frame-support", @@ -5417,7 +5438,7 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "frame-support", "frame-system", @@ -5885,7 +5906,7 @@ checksum = "989d43012e2ca1c4a02507c67282691a0a3207f9dc67cec596b43fe925b3d325" [[package]] name = "polkadot-approval-distribution" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "polkadot-node-network-protocol", @@ -5899,7 +5920,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "parity-scale-codec", @@ -5913,7 +5934,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "lru", @@ -5936,7 +5957,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "lru", @@ -5954,8 +5975,8 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "frame-benchmarking-cli", "futures 0.3.14", @@ -5975,7 +5996,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "always-assert", "futures 0.3.14", @@ -5994,8 +6015,8 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -6006,8 +6027,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -6021,7 +6042,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "polkadot-node-network-protocol", @@ -6036,7 +6057,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "async-trait", "futures 0.3.14", @@ -6056,7 +6077,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "parity-scale-codec", @@ -6074,7 +6095,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "bitvec", "derive_more 0.99.11", @@ -6103,7 +6124,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "bitvec", "futures 0.3.14", @@ -6123,7 +6144,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "bitvec", "futures 0.3.14", @@ -6141,7 +6162,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "polkadot-node-subsystem", @@ -6156,7 +6177,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-selection" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "polkadot-node-primitives", @@ -6171,7 +6192,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "async-trait", "futures 0.3.14", @@ -6189,7 +6210,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "polkadot-node-subsystem", @@ -6202,7 +6223,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-proposer" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "futures-timer 3.0.2", @@ -6227,7 +6248,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "bitvec", "futures 0.3.14", @@ -6242,7 +6263,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "always-assert", "assert_matches", @@ -6270,7 +6291,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "memory-lru", @@ -6288,7 +6309,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "async-std", "lazy_static", @@ -6306,7 +6327,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "parity-scale-codec", @@ -6321,7 +6342,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "futures 0.3.14", "parity-scale-codec", @@ -6343,7 +6364,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "async-std", "async-trait", @@ -6373,7 +6394,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "async-trait", "futures 0.3.14", @@ -6395,7 +6416,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "async-trait", "futures 0.3.14", @@ -6423,7 +6444,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "async-trait", "futures 0.3.14", @@ -6432,6 +6453,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", + "polkadot-procmacro-overseer-subsystems-gen", "sc-client-api", "sp-api", "tracing", @@ -6439,8 +6461,8 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "derive_more 0.99.11", "parity-scale-codec", @@ -6454,8 +6476,8 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "bitvec", "frame-system", @@ -6481,10 +6503,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "polkadot-procmacro-overseer-subsystems-gen" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" +dependencies = [ + "assert_matches", + "proc-macro2 1.0.26", + "quote 1.0.9", + "syn 1.0.68", +] + [[package]] name = "polkadot-procmacro-subsystem-dispatch-gen" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "assert_matches", "proc-macro2 1.0.26", @@ -6494,8 +6527,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -6527,8 +6560,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "beefy-primitives", "bitvec", @@ -6597,8 +6630,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "beefy-primitives", "bitvec", @@ -6639,8 +6672,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "bitvec", "derive_more 0.99.11", @@ -6676,8 +6709,8 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -6766,7 +6799,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "arrayvec 0.5.2", "futures 0.3.14", @@ -6786,8 +6819,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -6796,8 +6829,8 @@ dependencies = [ [[package]] name = "polkadot-test-client" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -6821,8 +6854,8 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "beefy-primitives", "bitvec", @@ -6878,8 +6911,8 @@ dependencies = [ [[package]] name = "polkadot-test-service" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "frame-benchmarking", "frame-system", @@ -7605,7 +7638,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "env_logger 0.8.3", "hex-literal 0.3.1", @@ -7757,8 +7790,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "beefy-primitives", "frame-executive", @@ -7962,7 +7995,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-trait", "derive_more 0.99.11", @@ -7991,7 +8024,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "futures 0.3.14", "futures-timer 3.0.2", @@ -8014,7 +8047,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8030,7 +8063,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8051,7 +8084,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2 1.0.26", @@ -8062,7 +8095,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "chrono", "fdlimit", @@ -8100,7 +8133,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "derive_more 0.99.11", "fnv", @@ -8134,7 +8167,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "blake2-rfc", "hash-db", @@ -8164,7 +8197,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parking_lot 0.11.1", "sc-client-api", @@ -8176,7 +8209,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-trait", "derive_more 0.99.11", @@ -8223,7 +8256,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "derive_more 0.99.11", "futures 0.3.14", @@ -8247,7 +8280,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8260,7 +8293,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-trait", "futures 0.3.14", @@ -8287,7 +8320,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "log", "sc-client-api", @@ -8301,7 +8334,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "derive_more 0.99.11", "lazy_static", @@ -8331,7 +8364,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "derive_more 0.99.11", "parity-scale-codec", @@ -8348,7 +8381,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "log", "parity-scale-codec", @@ -8363,7 +8396,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "log", "parity-scale-codec", @@ -8381,7 +8414,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-trait", "derive_more 0.99.11", @@ -8421,7 +8454,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "derive_more 0.99.11", "finality-grandpa", @@ -8445,7 +8478,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-warp-sync" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "derive_more 0.99.11", "futures 0.3.14", @@ -8466,7 +8499,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "ansi_term 0.12.1", "futures 0.3.14", @@ -8484,7 +8517,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-trait", "derive_more 0.99.11", @@ -8504,7 +8537,7 @@ dependencies = [ [[package]] name = "sc-light" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "hash-db", "lazy_static", @@ -8523,7 +8556,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-std", "async-trait", @@ -8576,7 +8609,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "futures 0.3.14", "futures-timer 3.0.2", @@ -8593,7 +8626,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "bytes 0.5.6", "fnv", @@ -8621,7 +8654,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "futures 0.3.14", "libp2p", @@ -8634,7 +8667,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8643,7 +8676,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "futures 0.3.14", "hash-db", @@ -8677,7 +8710,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "derive_more 0.99.11", "futures 0.3.14", @@ -8701,7 +8734,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "futures 0.1.30", "jsonrpc-core", @@ -8719,7 +8752,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-trait", "directories", @@ -8783,7 +8816,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "log", "parity-scale-codec", @@ -8798,7 +8831,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -8818,7 +8851,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "chrono", "futures 0.3.14", @@ -8838,7 +8871,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "ansi_term 0.12.1", "atty", @@ -8865,7 +8898,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2 1.0.26", @@ -8876,7 +8909,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "derive_more 0.99.11", "futures 0.3.14", @@ -8898,7 +8931,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "futures 0.3.14", "futures-diagnose", @@ -9227,8 +9260,8 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "slot-range-helper" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "enumn", "parity-scale-codec", @@ -9319,7 +9352,7 @@ dependencies = [ [[package]] name = "sp-allocator" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "log", "sp-core", @@ -9331,7 +9364,7 @@ dependencies = [ [[package]] name = "sp-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "hash-db", "log", @@ -9348,7 +9381,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -9360,7 +9393,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "serde", @@ -9372,7 +9405,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "integer-sqrt", "num-traits", @@ -9386,7 +9419,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "sp-api", @@ -9398,7 +9431,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -9409,7 +9442,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "sp-api", @@ -9421,7 +9454,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "futures 0.3.14", "log", @@ -9439,7 +9472,7 @@ dependencies = [ [[package]] name = "sp-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "serde", "serde_json", @@ -9448,7 +9481,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-trait", "futures 0.3.14", @@ -9491,7 +9524,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "merlin", "parity-scale-codec", @@ -9512,7 +9545,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -9522,7 +9555,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -9534,7 +9567,7 @@ dependencies = [ [[package]] name = "sp-core" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "base58", "blake2-rfc", @@ -9578,7 +9611,7 @@ dependencies = [ [[package]] name = "sp-database" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -9587,7 +9620,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "proc-macro2 1.0.26", "quote 1.0.9", @@ -9597,7 +9630,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "environmental", "parity-scale-codec", @@ -9608,7 +9641,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "finality-grandpa", "log", @@ -9625,7 +9658,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", @@ -9637,7 +9670,7 @@ dependencies = [ [[package]] name = "sp-io" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "futures 0.3.14", "hash-db", @@ -9661,7 +9694,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "lazy_static", "sp-core", @@ -9672,7 +9705,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-trait", "derive_more 0.99.11", @@ -9689,7 +9722,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "ruzstd", "zstd", @@ -9698,7 +9731,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "serde", @@ -9711,7 +9744,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2 1.0.26", @@ -9722,7 +9755,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "sp-api", "sp-core", @@ -9732,7 +9765,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "backtrace", ] @@ -9740,7 +9773,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "serde", "sp-core", @@ -9749,7 +9782,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "either", "hash256-std-hasher", @@ -9770,7 +9803,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9787,7 +9820,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -9799,7 +9832,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "serde", "serde_json", @@ -9808,7 +9841,7 @@ dependencies = [ [[package]] name = "sp-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "sp-api", @@ -9821,7 +9854,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -9831,7 +9864,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "hash-db", "log", @@ -9853,12 +9886,12 @@ dependencies = [ [[package]] name = "sp-std" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" [[package]] name = "sp-storage" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9871,7 +9904,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "log", "sp-core", @@ -9897,7 +9930,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "parity-scale-codec", "sp-api", @@ -9910,7 +9943,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "log", "parity-scale-codec", @@ -9923,7 +9956,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "derive_more 0.99.11", "futures 0.3.14", @@ -9939,7 +9972,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "hash-db", "memory-db", @@ -9953,7 +9986,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "futures 0.3.14", "futures-core", @@ -9965,7 +9998,7 @@ dependencies = [ [[package]] name = "sp-version" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9977,7 +10010,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10135,7 +10168,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "platforms", ] @@ -10143,7 +10176,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.14", @@ -10166,7 +10199,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-std", "derive_more 0.99.11", @@ -10180,7 +10213,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "async-trait", "futures 0.1.30", @@ -10985,7 +11018,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c216fa957d69318ad08932c2739181c7d03260c" +source = "git+https://github.com/paritytech/substrate?branch=master#70ef0afc86cdef0cba09336acffb08bff08540aa" dependencies = [ "frame-try-runtime", "log", @@ -11011,7 +11044,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59" dependencies = [ "cfg-if 0.1.10", - "rand 0.6.5", + "rand 0.7.3", "static_assertions", ] @@ -11637,8 +11670,8 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "beefy-primitives", "bitvec", @@ -11814,8 +11847,8 @@ dependencies = [ [[package]] name = "xcm" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -11824,8 +11857,8 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "frame-support", "frame-system", @@ -11843,8 +11876,8 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.8.31" -source = "git+https://github.com/paritytech/polkadot?branch=master#6cbf3cc3adb3f7d0451ec7e4729129294ef6b19e" +version = "0.9.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#4758b9f6a3625b0a8cc6457373bba47f4003739e" dependencies = [ "frame-support", "impl-trait-for-tuples", diff --git a/cumulus/Cargo.toml b/cumulus/Cargo.toml index ae875082a7..50421776ab 100644 --- a/cumulus/Cargo.toml +++ b/cumulus/Cargo.toml @@ -5,6 +5,7 @@ members = [ "client/consensus/relay-chain", "client/network", "client/service", + "pallets/dmp-queue", "pallets/parachain-system", "pallets/xcm", "pallets/xcmp-queue", diff --git a/cumulus/pallets/dmp-queue/Cargo.toml b/cumulus/pallets/dmp-queue/Cargo.toml new file mode 100644 index 0000000000..e1f4447730 --- /dev/null +++ b/cumulus/pallets/dmp-queue/Cargo.toml @@ -0,0 +1,45 @@ +[package] +name = "cumulus-pallet-dmp-queue" +version = "0.1.0" +authors = ["Parity Technologies "] +edition = "2018" + +[dependencies] +# Other dependencies +codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ], default-features = false } +log = { version = "0.4.14", default-features = false } +rand = { version = "0.8.3", default-features = false } +rand_chacha = { version = "0.3.0", default-features = false } + +# 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" } +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" } + +# Polkadot Dependencies +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" } + +# Cumulus Dependencies +cumulus-primitives-core = { path = "../../primitives/core", default-features = false } + +[dev-dependencies] +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } + +[features] +default = [ "std" ] +std = [ + "codec/std", + "log/std", + "sp-std/std", + "sp-io/std", + "sp-runtime/std", + "frame-support/std", + "frame-system/std", + "cumulus-primitives-core/std", + "xcm/std", + "xcm-executor/std", +] diff --git a/cumulus/pallets/dmp-queue/src/lib.rs b/cumulus/pallets/dmp-queue/src/lib.rs new file mode 100644 index 0000000000..732850aac7 --- /dev/null +++ b/cumulus/pallets/dmp-queue/src/lib.rs @@ -0,0 +1,786 @@ +// Copyright 2020-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 . + +//! Pallet implementing a message queue for downward messages from the relay-chain. +//! Executes downward messages if there is enough weight available and schedules the rest for later +//! execution (by `on_idle` or another `handle_dmp_messages` call). Individual overweight messages +//! are scheduled into a separate queue that is only serviced by explicit extrinsic calls. + +#![cfg_attr(not(feature = "std"), no_std)] + +use sp_std::{prelude::*, convert::TryFrom}; +use cumulus_primitives_core::relay_chain::BlockNumber as RelayBlockNumber; +use cumulus_primitives_core::DmpMessageHandler; +use codec::{Encode, Decode}; +use sp_runtime::RuntimeDebug; +use xcm::{VersionedXcm, v0::{Xcm, Junction, Outcome, ExecuteXcm, Error as XcmError}}; +use frame_support::{traits::EnsureOrigin, dispatch::Weight, weights::constants::WEIGHT_PER_MILLIS}; +pub use pallet::*; + +#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug)] +pub struct ConfigData { + /// The maximum amount of weight any individual message may consume. Messages above this weight + /// go into the overweight queue and may only be serviced explicitly by the + /// `ExecuteOverweightOrigin`. + max_individual: Weight, +} + +impl Default for ConfigData { + fn default() -> Self { + Self { + max_individual: 10 * WEIGHT_PER_MILLIS, // 10 ms of execution time maximum by default + } + } +} + +/// Information concerning our message pages. +#[derive(Copy, Clone, Eq, PartialEq, Default, Encode, Decode, RuntimeDebug)] +pub struct PageIndexData { + /// The lowest used page index. + begin_used: PageCounter, + /// The lowest unused page index. + end_used: PageCounter, + /// The number of overweight messages ever recorded (and thus the lowest free index). + overweight_count: OverweightIndex, +} + +/// Simple type used to identify messages for the purpose of reporting events. Secure if and only +/// if the message content is unique. +pub type MessageId = [u8; 32]; + +/// Index used to identify overweight messages. +pub type OverweightIndex = u64; + +/// Index used to identify normal pages. +pub type PageCounter = u32; + +#[frame_support::pallet] +pub mod pallet { + use super::*; + use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::*; + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + pub struct Pallet(_); + + /// The module configuration trait. + #[pallet::config] + pub trait Config: frame_system::Config { + /// The overarching event type. + type Event: From> + IsType<::Event>; + + type XcmExecutor: ExecuteXcm; + + /// Origin which is allowed to execute overweight messages. + type ExecuteOverweightOrigin: EnsureOrigin; + } + + /// The configuration. + #[pallet::storage] + pub(super) type Configuration = StorageValue<_, ConfigData, ValueQuery>; + + /// The page index. + #[pallet::storage] + pub(super) type PageIndex = StorageValue<_, PageIndexData, ValueQuery>; + + /// The queue pages. + #[pallet::storage] + pub(super) type Pages = StorageMap< + _, + Blake2_128Concat, + PageCounter, + Vec<(RelayBlockNumber, Vec)>, + ValueQuery, + >; + + /// The overweight messages. + #[pallet::storage] + pub(super) type Overweight = StorageMap< + _, + Blake2_128Concat, + OverweightIndex, + (RelayBlockNumber, Vec), + OptionQuery, + >; + + #[pallet::error] + pub enum Error { + /// The message index given is unknown. + Unknown, + /// The amount of weight given is possibly not enough for executing the message. + OverLimit, + } + + #[pallet::hooks] + impl Hooks> for Pallet { + fn on_idle(_now: T::BlockNumber, max_weight: Weight) -> Weight { + // on_idle processes additional messages with any remaining block weight. + Self::service_queue(max_weight) + } + } + + #[pallet::call] + impl Pallet { + /// Service a single overweight message. + /// + /// - `origin`: Must pass `ExecuteOverweightOrigin`. + /// - `index`: The index of the overweight message to service. + /// - `weight_limit`: The amount of weight that message execution may take. + /// + /// Errors: + /// - `Unknown`: Message of `index` is unknown. + /// - `OverLimit`: Message execution may use greater than `weight_limit`. + /// + /// Events: + /// - `OverweightServiced`: On success. + #[pallet::weight(weight_limit.saturating_add(1_000_000))] + pub fn service_overweight( + origin: OriginFor, + index: OverweightIndex, + weight_limit: Weight, + ) -> DispatchResultWithPostInfo { + T::ExecuteOverweightOrigin::ensure_origin(origin)?; + + let (sent_at, data) = Overweight::::get(index).ok_or(Error::::Unknown)?; + let used = Self::try_service_message(weight_limit, sent_at, &data[..]) + .map_err(|_| Error::::OverLimit)?; + Overweight::::remove(index); + Self::deposit_event(Event::OverweightServiced(index, used)); + Ok(Some(used.saturating_add(1_000_000)).into()) + } + } + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + #[pallet::metadata(T::BlockNumber = "BlockNumber")] + pub enum Event { + /// Downward message is invalid XCM. + /// \[ id \] + InvalidFormat(MessageId), + /// Downward message is unsupported version of XCM. + /// \[ id \] + UnsupportedVersion(MessageId), + /// Downward message executed with the given outcome. + /// \[ id, outcome \] + ExecutedDownward(MessageId, Outcome), + /// The weight limit for handling downward messages was reached. + /// \[ id, remaining, required \] + WeightExhausted(MessageId, Weight, Weight), + /// Downward message is overweight and was placed in the overweight queue. + /// \[ id, index, required \] + OverweightEnqueued(MessageId, OverweightIndex, Weight), + /// Downward message from the overweight queue was executed. + /// \[ index, used \] + OverweightServiced(OverweightIndex, Weight), + } + + impl Pallet { + /// Service the message queue up to some given weight `limit`. + /// + /// 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)) + } + + /// 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 { + let mut used = 0; + 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() { + match Self::try_service_message(limit.saturating_sub(used), sent_at, &data[..]) { + Ok(w) => used += w, + Err(..) => { + // Too much weight needed - put the remaining messages back and bail + Pages::::insert(page_index.begin_used, &page[i..]); + return used; + } + } + } + page_index.begin_used += 1; + } + if page_index.begin_used == page_index.end_used { + // Reset if there's no pages left. + page_index.begin_used = 0; + page_index.end_used = 0; + } + used + } + + /// Attempt to service an individual message. Will return `Ok` with the execution weight + /// consumed unless the message was found to need more weight than `limit`. + /// + /// NOTE: This will return `Ok` in the case of an error decoding, weighing or executing + /// the message. This is why it's called message "servicing" rather than "execution". + pub(crate) fn try_service_message( + limit: Weight, + _sent_at: RelayBlockNumber, + data: &[u8], + ) -> Result { + let id = sp_io::hashing::blake2_256(&data[..]); + let maybe_msg = VersionedXcm::::decode(&mut &data[..]) + .map(Xcm::::try_from); + match maybe_msg { + Err(_) => { + Self::deposit_event(Event::InvalidFormat(id)); + Ok(0) + }, + Ok(Err(())) => { + Self::deposit_event(Event::UnsupportedVersion(id)); + Ok(0) + }, + Ok(Ok(x)) => { + let outcome = T::XcmExecutor::execute_xcm(Junction::Parent.into(), x, limit); + match outcome { + Outcome::Error(XcmError::WeightLimitReached(required)) => Err((id, required)), + outcome => { + let weight_used = outcome.weight_used(); + Self::deposit_event(Event::ExecutedDownward(id, outcome)); + Ok(weight_used) + } + } + } + } + } + } + + /// For an incoming downward message, this just adapts an XCM executor and executes DMP messages + /// immediately up until some `MaxWeight` at which point it errors. Their origin is asserted to be + /// the `Parent` location. + impl DmpMessageHandler for Pallet { + fn handle_dmp_messages( + iter: impl Iterator)>, + limit: Weight, + ) -> Weight { + 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); + + // 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. + let item_count = iter.size_hint().0; + let mut maybe_enqueue_page = if page_index.end_used > page_index.begin_used { + // queue is already non-empty - start a fresh page. + Some(Vec::with_capacity(item_count)) + } else { + None + }; + + for (i, (sent_at, data)) in iter.enumerate() { + if maybe_enqueue_page.is_none() { + // We're not currently enqueuing - try to execute inline. + let remaining = limit.saturating_sub(used); + match Self::try_service_message(remaining, sent_at, &data[..]) { + Ok(consumed) => used += consumed, + Err((id, required)) => + // Too much weight required right now. + if required > config.max_individual { + // overweight - add to overweight queue and continue with + // message execution. + let index = page_index.overweight_count; + Overweight::::insert(index, (sent_at, data)); + Self::deposit_event(Event::OverweightEnqueued(id, index, required)); + page_index.overweight_count += 1; + // Not needed for control flow, but only to ensure that the compiler + // understands that we won't attempt to re-use `data` later. + continue; + } else { + // not overweight. stop executing inline and enqueue normally + // from here on. + let item_count_left = item_count.saturating_sub(i); + maybe_enqueue_page = Some(Vec::with_capacity(item_count_left)); + Self::deposit_event(Event::WeightExhausted(id, remaining, required)); + } + } + } + // Cannot be an `else` here since the `maybe_enqueue_page` may have changed. + if let Some(ref mut enqueue_page) = maybe_enqueue_page { + enqueue_page.push((sent_at, data)); + } + } + + // Deposit the enqueued page if any and save the index. + if let Some(enqueue_page) = maybe_enqueue_page { + Pages::::insert(page_index.end_used, enqueue_page); + page_index.end_used += 1; + } + PageIndex::::put(page_index); + + used + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate as dmp_queue; + + use std::cell::RefCell; + use codec::Encode; + use cumulus_primitives_core::ParaId; + use frame_support::{parameter_types, assert_noop, traits::OnIdle}; + use sp_core::H256; + use sp_runtime::{testing::Header, traits::{IdentityLookup, BlakeTwo256}}; + use sp_runtime::DispatchError::BadOrigin; + use sp_version::RuntimeVersion; + use xcm::v0::{MultiLocation, OriginKind}; + + type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; + type Block = frame_system::mocking::MockBlock; + type Xcm = xcm::v0::Xcm; + + frame_support::construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + System: frame_system::{Pallet, Call, Config, Storage, Event}, + DmpQueue: dmp_queue::{Pallet, Call, Storage, Event}, + } + ); + + parameter_types! { + pub const BlockHashCount: u64 = 250; + pub Version: RuntimeVersion = RuntimeVersion { + spec_name: sp_version::create_runtime_str!("test"), + impl_name: sp_version::create_runtime_str!("system-test"), + authoring_version: 1, + spec_version: 1, + impl_version: 1, + apis: sp_version::create_apis_vec!([]), + transaction_version: 1, + }; + pub const ParachainId: ParaId = ParaId::new(200); + pub const ReservedXcmpWeight: Weight = 0; + pub const ReservedDmpWeight: Weight = 0; + } + + type AccountId = u64; + + impl frame_system::Config for Test { + type Origin = Origin; + type Call = Call; + type Index = u64; + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = AccountId; + type Lookup = IdentityLookup; + type Header = Header; + type Event = Event; + type BlockHashCount = BlockHashCount; + type BlockLength = (); + type BlockWeights = (); + type Version = Version; + type PalletInfo = PalletInfo; + type AccountData = (); + type OnNewAccount = (); + type OnKilledAccount = (); + type DbWeight = (); + type BaseCallFilter = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + } + + thread_local! { + pub static TRACE: RefCell> = RefCell::new(Vec::new()); + } + pub fn take_trace() -> Vec<(Xcm, Outcome)> { + TRACE.with(|q| { + let q = &mut *q.borrow_mut(); + let r = q.clone(); + q.clear(); + r + }) + } + + pub struct MockExec; + impl ExecuteXcm for MockExec { + type Call = Call; + fn execute_xcm(_origin: MultiLocation, message: Xcm, weight_limit: Weight) -> Outcome { + let o = match &message { + Xcm::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 + } + } + + impl Config for Test { + type Event = Event; + type XcmExecutor = MockExec; + type ExecuteOverweightOrigin = frame_system::EnsureRoot; + } + + pub(crate) fn new_test_ext() -> sp_io::TestExternalities { + frame_system::GenesisConfig::default().build_storage::().unwrap().into() + } + + fn enqueue(enqueued: &[Xcm]) { + if !enqueued.is_empty() { + let mut index = PageIndex::::get(); + Pages::::insert(index.end_used, enqueued.iter() + .map(|m| (0, VersionedXcm::::from(m.clone()).encode())) + .collect::>() + ); + index.end_used += 1; + PageIndex::::put(index); + } + } + + fn handle_messages(incoming: &[Xcm], limit: Weight) -> Weight { + let iter = incoming.iter().map(|m| (0, VersionedXcm::::from(m.clone()).encode())); + DmpQueue::handle_dmp_messages(iter, limit) + } + + fn msg(weight: Weight) -> Xcm { + Xcm::Transact { + origin_type: OriginKind::Native, + require_weight_at_most: weight, + call: vec![].into(), + } + } + + fn msg_complete(weight: Weight) -> (Xcm, Outcome) { + (msg(weight), Outcome::Complete(weight)) + } + + fn msg_limit_reached(weight: Weight) -> (Xcm, Outcome) { + (msg(weight), Outcome::Error(XcmError::WeightLimitReached(weight))) + } + + fn pages_queued() -> PageCounter { + PageIndex::::get().end_used - PageIndex::::get().begin_used + } + + fn queue_is_empty() -> bool { + pages_queued() == 0 + } + + fn overweights() -> Vec { + (0..PageIndex::::get().overweight_count) + .filter(|i| Overweight::::contains_key(i)) + .collect::>() + } + + #[test] + fn basic_setup_works() { + new_test_ext().execute_with(|| { + let weight_used = handle_messages(&[], 1000); + assert_eq!(weight_used, 0); + assert_eq!(take_trace(), vec![]); + assert!(queue_is_empty()); + }); + } + + #[test] + fn service_inline_complete_works() { + new_test_ext().execute_with(|| { + let incoming = vec![ msg(1000), msg(1001) ]; + let weight_used = handle_messages(&incoming, 2500); + assert_eq!(weight_used, 2001); + assert_eq!(take_trace(), vec![msg_complete(1000), msg_complete(1001)]); + assert!(queue_is_empty()); + }); + } + + #[test] + fn service_enqueued_works() { + new_test_ext().execute_with(|| { + let enqueued = vec![ msg(1000), msg(1001), msg(1002) ]; + enqueue(&enqueued); + let weight_used = handle_messages(&[], 2500); + assert_eq!(weight_used, 2001); + assert_eq!(take_trace(), vec![ + msg_complete(1000), + msg_complete(1001), + msg_limit_reached(1002), + ]); + }); + } + + #[test] + fn enqueue_works() { + new_test_ext().execute_with(|| { + let incoming = vec![ msg(1000), msg(1001), msg(1002) ]; + let weight_used = handle_messages(&incoming, 999); + assert_eq!(weight_used, 0); + assert_eq!(PageIndex::::get(), PageIndexData { begin_used: 0, end_used: 1, overweight_count: 0}); + assert_eq!(Pages::::get(0).len(), 3); + assert_eq!(take_trace(), vec![ msg_limit_reached(1000) ]); + + let weight_used = handle_messages(&[], 2500); + assert_eq!(weight_used, 2001); + assert_eq!(take_trace(), vec![ + msg_complete(1000), + msg_complete(1001), + msg_limit_reached(1002), + ]); + + let weight_used = handle_messages(&[], 2500); + assert_eq!(weight_used, 1002); + assert_eq!(take_trace(), vec![ + msg_complete(1002), + ]); + assert!(queue_is_empty()); + }); + } + + #[test] + 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, 1500); + assert_eq!(weight_used, 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(&[], 2500); + assert_eq!(weight_used, 2003); + assert_eq!(take_trace(), vec![ + msg_complete(1001), + msg_complete(1002), + ]); + assert!(queue_is_empty()); + }); + } + + #[test] + fn service_enqueued_and_inline_works() { + new_test_ext().execute_with(|| { + let enqueued = vec![ msg(1000), msg(1001) ]; + let incoming = vec![ msg(1002), msg(1003) ]; + enqueue(&enqueued); + let weight_used = handle_messages(&incoming, 5000); + assert_eq!(weight_used, 4006); + assert_eq!(take_trace(), vec![ + msg_complete(1000), + msg_complete(1001), + msg_complete(1002), + msg_complete(1003), + ]); + assert!(queue_is_empty()); + }); + } + + #[test] + fn service_enqueued_partially_and_then_enqueue_works() { + new_test_ext().execute_with(|| { + let enqueued = vec![ msg(1000), msg(10001) ]; + let incoming = vec![ msg(1002), msg(1003) ]; + enqueue(&enqueued); + let weight_used = handle_messages(&incoming, 5000); + assert_eq!(weight_used, 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(&[], 5000); + assert_eq!(weight_used, 0); + assert_eq!(take_trace(), vec![ + msg_limit_reached(10001), + ]); + + // 20000 is now enough to process everything. + let weight_used = handle_messages(&[], 20000); + assert_eq!(weight_used, 12006); + assert_eq!(take_trace(), vec![ + msg_complete(10001), + msg_complete(1002), + msg_complete(1003), + ]); + assert!(queue_is_empty()); + }); + } + + #[test] + fn service_enqueued_completely_and_then_enqueue_works() { + new_test_ext().execute_with(|| { + let enqueued = vec![ msg(1000), msg(1001) ]; + let incoming = vec![ msg(10002), msg(1003) ]; + enqueue(&enqueued); + let weight_used = handle_messages(&incoming, 5000); + assert_eq!(weight_used, 2001); + assert_eq!(take_trace(), vec![ + msg_complete(1000), + msg_complete(1001), + msg_limit_reached(10002), + ]); + assert_eq!(pages_queued(), 1); + + // 20000 is now enough to process everything. + let weight_used = handle_messages(&[], 20000); + assert_eq!(weight_used, 11005); + assert_eq!(take_trace(), vec![ + msg_complete(10002), + msg_complete(1003), + ]); + assert!(queue_is_empty()); + }); + } + + #[test] + fn service_enqueued_then_inline_then_enqueue_works() { + new_test_ext().execute_with(|| { + let enqueued = vec![ msg(1000), msg(1001) ]; + let incoming = vec![ msg(1002), msg(10003) ]; + enqueue(&enqueued); + let weight_used = handle_messages(&incoming, 5000); + assert_eq!(weight_used, 3003); + assert_eq!(take_trace(), vec![ + msg_complete(1000), + msg_complete(1001), + msg_complete(1002), + msg_limit_reached(10003), + ]); + assert_eq!(pages_queued(), 1); + + // 20000 is now enough to process everything. + let weight_used = handle_messages(&[], 20000); + assert_eq!(weight_used, 10003); + assert_eq!(take_trace(), vec![ + msg_complete(10003), + ]); + assert!(queue_is_empty()); + }); + } + + #[test] + fn page_crawling_works() { + new_test_ext().execute_with(|| { + let enqueued = vec![ msg(1000), msg(1001) ]; + enqueue(&enqueued); + let weight_used = handle_messages(&vec![ msg(1002) ], 1500); + assert_eq!(weight_used, 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) ], 1500); + assert_eq!(weight_used, 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) ], 1500); + assert_eq!(weight_used, 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); + }); + } + + #[test] + fn overweight_should_not_block_queue() { + new_test_ext().execute_with(|| { + // Set the overweight threshold to 9999. + Configuration::::put(ConfigData { max_individual: 9999 }); + + let incoming = vec![ msg(1000), msg(10001), msg(1002) ]; + let weight_used = handle_messages(&incoming, 2500); + assert_eq!(weight_used, 2002); + assert!(queue_is_empty()); + assert_eq!(take_trace(), vec![ + msg_complete(1000), + msg_limit_reached(10001), + msg_complete(1002), + ]); + + assert_eq!(overweights(), vec![0]); + }); + } + + #[test] + fn overweights_should_be_manually_executable() { + new_test_ext().execute_with(|| { + // Set the overweight threshold to 9999. + Configuration::::put(ConfigData { max_individual: 9999 }); + + let incoming = vec![ msg(10000) ]; + let weight_used = handle_messages(&incoming, 2500); + assert_eq!(weight_used, 0); + assert_eq!(take_trace(), vec![ msg_limit_reached(10000) ]); + assert_eq!(overweights(), vec![0]); + + assert_noop!(DmpQueue::service_overweight(Origin::signed(1), 0, 20000), BadOrigin); + assert_noop!(DmpQueue::service_overweight(Origin::root(), 1, 20000), Error::::Unknown); + assert_noop!(DmpQueue::service_overweight(Origin::root(), 0, 9999), Error::::OverLimit); + assert_eq!(take_trace(), vec![ msg_limit_reached(10000) ]); + + let base_weight = super::Call::::service_overweight(0, 0).get_dispatch_info().weight; + use frame_support::weights::GetDispatchInfo; + let info = DmpQueue::service_overweight(Origin::root(), 0, 20000).unwrap(); + let actual_weight = info.actual_weight.unwrap(); + assert_eq!(actual_weight, base_weight + 10000); + assert_eq!(take_trace(), vec![ msg_complete(10000) ]); + assert!(overweights().is_empty()); + + assert_noop!(DmpQueue::service_overweight(Origin::root(), 0, 20000), Error::::Unknown); + }); + } + + #[test] + fn on_idle_should_service_queue() { + new_test_ext().execute_with(|| { + enqueue(&vec![ msg(1000), msg(1001) ]); + enqueue(&vec![ msg(1002), msg(1003) ]); + enqueue(&vec![ msg(1004), msg(1005) ]); + + let weight_used = DmpQueue::on_idle(1, 6000); + assert_eq!(weight_used, 5010); + assert_eq!(take_trace(), vec![ + msg_complete(1000), + msg_complete(1001), + msg_complete(1002), + msg_complete(1003), + msg_complete(1004), + msg_limit_reached(1005), + ]); + assert_eq!(pages_queued(), 1); + }); + } +} diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index aa21fbc9a5..990160dcbb 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -42,7 +42,7 @@ use polkadot_parachain::primitives::RelayChainBlockNumber; use cumulus_primitives_core::{ relay_chain, well_known_keys::{self, NEW_VALIDATION_CODE}, - AbridgedHostConfiguration, DownwardMessageHandler, XcmpMessageHandler, + AbridgedHostConfiguration, DmpMessageHandler, XcmpMessageHandler, InboundDownwardMessage, InboundHrmpMessage, OnValidationData, OutboundHrmpMessage, ParaId, PersistedValidationData, UpwardMessage, UpwardMessageSender, MessageSendError, XcmpMessageSource, ChannelStatus, GetChannelInfo, @@ -70,13 +70,16 @@ pub trait Config: frame_system::Config> { /// Returns the parachain ID we are running with. type SelfParaId: Get; - /// The downward message handlers that will be informed when a message is received. - type DownwardMessageHandlers: DownwardMessageHandler; - /// The place where outbound XCMP messages come from. This is queried in `finalize_block`. type OutboundXcmpMessageSource: XcmpMessageSource; - /// The HRMP message handlers that will be informed when a message is received. + /// The message handler that will be invoked when messages are received via DMP. + type DmpMessageHandler: DmpMessageHandler; + + /// The weight we reserve at the beginning of the block for processing DMP messages. + type ReservedDmpWeight: Get; + + /// The message handler that will be invoked when messages are received via XCMP. /// /// The messages are dispatched in the order they were relayed by the relay chain. If multiple /// messages were relayed at one block, these will be dispatched in ascending order of the @@ -147,6 +150,10 @@ decl_storage! { /// overrides the amount set in the Config trait. ReservedXcmpWeightOverride: Option; + /// The weight we reserve at the beginning of the block for processing DMP messages. This + /// overrides the amount set in the Config trait. + ReservedDmpWeightOverride: Option; + /// The next authorized upgrade, if there is one. AuthorizedUpgrade: Option; } @@ -353,7 +360,7 @@ decl_module! { storage::unhashed::put(well_known_keys::HRMP_OUTBOUND_MESSAGES, &outbound_messages); } - fn on_initialize(n: T::BlockNumber) -> Weight { + fn on_initialize(_n: T::BlockNumber) -> Weight { // To prevent removing `NEW_VALIDATION_CODE` that was set by another `on_initialize` like // for example from scheduler, we only kill the storage entry if it was not yet updated // in the current block. @@ -430,6 +437,9 @@ impl sp_runtime::traits::ValidateUnsigned for Module { }) } } + if let Call::set_validation_data(..) = call { + return Ok(Default::default()) + } Err(InvalidTransaction::Call.into()) } } @@ -520,41 +530,28 @@ impl Module { downward_messages: Vec, ) -> Weight { let dm_count = downward_messages.len() as u32; + let mut dmq_head = LastDmqMqcHead::get(); + let mut weight_used = 0; - if dm_count != 0 { - let mut processed_count = 0; - Self::deposit_event(RawEvent::DownwardMessagesReceived(dm_count)); + let max_weight = ReservedDmpWeightOverride::get().unwrap_or_else(T::ReservedDmpWeight::get); - // Reference fu to avoid the `move` capture. - let weight_used_ref = &mut weight_used; - let processed_count_ref = &mut processed_count; - let result_mqc_head = LastDmqMqcHead::mutate(move |mqc| { - for downward_message in downward_messages { - mqc.extend_downward(&downward_message); - *weight_used_ref += T::DownwardMessageHandlers::handle_downward_message(downward_message); - *processed_count_ref += 1; - } - mqc.0 - }); + let message_iter = downward_messages.into_iter() + .inspect(|m| { dmq_head.extend_downward(m); }) + .map(|m| (m.sent_at, m.msg)); + weight_used += T::DmpMessageHandler::handle_dmp_messages(message_iter, max_weight); + LastDmqMqcHead::put(&dmq_head); - Self::deposit_event(RawEvent::DownwardMessagesProcessed( - processed_count, - weight_used, - result_mqc_head.clone(), - expected_dmq_mqc_head.clone(), - )); + Self::deposit_event(RawEvent::DownwardMessagesProcessed(weight_used, dmq_head.0)); + }; - // After hashing each message in the message queue chain submitted by the collator, we should - // arrive to the MQC head provided by the relay chain. - // - // A mismatch means that at least some of the submitted messages were altered, omitted or added - // improperly. - assert_eq!(result_mqc_head, expected_dmq_mqc_head); - } else { - assert_eq!(LastDmqMqcHead::get().0, expected_dmq_mqc_head); - } + // After hashing each message in the message queue chain submitted by the collator, we should + // arrive to the MQC head provided by the relay chain. + // + // A mismatch means that at least some of the submitted messages were altered, omitted or added + // improperly. + assert_eq!(dmq_head.0, expected_dmq_mqc_head); // Store the processed_downward_messages here so that it will be accessible from // PVF's `validate_block` wrapper and collation pipeline. @@ -854,12 +851,12 @@ decl_event! { ValidationFunctionApplied(RelayChainBlockNumber), /// An upgrade has been authorized. UpgradeAuthorized(Hash), - /// Downward messages were processed using the given weight. - /// \[ count, weight_used, result_mqc_head, expected_mqc_head \] - DownwardMessagesProcessed(u32, Weight, relay_chain::Hash, relay_chain::Hash), /// Some downward messages have been received and will be processed. /// \[ count \] DownwardMessagesReceived(u32), + /// Downward messages were processed using the given weight. + /// \[ weight_used, result_mqc_head \] + DownwardMessagesProcessed(Weight, relay_chain::Hash), } } @@ -938,6 +935,7 @@ mod tests { }; pub const ParachainId: ParaId = ParaId::new(200); pub const ReservedXcmpWeight: Weight = 0; + pub const ReservedDmpWeight: Weight = 0; } impl frame_system::Config for Test { type Origin = Origin; @@ -968,9 +966,10 @@ mod tests { type Event = Event; type OnValidationData = (); type SelfParaId = ParachainId; - type DownwardMessageHandlers = SaveIntoThreadLocal; - type XcmpMessageHandler = SaveIntoThreadLocal; type OutboundXcmpMessageSource = FromThreadLocal; + type DmpMessageHandler = SaveIntoThreadLocal; + type ReservedDmpWeight = ReservedDmpWeight; + type XcmpMessageHandler = SaveIntoThreadLocal; type ReservedXcmpWeight = ReservedXcmpWeight; } @@ -978,7 +977,7 @@ mod tests { pub struct SaveIntoThreadLocal; std::thread_local! { - static HANDLED_DOWNWARD_MESSAGES: RefCell> = RefCell::new(Vec::new()); + static HANDLED_DMP_MESSAGES: RefCell)>> = RefCell::new(Vec::new()); static HANDLED_XCMP_MESSAGES: RefCell)>> = RefCell::new(Vec::new()); static SENT_MESSAGES: RefCell)>> = RefCell::new(Vec::new()); } @@ -1013,12 +1012,17 @@ mod tests { } } - impl DownwardMessageHandler for SaveIntoThreadLocal { - fn handle_downward_message(msg: InboundDownwardMessage) -> Weight { - HANDLED_DOWNWARD_MESSAGES.with(|m| { - m.borrow_mut().push(msg); - }); - 0 + impl DmpMessageHandler for SaveIntoThreadLocal { + fn handle_dmp_messages( + iter: impl Iterator)>, + _max_weight: Weight, + ) -> Weight { + HANDLED_DMP_MESSAGES.with(|m| { + for i in iter { + m.borrow_mut().push(i); + } + 0 + }) } } @@ -1039,7 +1043,7 @@ mod tests { // This function basically just builds a genesis storage key/value store according to // our desired mockup. fn new_test_ext() -> sp_io::TestExternalities { - HANDLED_DOWNWARD_MESSAGES.with(|m| m.borrow_mut().clear()); + HANDLED_DMP_MESSAGES.with(|m| m.borrow_mut().clear()); HANDLED_XCMP_MESSAGES.with(|m| m.borrow_mut().clear()); frame_system::GenesisConfig::default() @@ -1606,9 +1610,9 @@ mod tests { _ => unreachable!(), }) .add(1, || { - HANDLED_DOWNWARD_MESSAGES.with(|m| { + HANDLED_DMP_MESSAGES.with(|m| { let mut m = m.borrow_mut(); - assert_eq!(&*m, &[MSG.clone()]); + assert_eq!(&*m, &[(MSG.sent_at, MSG.msg.clone())]); m.clear(); }); }); diff --git a/cumulus/pallets/parachain-system/src/validate_block/implementation.rs b/cumulus/pallets/parachain-system/src/validate_block/implementation.rs index 305c7867a4..b0446c4639 100644 --- a/cumulus/pallets/parachain-system/src/validate_block/implementation.rs +++ b/cumulus/pallets/parachain-system/src/validate_block/implementation.rs @@ -20,7 +20,7 @@ use frame_support::traits::ExecuteBlock; use sp_runtime::traits::{Block as BlockT, HashFor, Header as HeaderT, NumberFor}; use sp_io::KillChildStorageResult; -use sp_std::{boxed::Box, vec::Vec}; +use sp_std::prelude::*; use hash_db::{HashDB, EMPTY_PREFIX}; @@ -35,13 +35,10 @@ use cumulus_primitives_core::{ HRMP_OUTBOUND_MESSAGES, HRMP_WATERMARK, NEW_VALIDATION_CODE, PROCESSED_DOWNWARD_MESSAGES, UPWARD_MESSAGES, }, - OutboundHrmpMessage, PersistedValidationData, UpwardMessage, + OutboundHrmpMessage, UpwardMessage, }; -use sp_core::storage::{ChildInfo, TrackedStorageKey}; -use sp_externalities::{ - set_and_run_with_externalities, Error, Extension, ExtensionStore, Externalities, -}; -use sp_std::any::{Any, TypeId}; +use sp_core::storage::ChildInfo; +use sp_externalities::{set_and_run_with_externalities, Externalities}; use sp_trie::MemoryDB; type Ext<'a, B> = sp_state_machine::Ext< diff --git a/cumulus/pallets/xcm/src/lib.rs b/cumulus/pallets/xcm/src/lib.rs index 717365372d..b89cf13713 100644 --- a/cumulus/pallets/xcm/src/lib.rs +++ b/cumulus/pallets/xcm/src/lib.rs @@ -20,12 +20,13 @@ #![cfg_attr(not(feature = "std"), no_std)] -use sp_std::convert::TryFrom; -use cumulus_primitives_core::{ParaId, DownwardMessageHandler, InboundDownwardMessage}; +use sp_std::{prelude::*, convert::TryFrom}; +use cumulus_primitives_core::{ParaId, DmpMessageHandler}; +use cumulus_primitives_core::relay_chain::BlockNumber as RelayBlockNumber; use codec::{Encode, Decode}; use sp_runtime::traits::BadOrigin; use xcm::{VersionedXcm, v0::{Xcm, Junction, Outcome, ExecuteXcm}}; -use frame_support::{traits::Get, dispatch::Weight}; +use frame_support::dispatch::Weight; pub use pallet::*; #[frame_support::pallet] @@ -45,9 +46,6 @@ pub mod pallet { type Event: From> + IsType<::Event>; type XcmExecutor: ExecuteXcm; - - #[pallet::constant] - type MaxWeight: Get; } #[pallet::error] @@ -74,33 +72,68 @@ pub mod pallet { /// \[ id, outcome \] ExecutedDownward([u8; 8], Outcome), } +} - /// For an incoming downward message, this just adapts an XCM executor and executes DMP messages - /// immediately up until some `MaxWeight` at which point it errors. Their origin is asserted to be - /// the Parent location. - impl DownwardMessageHandler for Pallet { - fn handle_downward_message(msg: InboundDownwardMessage) -> Weight { - let id = sp_io::hashing::twox_64(&msg.msg[..]); - let msg = VersionedXcm::::decode(&mut &msg.msg[..]) +/// For an incoming downward message, this just adapts an XCM executor and executes DMP messages +/// immediately. Their origin is asserted to be the Parent location. +/// +/// The weight `limit` is only respected as the maximum for an individual message. +/// +/// Because this largely ignores the given weight limit, it probably isn't good for most production +/// uses. Use DmpQueue pallet for a more robust design. +pub struct UnlimitedDmpExecution(sp_std::marker::PhantomData); +impl DmpMessageHandler for UnlimitedDmpExecution { + fn handle_dmp_messages( + iter: impl Iterator)>, + limit: Weight, + ) -> Weight { + let mut used = 0; + for (_sent_at, data) in iter { + let id = sp_io::hashing::twox_64(&data[..]); + let msg = VersionedXcm::::decode(&mut &data[..]) .map(Xcm::::try_from); match msg { + Err(_) => Pallet::::deposit_event(Event::InvalidFormat(id)), + Ok(Err(())) => Pallet::::deposit_event(Event::UnsupportedVersion(id)), Ok(Ok(x)) => { - let weight_limit = T::MaxWeight::get(); - let outcome = T::XcmExecutor::execute_xcm(Junction::Parent.into(), x, weight_limit); - let weight_used = outcome.weight_used(); - Self::deposit_event(Event::ExecutedDownward(id, outcome)); - weight_used + let outcome = T::XcmExecutor::execute_xcm(Junction::Parent.into(), x, limit); + used += outcome.weight_used(); + Pallet::::deposit_event(Event::ExecutedDownward(id, outcome)); } - Ok(Err(())) => { - Self::deposit_event(Event::UnsupportedVersion(id)); - 0 - }, - Err(_) => { - Self::deposit_event(Event::InvalidFormat(id)); - 0 - }, } } + used + } +} + +/// For an incoming downward message, this just adapts an XCM executor and executes DMP messages +/// immediately. Their origin is asserted to be the Parent location. +/// +/// This respects the given weight limit and silently drops messages if they would break it. It +/// probably isn't good for most production uses. Use DmpQueue pallet for a more robust design. +pub struct LimitAndDropDmpExecution(sp_std::marker::PhantomData); +impl DmpMessageHandler for LimitAndDropDmpExecution { + fn handle_dmp_messages( + iter: impl Iterator)>, + limit: Weight, + ) -> Weight { + let mut used = 0; + for (_sent_at, data) in iter { + let id = sp_io::hashing::twox_64(&data[..]); + let msg = VersionedXcm::::decode(&mut &data[..]) + .map(Xcm::::try_from); + match msg { + Err(_) => Pallet::::deposit_event(Event::InvalidFormat(id)), + Ok(Err(())) => Pallet::::deposit_event(Event::UnsupportedVersion(id)), + Ok(Ok(x)) => { + let weight_limit = limit.saturating_sub(used); + let outcome = T::XcmExecutor::execute_xcm(Junction::Parent.into(), x, weight_limit); + used += outcome.weight_used(); + Pallet::::deposit_event(Event::ExecutedDownward(id, outcome)); + } + } + } + used } } diff --git a/cumulus/primitives/core/src/lib.rs b/cumulus/primitives/core/src/lib.rs index dc39338d36..fc8d8f9a02 100644 --- a/cumulus/primitives/core/src/lib.rs +++ b/cumulus/primitives/core/src/lib.rs @@ -118,12 +118,23 @@ pub mod well_known_keys { } /// Something that should be called when a downward message is received. -pub trait DownwardMessageHandler { - /// Handle the given downward message. - fn handle_downward_message(msg: InboundDownwardMessage) -> Weight; +pub trait DmpMessageHandler { + /// Handle some incoming DMP messages (note these are individual XCM messages). + /// + /// Also, process messages up to some `max_weight`. + fn handle_dmp_messages( + iter: impl Iterator)>, + max_weight: Weight, + ) -> Weight; } -impl DownwardMessageHandler for () { - fn handle_downward_message(_msg: InboundDownwardMessage) -> Weight { 0 } +impl DmpMessageHandler for () { + fn handle_dmp_messages( + iter: impl Iterator)>, + _max_weight: Weight, + ) -> Weight { + for _ in iter {} + 0 + } } /// Something that should be called for each batch of messages received over XCMP. @@ -141,7 +152,10 @@ impl XcmpMessageHandler for () { fn handle_xcmp_messages<'a, I: Iterator>( iter: I, _max_weight: Weight, - ) -> Weight { for _ in iter {} 0 } + ) -> Weight { + for _ in iter {} + 0 + } } /// Something that should be called when sending an upward message. diff --git a/cumulus/primitives/utility/src/lib.rs b/cumulus/primitives/utility/src/lib.rs index bbfb0c5299..d269c22844 100644 --- a/cumulus/primitives/utility/src/lib.rs +++ b/cumulus/primitives/utility/src/lib.rs @@ -19,11 +19,10 @@ #![cfg_attr(not(feature = "std"), no_std)] -use sp_std::{marker::PhantomData, convert::TryFrom}; -use codec::{Encode, Decode}; -use cumulus_primitives_core::{UpwardMessageSender, DownwardMessageHandler, InboundDownwardMessage}; -use xcm::{VersionedXcm, v0::{Xcm, MultiLocation, Junction, SendXcm, Error as XcmError, ExecuteXcm}}; -use frame_support::{traits::Get, dispatch::Weight}; +use sp_std::marker::PhantomData; +use codec::Encode; +use cumulus_primitives_core::UpwardMessageSender; +use xcm::{VersionedXcm, v0::{Xcm, MultiLocation, Junction, SendXcm, Error as XcmError}}; /// 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 @@ -51,27 +50,3 @@ impl SendXcm for ParentAsUmp { } } -/// For an incoming downward message, this just adapts an XCM executor and executes DMP messages -/// immediately up until some `MaxWeight` at which point it errors. Their origin is asserted to be -/// the Parent location. -pub struct UnqueuedDmpAsParent( - PhantomData<(MaxWeight, XcmExecutor, Call)> -); -impl< - MaxWeight: Get, - XcmExecutor: ExecuteXcm, - Call, -> DownwardMessageHandler for UnqueuedDmpAsParent { - fn handle_downward_message(msg: InboundDownwardMessage) -> Weight { - let msg = VersionedXcm::::decode(&mut &msg.msg[..]) - .map(Xcm::::try_from); - match msg { - Ok(Ok(x)) => { - let weight_limit = MaxWeight::get(); - XcmExecutor::execute_xcm(Junction::Parent.into(), x, weight_limit).weight_used() - } - Ok(Err(..)) => 0, - Err(..) => 0, - } - } -} diff --git a/cumulus/rococo-parachains/runtime/Cargo.toml b/cumulus/rococo-parachains/runtime/Cargo.toml index 73c9accb4c..0d3e50e6ec 100644 --- a/cumulus/rococo-parachains/runtime/Cargo.toml +++ b/cumulus/rococo-parachains/runtime/Cargo.toml @@ -38,6 +38,7 @@ pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", cumulus-pallet-parachain-system = { path = "../../pallets/parachain-system", default-features = false } cumulus-primitives-core = { path = "../../primitives/core", default-features = false } cumulus-primitives-utility = { path = "../../primitives/utility", default-features = false } +cumulus-pallet-dmp-queue = { path = "../../pallets/dmp-queue", default-features = false } cumulus-pallet-xcmp-queue = { path = "../../pallets/xcmp-queue", default-features = false } cumulus-pallet-xcm = { path = "../../pallets/xcm", default-features = false } cumulus-ping = { path = "../../rococo-parachains/pallets/ping", default-features = false } @@ -84,6 +85,7 @@ std = [ "pallet-transaction-payment/std", "parachain-info/std", "rococo-parachain-primitives/std", + "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", "cumulus-pallet-xcmp-queue/std", "cumulus-pallet-xcm/std", diff --git a/cumulus/rococo-parachains/runtime/src/lib.rs b/cumulus/rococo-parachains/runtime/src/lib.rs index 62bb16effb..5efce117ff 100644 --- a/cumulus/rococo-parachains/runtime/src/lib.rs +++ b/cumulus/rococo-parachains/runtime/src/lib.rs @@ -39,7 +39,7 @@ use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. pub use frame_support::{ construct_runtime, parameter_types, match_type, - traits::{Randomness, IsInVec, All}, + traits::{Randomness, IsInVec}, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, DispatchClass, IdentityFee, Weight, @@ -65,6 +65,8 @@ use xcm_builder::{ }; use xcm_executor::{Config, XcmExecutor}; use pallet_xcm::{XcmPassthrough, EnsureXcm, IsMajorityOfBody}; +use xcm::v0::Xcm; +use frame_support::traits::Contains; pub type SessionHandlers = (); @@ -77,7 +79,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("test-parachain"), impl_name: create_runtime_str!("test-parachain"), authoring_version: 1, - spec_version: 9, + spec_version: 11, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -230,14 +232,16 @@ impl pallet_sudo::Config for Runtime { parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; } impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; type OnValidationData = (); type SelfParaId = parachain_info::Module; - type DownwardMessageHandlers = CumulusXcm; type OutboundXcmpMessageSource = XcmpQueue; + type DmpMessageHandler = DmpQueue; + type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; } @@ -335,10 +339,6 @@ impl Config for XcmConfig { type ResponseHandler = (); // Don't handle responses for now. } -parameter_types! { - pub const MaxDownwardMessageWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 10; -} - /// No local origins on this chain are allowed to dispatch XCM sends/executions. pub type LocalOriginToLocation = (); @@ -351,19 +351,25 @@ pub type XcmRouter = ( XcmpQueue, ); +// TODO: Remove to frame_support::traits::All once substrate/8691 merged and bumped +/// A `Contains` implementation which always returns `true`. +pub struct All(sp_std::marker::PhantomData); +impl Contains for All { + fn contains(_: &T) -> bool { true } +} + impl pallet_xcm::Config for Runtime { type Event = Event; type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; type ExecuteXcmOrigin = EnsureXcmOrigin; - type XcmExecuteFilter = All<(MultiLocation, xcm::v0::Xcm)>; + type XcmExecuteFilter = All<(MultiLocation, Xcm)>; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_xcm::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; - type MaxWeight = MaxDownwardMessageWeight; } impl cumulus_pallet_xcmp_queue::Config for Runtime { @@ -372,6 +378,12 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; } +impl cumulus_pallet_dmp_queue::Config for Runtime { + type Event = Event; + type XcmExecutor = XcmExecutor; + type ExecuteOverweightOrigin = frame_system::EnsureRoot; +} + impl cumulus_ping::Config for Runtime { type Event = Event; type Origin = Origin; @@ -407,6 +419,16 @@ impl pallet_assets::Config for Runtime { type WeightInfo = pallet_assets::weights::SubstrateWeight; } +#[test] +fn encode_call() { + let hash = hex_literal::hex!["0af9fef6f950ca3ac8ac4766200454b1039ffb7b2d0827fffd5e47bd43761437"].into(); + let call = Call::ParachainSystem(cumulus_pallet_parachain_system::Call::authorize_upgrade(hash)); + assert_eq!( + hex::encode(codec::Encode::encode(&call)), + "14030af9fef6f950ca3ac8ac4766200454b1039ffb7b2d0827fffd5e47bd43761437", + ); +} + construct_runtime! { pub enum Runtime where Block = Block, @@ -419,7 +441,7 @@ construct_runtime! { RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Call, Storage}, TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, - ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Storage, Inherent, Event} = 20, + ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Storage, Inherent, Event, ValidateUnsigned} = 20, ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 30, @@ -429,6 +451,7 @@ construct_runtime! { XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 50, PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin} = 51, CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event, Origin} = 52, + DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 53, Spambot: cumulus_ping::{Pallet, Call, Storage, Event} = 99, } diff --git a/cumulus/rococo-parachains/shell-runtime/Cargo.toml b/cumulus/rococo-parachains/shell-runtime/Cargo.toml index 0bf45acd0d..c779c7b287 100644 --- a/cumulus/rococo-parachains/shell-runtime/Cargo.toml +++ b/cumulus/rococo-parachains/shell-runtime/Cargo.toml @@ -32,7 +32,7 @@ frame-system = { git = "https://github.com/paritytech/substrate", default-featur cumulus-pallet-parachain-system = { path = "../../pallets/parachain-system", default-features = false } cumulus-primitives-core = { path = "../../primitives/core", default-features = false } cumulus-primitives-utility = { path = "../../primitives/utility", default-features = false } -cumulus-pallet-xcmp-queue = { path = "../../pallets/xcmp-queue", default-features = false } +cumulus-pallet-dmp-queue = { path = "../../pallets/dmp-queue", default-features = false } cumulus-pallet-xcm = { path = "../../pallets/xcm", default-features = false } # Polkadot dependencies @@ -71,7 +71,7 @@ std = [ "parachain-info/std", "rococo-parachain-primitives/std", "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcmp-queue/std", + "cumulus-pallet-dmp-queue/std", "cumulus-pallet-xcm/std", "cumulus-primitives-core/std", "cumulus-primitives-utility/std", diff --git a/cumulus/rococo-parachains/shell-runtime/src/lib.rs b/cumulus/rococo-parachains/shell-runtime/src/lib.rs index 38396508f5..915adb9d01 100644 --- a/cumulus/rococo-parachains/shell-runtime/src/lib.rs +++ b/cumulus/rococo-parachains/shell-runtime/src/lib.rs @@ -155,15 +155,16 @@ impl frame_system::Config for Runtime { parameter_types! { // We do anything the parent chain tells us in this runtime. - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT; + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 2; } impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; type OnValidationData = (); type SelfParaId = parachain_info::Module; - type DownwardMessageHandlers = CumulusXcm; type OutboundXcmpMessageSource = (); + type DmpMessageHandler = cumulus_pallet_xcm::UnlimitedDmpExecution; + type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = (); type ReservedXcmpWeight = (); } @@ -198,16 +199,6 @@ parameter_types! { pub UnitWeightCost: Weight = 1_000_000; } -pub struct NoTrader; -impl xcm_executor::traits::WeightTrader for NoTrader { - fn new() -> Self { NoTrader } - fn buy_weight(&mut self, _: Weight, _: xcm_executor::Assets) - -> Result - { - Err(xcm::v0::Error::Unimplemented) - } -} - pub struct XcmConfig; impl Config for XcmConfig { type Call = Call; @@ -219,18 +210,23 @@ impl Config for XcmConfig { type LocationInverter = LocationInverter; type Barrier = AllowUnpaidExecutionFrom; type Weigher = FixedWeightBounds; // balances not supported - type Trader = NoTrader; // balances not supported + type Trader = (); // balances not supported type ResponseHandler = (); // Don't handle responses for now. } -parameter_types! { - pub const MaxDownwardMessageWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 2; -} - impl cumulus_pallet_xcm::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; - type MaxWeight = MaxDownwardMessageWeight; +} + +#[test] +fn encode_call() { + let hash = hex_literal::hex!["0af9fef6f950ca3ac8ac4766200454b1039ffb7b2d0827fffd5e47bd43761437"].into(); + let call = Call::ParachainSystem(cumulus_pallet_parachain_system::Call::authorize_upgrade(hash)); + assert_eq!( + hex::encode(codec::Encode::encode(&call)), + "01030af9fef6f950ca3ac8ac4766200454b1039ffb7b2d0827fffd5e47bd43761437", + ); } construct_runtime! { diff --git a/cumulus/test/runtime/src/lib.rs b/cumulus/test/runtime/src/lib.rs index 6d5bf24eee..b906552fe4 100644 --- a/cumulus/test/runtime/src/lib.rs +++ b/cumulus/test/runtime/src/lib.rs @@ -218,8 +218,9 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type SelfParaId = ParachainId; type Event = Event; type OnValidationData = (); - type DownwardMessageHandlers = (); type OutboundXcmpMessageSource = (); + type DmpMessageHandler = (); + type ReservedDmpWeight = (); type XcmpMessageHandler = (); type ReservedXcmpWeight = (); }