diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01e47746b5cf..3cb34c8664da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ variables: BUILDAH_COMMAND: "buildah --storage-driver overlay2" DOCKER_OS: "debian:stretch" ARCH: "x86_64" - ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.50" + ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.55" default: cache: {} diff --git a/Cargo.lock b/Cargo.lock index 8008b65b7acf..419654736dd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -523,7 +523,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "hash-db", "log", @@ -2516,7 +2516,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", ] @@ -2539,7 +2539,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-support-procedural", @@ -2564,7 +2564,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "Inflector", "array-bytes", @@ -2611,7 +2611,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2622,7 +2622,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2639,7 +2639,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-system", @@ -2668,7 +2668,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-recursion", "futures", @@ -2689,7 +2689,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "bitflags", "environmental", @@ -2723,7 +2723,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "Inflector", "cfg-expr", @@ -2739,7 +2739,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2751,7 +2751,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "proc-macro2", "quote", @@ -2761,7 +2761,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-executive", @@ -2787,7 +2787,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-system", @@ -2798,7 +2798,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "cfg-if", "frame-support", @@ -2817,7 +2817,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -2832,7 +2832,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "sp-api", @@ -2841,7 +2841,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "parity-scale-codec 3.4.0", @@ -3029,7 +3029,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "chrono", "frame-election-provider-support", @@ -4949,7 +4949,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "futures", "log", @@ -4968,7 +4968,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "anyhow", "jsonrpsee", @@ -5551,7 +5551,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5566,7 +5566,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-system", @@ -5582,7 +5582,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-system", @@ -5596,7 +5596,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5620,7 +5620,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5640,7 +5640,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5659,7 +5659,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5674,7 +5674,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-system", @@ -5693,7 +5693,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5717,7 +5717,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5735,7 +5735,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5754,7 +5754,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5771,7 +5771,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5788,7 +5788,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5806,7 +5806,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5829,7 +5829,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5842,7 +5842,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5860,7 +5860,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5878,7 +5878,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5901,7 +5901,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5917,7 +5917,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5937,7 +5937,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5954,7 +5954,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5971,7 +5971,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5990,7 +5990,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6007,7 +6007,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6023,7 +6023,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6039,7 +6039,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-system", @@ -6056,7 +6056,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6076,7 +6076,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "pallet-nomination-pools", "parity-scale-codec 3.4.0", @@ -6087,7 +6087,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-system", @@ -6104,7 +6104,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6128,7 +6128,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6145,7 +6145,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6160,7 +6160,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6178,7 +6178,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6193,7 +6193,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6212,7 +6212,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6229,7 +6229,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-system", @@ -6250,7 +6250,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6266,7 +6266,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-system", @@ -6280,7 +6280,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6303,7 +6303,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6314,7 +6314,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "log", "sp-arithmetic", @@ -6323,7 +6323,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "sp-api", @@ -6332,7 +6332,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6349,7 +6349,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6364,7 +6364,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6382,7 +6382,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6401,7 +6401,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-support", "frame-system", @@ -6417,7 +6417,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6433,7 +6433,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "pallet-transaction-payment", "parity-scale-codec 3.4.0", @@ -6445,7 +6445,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6462,7 +6462,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6477,7 +6477,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6493,7 +6493,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6508,7 +6508,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-benchmarking", "frame-support", @@ -9653,7 +9653,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "log", "sp-core", @@ -9664,7 +9664,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "futures", @@ -9693,7 +9693,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "futures", "futures-timer", @@ -9716,7 +9716,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "sc-client-api", @@ -9731,7 +9731,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9750,7 +9750,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9761,7 +9761,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "chrono", @@ -9801,7 +9801,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "fnv", "futures", @@ -9828,7 +9828,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "hash-db", "kvdb", @@ -9854,7 +9854,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "futures", @@ -9879,7 +9879,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "fork-tree", @@ -9915,7 +9915,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "futures", "jsonrpsee", @@ -9937,7 +9937,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "async-channel", @@ -9973,7 +9973,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "futures", "jsonrpsee", @@ -9992,7 +9992,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "fork-tree", "parity-scale-codec 3.4.0", @@ -10005,7 +10005,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -10045,7 +10045,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "finality-grandpa", "futures", @@ -10065,7 +10065,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "futures", @@ -10088,7 +10088,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "lru 0.8.1", "parity-scale-codec 3.4.0", @@ -10110,7 +10110,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -10122,7 +10122,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "anyhow", "cfg-if", @@ -10140,7 +10140,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "ansi_term", "futures", @@ -10156,7 +10156,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "parking_lot 0.12.1", @@ -10170,7 +10170,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "async-channel", @@ -10215,7 +10215,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-channel", "cid", @@ -10236,7 +10236,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "async-trait", @@ -10264,7 +10264,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "ahash 0.8.2", "futures", @@ -10283,7 +10283,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "async-channel", @@ -10306,7 +10306,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "async-channel", @@ -10341,7 +10341,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "futures", @@ -10361,7 +10361,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "bytes", @@ -10392,7 +10392,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "futures", "libp2p-identity", @@ -10408,7 +10408,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10417,7 +10417,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "futures", "jsonrpsee", @@ -10448,7 +10448,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "jsonrpsee", "parity-scale-codec 3.4.0", @@ -10467,7 +10467,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "http", "jsonrpsee", @@ -10482,7 +10482,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "futures", @@ -10508,7 +10508,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "directories", @@ -10574,7 +10574,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "log", "parity-scale-codec 3.4.0", @@ -10585,7 +10585,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "clap 4.2.5", "fs4", @@ -10601,7 +10601,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "jsonrpsee", "parity-scale-codec 3.4.0", @@ -10620,7 +10620,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "futures", "libc", @@ -10639,7 +10639,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "chrono", "futures", @@ -10658,7 +10658,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "ansi_term", "atty", @@ -10689,7 +10689,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10700,7 +10700,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "futures", @@ -10727,7 +10727,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "futures", @@ -10741,7 +10741,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-channel", "futures", @@ -11289,7 +11289,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "hash-db", "log", @@ -11309,7 +11309,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "Inflector", "blake2", @@ -11323,7 +11323,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "scale-info", @@ -11336,7 +11336,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "integer-sqrt", "num-traits", @@ -11350,7 +11350,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "scale-info", @@ -11363,7 +11363,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "sp-api", @@ -11375,7 +11375,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "futures", "log", @@ -11393,7 +11393,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "futures", @@ -11408,7 +11408,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "parity-scale-codec 3.4.0", @@ -11426,7 +11426,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "parity-scale-codec 3.4.0", @@ -11447,7 +11447,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "lazy_static", "parity-scale-codec 3.4.0", @@ -11466,7 +11466,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "finality-grandpa", "log", @@ -11484,7 +11484,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "scale-info", @@ -11496,7 +11496,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "bitflags", @@ -11540,7 +11540,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "blake2b_simd", "byteorder", @@ -11554,7 +11554,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "proc-macro2", "quote", @@ -11565,7 +11565,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11574,7 +11574,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "proc-macro2", "quote", @@ -11584,7 +11584,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "environmental", "parity-scale-codec 3.4.0", @@ -11595,7 +11595,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11610,7 +11610,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "bytes", "ed25519", @@ -11636,7 +11636,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "lazy_static", "sp-core", @@ -11647,7 +11647,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "futures", "parity-scale-codec 3.4.0", @@ -11661,7 +11661,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "thiserror", "zstd 0.12.3+zstd.1.5.2", @@ -11670,7 +11670,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-metadata", "parity-scale-codec 3.4.0", @@ -11681,7 +11681,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11699,7 +11699,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "scale-info", @@ -11713,7 +11713,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "sp-api", "sp-core", @@ -11723,7 +11723,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "backtrace", "lazy_static", @@ -11733,7 +11733,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "rustc-hash", "serde", @@ -11743,7 +11743,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "either", "hash256-std-hasher", @@ -11765,7 +11765,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11783,7 +11783,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "Inflector", "proc-macro-crate", @@ -11795,7 +11795,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "scale-info", @@ -11809,7 +11809,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "scale-info", @@ -11822,7 +11822,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "hash-db", "log", @@ -11842,7 +11842,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "log", "parity-scale-codec 3.4.0", @@ -11860,12 +11860,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "impl-serde", "parity-scale-codec 3.4.0", @@ -11878,7 +11878,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "futures-timer", @@ -11893,7 +11893,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "sp-std", @@ -11905,7 +11905,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "sp-api", "sp-runtime", @@ -11914,7 +11914,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "log", @@ -11930,7 +11930,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11953,7 +11953,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "impl-serde", "parity-scale-codec 3.4.0", @@ -11970,7 +11970,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "proc-macro2", @@ -11981,7 +11981,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11995,7 +11995,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "parity-scale-codec 3.4.0", "scale-info", @@ -12236,7 +12236,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "platforms 2.0.0", ] @@ -12244,7 +12244,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12263,7 +12263,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "hyper", "log", @@ -12275,7 +12275,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "jsonrpsee", @@ -12288,7 +12288,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "jsonrpsee", "log", @@ -12307,7 +12307,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "array-bytes", "async-trait", @@ -12333,7 +12333,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "futures", "substrate-test-utils-derive", @@ -12343,7 +12343,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12354,7 +12354,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "ansi_term", "build-helper", @@ -13198,7 +13198,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3c8666b1906680ad9461a6c46fe17439629ab082" +source = "git+https://github.com/paritytech/substrate?branch=master#79d37ef461a4bdcf6ede7b37d64b28b58484dc7c" dependencies = [ "async-trait", "clap 4.2.5", diff --git a/node/network/availability-recovery/src/tests.rs b/node/network/availability-recovery/src/tests.rs index 5a2f70149f47..b9c5abee191f 100644 --- a/node/network/availability-recovery/src/tests.rs +++ b/node/network/availability-recovery/src/tests.rs @@ -172,7 +172,9 @@ async fn overseer_signal( .send(FromOrchestra::Signal(signal)) .timeout(TIMEOUT) .await - .expect("10ms is more than enough for sending signals."); + .unwrap_or_else(|| { + panic!("{}ms is more than enough for sending signals.", TIMEOUT.as_millis()) + }); } async fn overseer_send( @@ -184,7 +186,9 @@ async fn overseer_send( .send(FromOrchestra::Communication { msg }) .timeout(TIMEOUT) .await - .expect("10ms is more than enough for sending messages."); + .unwrap_or_else(|| { + panic!("{}ms is more than enough for sending messages.", TIMEOUT.as_millis()) + }); } async fn overseer_recv( diff --git a/node/network/bitfield-distribution/src/tests.rs b/node/network/bitfield-distribution/src/tests.rs index e0185bed9802..a1579bc01fac 100644 --- a/node/network/bitfield-distribution/src/tests.rs +++ b/node/network/bitfield-distribution/src/tests.rs @@ -41,11 +41,12 @@ use sp_keystore::{testing::MemoryKeystore, Keystore, KeystorePtr}; use std::{iter::FromIterator as _, sync::Arc, time::Duration}; +const TIMEOUT: Duration = Duration::from_millis(50); macro_rules! launch { ($fut:expr) => { - $fut.timeout(Duration::from_millis(10)) - .await - .expect("10ms is more than enough for sending messages.") + $fut.timeout(TIMEOUT).await.unwrap_or_else(|| { + panic!("{}ms is more than enough for sending messages.", TIMEOUT.as_millis()) + }); }; } @@ -231,7 +232,7 @@ fn receive_invalid_signature() { )); // reputation doesn't change due to one_job_per_validator check - assert!(handle.recv().timeout(Duration::from_millis(10)).await.is_none()); + assert!(handle.recv().timeout(TIMEOUT).await.is_none()); launch!(handle_network_msg( &mut ctx, @@ -549,7 +550,7 @@ fn do_not_relay_message_twice() { ); // There shouldn't be any other message - assert!(handle.recv().timeout(Duration::from_millis(10)).await.is_none()); + assert!(handle.recv().timeout(TIMEOUT).await.is_none()); }); } diff --git a/runtime/common/src/assigned_slots.rs b/runtime/common/src/assigned_slots.rs index b2c43b0d5b3f..f2da950d0b16 100644 --- a/runtime/common/src/assigned_slots.rs +++ b/runtime/common/src/assigned_slots.rs @@ -631,7 +631,7 @@ mod tests { type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<1>; diff --git a/runtime/common/src/auctions.rs b/runtime/common/src/auctions.rs index 3b1f941b5257..05ef6ad59bf0 100644 --- a/runtime/common/src/auctions.rs +++ b/runtime/common/src/auctions.rs @@ -748,7 +748,7 @@ mod tests { type MaxLocks = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<1>; diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index e33c818dc50d..b598d2ea0ef0 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -787,7 +787,7 @@ mod tests { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<1>; diff --git a/runtime/common/src/crowdloan/mod.rs b/runtime/common/src/crowdloan/mod.rs index 49381817554f..6be608756669 100644 --- a/runtime/common/src/crowdloan/mod.rs +++ b/runtime/common/src/crowdloan/mod.rs @@ -945,7 +945,7 @@ mod tests { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<1>; diff --git a/runtime/common/src/impls.rs b/runtime/common/src/impls.rs index 89d3dcf9722b..b827b8c34103 100644 --- a/runtime/common/src/impls.rs +++ b/runtime/common/src/impls.rs @@ -186,7 +186,7 @@ mod tests { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<1>; diff --git a/runtime/common/src/integration_tests.rs b/runtime/common/src/integration_tests.rs index 30e4758d24c1..cf879e6bb182 100644 --- a/runtime/common/src/integration_tests.rs +++ b/runtime/common/src/integration_tests.rs @@ -183,7 +183,7 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/runtime/common/src/paras_registrar.rs b/runtime/common/src/paras_registrar.rs index 0dbc47ee2ae8..5ecef73fae1c 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -755,7 +755,7 @@ mod tests { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<1>; diff --git a/runtime/common/src/purchase.rs b/runtime/common/src/purchase.rs index cde9b4e3ef86..e2864b262779 100644 --- a/runtime/common/src/purchase.rs +++ b/runtime/common/src/purchase.rs @@ -553,7 +553,7 @@ mod tests { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<1>; diff --git a/runtime/common/src/slots/mod.rs b/runtime/common/src/slots/mod.rs index 162d3031855a..202062fd7ce9 100644 --- a/runtime/common/src/slots/mod.rs +++ b/runtime/common/src/slots/mod.rs @@ -568,7 +568,7 @@ mod tests { type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<1>; diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 5306187654ca..d0d146fb447b 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -306,7 +306,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = weights::pallet_balances::WeightInfo; type FreezeIdentifier = (); type MaxFreezes = (); - type HoldIdentifier = RuntimeHoldReason; + type RuntimeHoldReason = RuntimeHoldReason; type MaxHolds = ConstU32<1>; } @@ -1284,7 +1284,7 @@ impl pallet_balances::Config for Runtime { type MaxReserves = ConstU32<4>; type ReserveIdentifier = [u8; 8]; type WeightInfo = weights::pallet_balances_nis_counterpart_balances::WeightInfo; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; @@ -1299,7 +1299,6 @@ parameter_types! { pub const ThawThrottle: (Perquintill, BlockNumber) = (Perquintill::from_percent(25), 5); pub storage NisTarget: Perquintill = Perquintill::zero(); pub const NisPalletId: PalletId = PalletId(*b"py/nis "); - pub const NisHoldReason: RuntimeHoldReason = RuntimeHoldReason::Nis(pallet_nis::HoldReason::NftReceipt); } impl pallet_nis::Config for Runtime { @@ -1323,7 +1322,7 @@ impl pallet_nis::Config for Runtime { type IntakePeriod = IntakePeriod; type MaxIntakeWeight = MaxIntakeWeight; type ThawThrottle = ThawThrottle; - type HoldReason = NisHoldReason; + type RuntimeHoldReason = RuntimeHoldReason; } parameter_types! { diff --git a/runtime/kusama/src/tests.rs b/runtime/kusama/src/tests.rs index 65c1c0368f78..f126185dedbe 100644 --- a/runtime/kusama/src/tests.rs +++ b/runtime/kusama/src/tests.rs @@ -27,7 +27,7 @@ use sp_runtime::FixedPointNumber; #[test] fn nis_hold_reason_encoding_is_correct() { - assert_eq!(NisHoldReason::get().encode(), [38, 0]); + assert_eq!(RuntimeHoldReason::Nis(pallet_nis::HoldReason::NftReceipt).encode(), [38, 0]); } #[test] diff --git a/runtime/kusama/src/xcm_config.rs b/runtime/kusama/src/xcm_config.rs index 1806a06066dd..5d3b48a0aab1 100644 --- a/runtime/kusama/src/xcm_config.rs +++ b/runtime/kusama/src/xcm_config.rs @@ -41,8 +41,8 @@ use xcm_builder::{ ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, - WithComputedOrigin, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::traits::WithOriginFilter; @@ -115,14 +115,14 @@ parameter_types! { /// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our /// individual routers. -pub type XcmRouter = ( +pub type XcmRouter = WithUniqueTopic<( // Only one router so far - use DMP to communicate with child parachains. ChildParachainRouter< Runtime, XcmPallet, ExponentialPrice, >, -); +)>; parameter_types! { pub const Ksm: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); @@ -142,7 +142,7 @@ match_types! { } /// The barriers one of which must be passed for an XCM message to be executed. -pub type Barrier = ( +pub type Barrier = TrailingSetTopicAsId<( // Weight that is paid for may be consumed. TakeWeightCredit, // Expected responses are OK. @@ -159,7 +159,7 @@ pub type Barrier = ( UniversalLocation, ConstU32<8>, >, -); +)>; /// A call filter for the XCM Transact instruction. This is a temporary measure until we properly /// account for proof size weights. diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 0fc61371bdb5..2c975f682948 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -134,7 +134,7 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index d6a54ce5543c..ffe7daab5b39 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -299,7 +299,7 @@ impl pallet_balances::Config for Runtime { type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = weights::pallet_balances::WeightInfo; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 38f3a6f1e823..03567318e226 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -287,7 +287,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = weights::pallet_balances::WeightInfo; type FreezeIdentifier = (); type MaxFreezes = ConstU32<1>; - type HoldIdentifier = RuntimeHoldReason; + type RuntimeHoldReason = RuntimeHoldReason; type MaxHolds = ConstU32<1>; } @@ -1225,7 +1225,7 @@ impl pallet_balances::Config for Runtime { type MaxReserves = ConstU32<4>; type ReserveIdentifier = [u8; 8]; type WeightInfo = weights::pallet_balances_nis_counterpart_balances::WeightInfo; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; @@ -1240,7 +1240,6 @@ parameter_types! { pub const ThawThrottle: (Perquintill, BlockNumber) = (Perquintill::from_percent(25), 5); pub storage NisTarget: Perquintill = Perquintill::zero(); pub const NisPalletId: PalletId = PalletId(*b"py/nis "); - pub const NisHoldReason: RuntimeHoldReason = RuntimeHoldReason::Nis(pallet_nis::HoldReason::NftReceipt); } impl pallet_nis::Config for Runtime { @@ -1264,7 +1263,7 @@ impl pallet_nis::Config for Runtime { type IntakePeriod = IntakePeriod; type MaxIntakeWeight = MaxIntakeWeight; type ThawThrottle = ThawThrottle; - type HoldReason = NisHoldReason; + type RuntimeHoldReason = RuntimeHoldReason; } parameter_types! { @@ -1282,12 +1281,9 @@ impl pallet_beefy::Config for Runtime { pallet_beefy::EquivocationReportSystem; } -type MmrHash = ::Output; - impl pallet_mmr::Config for Runtime { const INDEXING_PREFIX: &'static [u8] = mmr::INDEXING_PREFIX; type Hashing = Keccak256; - type Hash = MmrHash; type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; type WeightInfo = (); type LeafData = pallet_beefy_mmr::Pallet; @@ -2315,7 +2311,7 @@ mod encoding_tests { #[test] fn nis_hold_reason_encoding_is_correct() { - assert_eq!(NisHoldReason::get().encode(), [38, 0]); + assert_eq!(RuntimeHoldReason::Nis(pallet_nis::HoldReason::NftReceipt).encode(), [38, 0]); } } diff --git a/runtime/rococo/src/xcm_config.rs b/runtime/rococo/src/xcm_config.rs index 4bf3cb3181ea..e0e73bf3c4a3 100644 --- a/runtime/rococo/src/xcm_config.rs +++ b/runtime/rococo/src/xcm_config.rs @@ -40,7 +40,8 @@ use xcm_builder::{ ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete, MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, - TakeWeightCredit, UsingComponents, WeightInfoBounds, WithComputedOrigin, + TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, + WithUniqueTopic, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -95,14 +96,14 @@ parameter_types! { /// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our /// individual routers. -pub type XcmRouter = ( +pub type XcmRouter = WithUniqueTopic<( // Only one router so far - use DMP to communicate with child parachains. ChildParachainRouter< Runtime, XcmPallet, ExponentialPrice, >, -); +)>; parameter_types! { pub const Roc: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) }); @@ -137,7 +138,7 @@ match_types! { } /// The barriers one of which must be passed for an XCM message to be executed. -pub type Barrier = ( +pub type Barrier = TrailingSetTopicAsId<( // Weight that is paid for may be consumed. TakeWeightCredit, // Expected responses are OK. @@ -154,7 +155,7 @@ pub type Barrier = ( UniversalLocation, ConstU32<8>, >, -); +)>; /// A call filter for the XCM Transact instruction. This is a temporary measure until we /// properly account for proof size weights. diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index cdae8b276877..767f8bda68d7 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -218,7 +218,7 @@ impl pallet_balances::Config for Runtime { type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index f29545364f65..9101fd5a8e38 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -264,7 +264,7 @@ impl pallet_balances::Config for Runtime { type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = weights::pallet_balances::WeightInfo; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/runtime/westend/src/xcm_config.rs b/runtime/westend/src/xcm_config.rs index 7e37d227a677..c3c28e8c3fe7 100644 --- a/runtime/westend/src/xcm_config.rs +++ b/runtime/westend/src/xcm_config.rs @@ -39,7 +39,7 @@ use xcm_builder::{ ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, IsConcrete, MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, WeightInfoBounds, WithComputedOrigin, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -80,14 +80,14 @@ type LocalOriginConverter = ( /// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our /// individual routers. -pub type XcmRouter = ( +pub type XcmRouter = WithUniqueTopic<( // Only one router so far - use DMP to communicate with child parachains. ChildParachainRouter< Runtime, XcmPallet, ExponentialPrice, >, -); +)>; parameter_types! { pub const Westmint: MultiLocation = Parachain(1000).into_location(); @@ -108,7 +108,7 @@ pub type TrustedTeleporters = (xcm_builder::Case, xcm_builder::Case); /// The barriers one of which must be passed for an XCM message to be executed. -pub type Barrier = ( +pub type Barrier = TrailingSetTopicAsId<( // Weight that is paid for may be consumed. TakeWeightCredit, // Expected responses are OK. @@ -125,7 +125,7 @@ pub type Barrier = ( UniversalLocation, ConstU32<8>, >, -); +)>; /// A call filter for the XCM Transact instruction. This is a temporary measure until we /// properly account for proof size weights. diff --git a/xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs b/xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs index 0a316a3f0aca..844b2f68795e 100644 --- a/xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs +++ b/xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs @@ -49,7 +49,7 @@ benchmarks_instance_pallet! { &sender_location, &XcmContext { origin: Some(sender_location.clone()), - message_hash: [0; 32], + message_id: [0; 32], topic: None, }, ).unwrap(); @@ -82,7 +82,7 @@ benchmarks_instance_pallet! { &sender_location, &XcmContext { origin: Some(sender_location.clone()), - message_hash: [0; 32], + message_id: [0; 32], topic: None, }, ).unwrap(); @@ -109,7 +109,7 @@ benchmarks_instance_pallet! { &sender_location, &XcmContext { origin: Some(sender_location.clone()), - message_hash: [0; 32], + message_id: [0; 32], topic: None, }, ).unwrap(); diff --git a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs index 15fc97544a9e..a6dd469a868f 100644 --- a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs @@ -93,7 +93,7 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs b/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs index b10c924529ba..9a4519937aea 100644 --- a/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs +++ b/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs @@ -209,7 +209,7 @@ benchmarks! { assets.clone().into(), &XcmContext { origin: Some(origin.clone()), - message_hash: [0; 32], + message_id: [0; 32], topic: None, }, ); @@ -266,7 +266,7 @@ benchmarks! { max_response_weight, &XcmContext { origin: Some(origin.clone()), - message_hash: [0; 32], + message_id: [0; 32], topic: None, }, ).map_err(|_| "Could not start subscription")?; diff --git a/xcm/pallet-xcm/src/lib.rs b/xcm/pallet-xcm/src/lib.rs index 58d363665f28..041e76b2f69f 100644 --- a/xcm/pallet-xcm/src/lib.rs +++ b/xcm/pallet-xcm/src/lib.rs @@ -40,7 +40,7 @@ use sp_runtime::{ }; use sp_std::{boxed::Box, marker::PhantomData, prelude::*, result::Result, vec}; use xcm::{latest::QueryResponseInfo, prelude::*}; -use xcm_executor::traits::{Convert, ConvertOrigin}; +use xcm_executor::traits::{Convert, ConvertOrigin, Properties}; use frame_support::{ dispatch::{Dispatchable, GetDispatchInfo}, @@ -272,52 +272,49 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// Execution of an XCM message was attempted. - /// - /// \[ outcome \] - Attempted(xcm::latest::Outcome), + Attempted { outcome: xcm::latest::Outcome }, /// A XCM message was sent. - /// - /// \[ origin, destination, message \] - Sent(MultiLocation, MultiLocation, Xcm<()>), + Sent { + origin: MultiLocation, + destination: MultiLocation, + message: Xcm<()>, + message_id: XcmHash, + }, /// Query response received which does not match a registered query. This may be because a /// matching query was never registered, it may be because it is a duplicate response, or /// because the query timed out. - /// - /// \[ origin location, id \] - UnexpectedResponse(MultiLocation, QueryId), + UnexpectedResponse { origin: MultiLocation, query_id: QueryId }, /// Query response has been received and is ready for taking with `take_response`. There is /// no registered notification call. - /// - /// \[ id, response \] - ResponseReady(QueryId, Response), + ResponseReady { query_id: QueryId, response: Response }, /// Query response has been received and query is removed. The registered notification has /// been dispatched and executed successfully. - /// - /// \[ id, pallet index, call index \] - Notified(QueryId, u8, u8), + Notified { query_id: QueryId, pallet_index: u8, call_index: u8 }, /// Query response has been received and query is removed. The registered notification could /// not be dispatched because the dispatch weight is greater than the maximum weight /// originally budgeted by this runtime for the query result. - /// - /// \[ id, pallet index, call index, actual weight, max budgeted weight \] - NotifyOverweight(QueryId, u8, u8, Weight, Weight), + NotifyOverweight { + query_id: QueryId, + pallet_index: u8, + call_index: u8, + actual_weight: Weight, + max_budgeted_weight: Weight, + }, /// Query response has been received and query is removed. There was a general error with /// dispatching the notification call. - /// - /// \[ id, pallet index, call index \] - NotifyDispatchError(QueryId, u8, u8), + NotifyDispatchError { query_id: QueryId, pallet_index: u8, call_index: u8 }, /// Query response has been received and query is removed. The dispatch was unable to be /// decoded into a `Call`; this might be due to dispatch function having a signature which /// is not `(origin, QueryId, Response)`. - /// - /// \[ id, pallet index, call index \] - NotifyDecodeFailed(QueryId, u8, u8), + NotifyDecodeFailed { query_id: QueryId, pallet_index: u8, call_index: u8 }, /// Expected query response has been received but the origin location of the response does /// not match that expected. The query remains registered for a later, valid, response to /// be received and acted upon. - /// - /// \[ origin location, id, expected location \] - InvalidResponder(MultiLocation, QueryId, Option), + InvalidResponder { + origin: MultiLocation, + query_id: QueryId, + expected_location: Option, + }, /// Expected query response has been received but the expected origin location placed in /// storage by this runtime previously cannot be decoded. The query remains registered. /// @@ -325,38 +322,29 @@ pub mod pallet { /// runtime should be readable prior to query timeout) and dangerous since the possibly /// valid response will be dropped. Manual governance intervention is probably going to be /// needed. - /// - /// \[ origin location, id \] - InvalidResponderVersion(MultiLocation, QueryId), + InvalidResponderVersion { origin: MultiLocation, query_id: QueryId }, /// Received query response has been read and removed. - /// - /// \[ id \] - ResponseTaken(QueryId), + ResponseTaken { query_id: QueryId }, /// Some assets have been placed in an asset trap. - /// - /// \[ hash, origin, assets \] - AssetsTrapped(H256, MultiLocation, VersionedMultiAssets), + AssetsTrapped { hash: H256, origin: MultiLocation, assets: VersionedMultiAssets }, /// An XCM version change notification message has been attempted to be sent. /// /// The cost of sending it (borne by the chain) is included. - /// - /// \[ destination, result, cost \] - VersionChangeNotified(MultiLocation, XcmVersion, MultiAssets), + VersionChangeNotified { + destination: MultiLocation, + result: XcmVersion, + cost: MultiAssets, + message_id: XcmHash, + }, /// The supported version of a location has been changed. This might be through an /// automatic notification or a manual intervention. - /// - /// \[ location, XCM version \] - SupportedVersionChanged(MultiLocation, XcmVersion), + SupportedVersionChanged { location: MultiLocation, version: XcmVersion }, /// A given location which had a version change subscription was dropped owing to an error /// sending the notification to it. - /// - /// \[ location, query ID, error \] - NotifyTargetSendFail(MultiLocation, QueryId, XcmError), + NotifyTargetSendFail { location: MultiLocation, query_id: QueryId, error: XcmError }, /// A given location which had a version change subscription was dropped owing to an error /// migrating the location to our new XCM format. - /// - /// \[ location, query ID \] - NotifyTargetMigrationFail(VersionedMultiLocation, QueryId), + NotifyTargetMigrationFail { location: VersionedMultiLocation, query_id: QueryId }, /// Expected query response has been received but the expected querier location placed in /// storage by this runtime previously cannot be decoded. The query remains registered. /// @@ -364,36 +352,35 @@ pub mod pallet { /// runtime should be readable prior to query timeout) and dangerous since the possibly /// valid response will be dropped. Manual governance intervention is probably going to be /// needed. - /// - /// \[ origin location, id \] - InvalidQuerierVersion(MultiLocation, QueryId), + InvalidQuerierVersion { origin: MultiLocation, query_id: QueryId }, /// Expected query response has been received but the querier location of the response does /// not match the expected. The query remains registered for a later, valid, response to /// be received and acted upon. - /// - /// \[ origin location, id, expected querier, maybe actual querier \] - InvalidQuerier(MultiLocation, QueryId, MultiLocation, Option), + InvalidQuerier { + origin: MultiLocation, + query_id: QueryId, + expected_querier: MultiLocation, + maybe_actual_querier: Option, + }, /// A remote has requested XCM version change notification from us and we have honored it. /// A version information message is sent to them and its cost is included. - /// - /// \[ destination location, cost \] - VersionNotifyStarted(MultiLocation, MultiAssets), - /// We have requested that a remote chain sends us XCM version change notifications. - /// - /// \[ destination location, cost \] - VersionNotifyRequested(MultiLocation, MultiAssets), + VersionNotifyStarted { destination: MultiLocation, cost: MultiAssets, message_id: XcmHash }, + /// We have requested that a remote chain send us XCM version change notifications. + VersionNotifyRequested { + destination: MultiLocation, + cost: MultiAssets, + message_id: XcmHash, + }, /// We have requested that a remote chain stops sending us XCM version change notifications. - /// - /// \[ destination location, cost \] - VersionNotifyUnrequested(MultiLocation, MultiAssets), + VersionNotifyUnrequested { + destination: MultiLocation, + cost: MultiAssets, + message_id: XcmHash, + }, /// Fees were paid from a location for an operation (often for using `SendXcm`). - /// - /// \[ paying location, fees \] - FeesPaid(MultiLocation, MultiAssets), + FeesPaid { paying: MultiLocation, fees: MultiAssets }, /// Some assets have been claimed from an asset trap - /// - /// \[ hash, origin, assets \] - AssetsClaimed(H256, MultiLocation, VersionedMultiAssets), + AssetsClaimed { hash: H256, origin: MultiLocation, assets: VersionedMultiAssets }, } #[pallet::origin] @@ -793,8 +780,10 @@ pub mod pallet { let dest = MultiLocation::try_from(*dest).map_err(|()| Error::::BadVersion)?; let message: Xcm<()> = (*message).try_into().map_err(|()| Error::::BadVersion)?; - Self::send_xcm(interior, dest, message.clone()).map_err(Error::::from)?; - Self::deposit_event(Event::Sent(origin_location, dest, message)); + let message_id = + Self::send_xcm(interior, dest, message.clone()).map_err(Error::::from)?; + let e = Event::Sent { origin: origin_location, destination: dest, message, message_id }; + Self::deposit_event(e); Ok(()) } @@ -927,7 +916,7 @@ pub mod pallet { ); let result = Ok(Some(outcome.weight_used().saturating_add(T::WeightInfo::execute())).into()); - Self::deposit_event(Event::Attempted(outcome)); + Self::deposit_event(Event::Attempted { outcome }); result } @@ -942,16 +931,16 @@ pub mod pallet { pub fn force_xcm_version( origin: OriginFor, location: Box, - xcm_version: XcmVersion, + version: XcmVersion, ) -> DispatchResult { T::AdminOrigin::ensure_origin(origin)?; let location = *location; SupportedVersion::::insert( XCM_VERSION, LatestVersionedMultiLocation(&location), - xcm_version, + version, ); - Self::deposit_event(Event::SupportedVersionChanged(location, xcm_version)); + Self::deposit_event(Event::SupportedVersionChanged { location, version }); Ok(()) } @@ -1195,7 +1184,7 @@ impl Pallet { let hash = message.using_encoded(sp_io::hashing::blake2_256); let outcome = T::XcmExecutor::execute_xcm_in_credit(origin_location, message, hash, weight, weight); - Self::deposit_event(Event::Attempted(outcome)); + Self::deposit_event(Event::Attempted { outcome }); Ok(()) } @@ -1256,7 +1245,7 @@ impl Pallet { let hash = message.using_encoded(sp_io::hashing::blake2_256); let outcome = T::XcmExecutor::execute_xcm_in_credit(origin_location, message, hash, weight, weight); - Self::deposit_event(Event::Attempted(outcome)); + Self::deposit_event(Event::Attempted { outcome }); Ok(()) } @@ -1331,14 +1320,19 @@ impl Pallet { let message = Xcm(vec![QueryResponse { query_id, response, max_weight, querier: None }]); let event = match send_xcm::(new_key, message) { - Ok((_hash, cost)) => { + Ok((message_id, cost)) => { let value = (query_id, max_weight, xcm_version); VersionNotifyTargets::::insert(XCM_VERSION, key, value); - Event::VersionChangeNotified(new_key, xcm_version, cost) + Event::VersionChangeNotified { + destination: new_key, + result: xcm_version, + cost, + message_id, + } }, Err(e) => { VersionNotifyTargets::::remove(XCM_VERSION, key); - Event::NotifyTargetSendFail(new_key, query_id, e.into()) + Event::NotifyTargetSendFail { location: new_key, query_id, error: e.into() } }, }; Self::deposit_event(event); @@ -1357,7 +1351,10 @@ impl Pallet { let new_key = match MultiLocation::try_from(old_key.clone()) { Ok(k) => k, Err(()) => { - Self::deposit_event(Event::NotifyTargetMigrationFail(old_key, value.0)); + Self::deposit_event(Event::NotifyTargetMigrationFail { + location: old_key, + query_id: value.0, + }); weight_used.saturating_accrue(vnt_migrate_fail_weight); if weight_used.any_gte(weight_cutoff) { return (weight_used, Some(stage)) @@ -1380,15 +1377,24 @@ impl Pallet { querier: None, }]); let event = match send_xcm::(new_key, message) { - Ok((_hash, cost)) => { + Ok((message_id, cost)) => { VersionNotifyTargets::::insert( XCM_VERSION, versioned_key, (query_id, max_weight, xcm_version), ); - Event::VersionChangeNotified(new_key, xcm_version, cost) + Event::VersionChangeNotified { + destination: new_key, + result: xcm_version, + cost, + message_id, + } + }, + Err(e) => Event::NotifyTargetSendFail { + location: new_key, + query_id, + error: e.into(), }, - Err(e) => Event::NotifyTargetSendFail(new_key, query_id, e.into()), }; Self::deposit_event(event); weight_used.saturating_accrue(vnt_notify_migrate_weight); @@ -1415,8 +1421,8 @@ impl Pallet { }); // TODO #3735: Correct weight. let instruction = SubscribeVersion { query_id, max_response_weight: Weight::zero() }; - let (_hash, cost) = send_xcm::(dest, Xcm(vec![instruction]))?; - Self::deposit_event(Event::VersionNotifyRequested(dest, cost)); + let (message_id, cost) = send_xcm::(dest, Xcm(vec![instruction]))?; + Self::deposit_event(Event::VersionNotifyRequested { destination: dest, cost, message_id }); VersionNotifiers::::insert(XCM_VERSION, &versioned_dest, query_id); let query_status = QueryStatus::VersionNotifier { origin: versioned_dest, is_active: false }; @@ -1430,8 +1436,12 @@ impl Pallet { let versioned_dest = LatestVersionedMultiLocation(&dest); let query_id = VersionNotifiers::::take(XCM_VERSION, versioned_dest) .ok_or(XcmError::InvalidLocation)?; - let (_hash, cost) = send_xcm::(dest, Xcm(vec![UnsubscribeVersion]))?; - Self::deposit_event(Event::VersionNotifyUnrequested(dest, cost)); + let (message_id, cost) = send_xcm::(dest, Xcm(vec![UnsubscribeVersion]))?; + Self::deposit_event(Event::VersionNotifyUnrequested { + destination: dest, + cost, + message_id, + }); Queries::::remove(query_id); Ok(()) } @@ -1589,7 +1599,7 @@ impl Pallet { if let Some(QueryStatus::Ready { response, at }) = Queries::::get(query_id) { let response = response.try_into().ok()?; Queries::::remove(query_id); - Self::deposit_event(Event::ResponseTaken(query_id)); + Self::deposit_event(Event::ResponseTaken { query_id }); Some((response, at)) } else { None @@ -1623,7 +1633,7 @@ impl Pallet { fn charge_fees(location: MultiLocation, assets: MultiAssets) -> DispatchResult { T::XcmExecutor::charge_fees(location, assets.clone()) .map_err(|_| Error::::FeesNotMet)?; - Self::deposit_event(Event::FeesPaid(location, assets)); + Self::deposit_event(Event::FeesPaid { paying: location, fees: assets }); Ok(()) } } @@ -1861,8 +1871,12 @@ impl VersionChangeNotifier for Pallet { let xcm_version = T::AdvertisedXcmVersion::get(); let response = Response::Version(xcm_version); let instruction = QueryResponse { query_id, response, max_weight, querier: None }; - let (_hash, cost) = send_xcm::(*dest, Xcm(vec![instruction]))?; - Self::deposit_event(Event::::VersionNotifyStarted(*dest, cost)); + let (message_id, cost) = send_xcm::(*dest, Xcm(vec![instruction]))?; + Self::deposit_event(Event::::VersionNotifyStarted { + destination: *dest, + cost, + message_id, + }); let value = (query_id, max_weight, xcm_version); VersionNotifyTargets::::insert(XCM_VERSION, versioned_dest, value); @@ -1891,7 +1905,7 @@ impl DropAssets for Pallet { let versioned = VersionedMultiAssets::from(MultiAssets::from(assets)); let hash = BlakeTwo256::hash_of(&(&origin, &versioned)); AssetTraps::::mutate(hash, |n| *n += 1); - Self::deposit_event(Event::AssetsTrapped(hash, *origin, versioned)); + Self::deposit_event(Event::AssetsTrapped { hash, origin: *origin, assets: versioned }); // TODO #3735: Put the real weight in there. Weight::zero() } @@ -1920,7 +1934,7 @@ impl ClaimAssets for Pallet { 1 => AssetTraps::::remove(hash), n => AssetTraps::::insert(hash, n - 1), } - Self::deposit_event(Event::AssetsClaimed(hash, *origin, versioned)); + Self::deposit_event(Event::AssetsClaimed { hash, origin: *origin, assets: versioned }); return true } } @@ -1953,19 +1967,28 @@ impl OnResponse for Pallet { max_weight: Weight, _context: &XcmContext, ) -> Weight { + let origin = *origin; match (response, Queries::::get(query_id)) { ( Response::Version(v), Some(QueryStatus::VersionNotifier { origin: expected_origin, is_active }), ) => { let origin: MultiLocation = match expected_origin.try_into() { - Ok(o) if &o == origin => o, + Ok(o) if o == origin => o, Ok(o) => { - Self::deposit_event(Event::InvalidResponder(*origin, query_id, Some(o))); + Self::deposit_event(Event::InvalidResponder { + origin, + query_id, + expected_location: Some(o), + }); return Weight::zero() }, _ => { - Self::deposit_event(Event::InvalidResponder(*origin, query_id, None)); + Self::deposit_event(Event::InvalidResponder { + origin, + query_id, + expected_location: None, + }); // TODO #3735: Correct weight for this. return Weight::zero() }, @@ -1983,7 +2006,10 @@ impl OnResponse for Pallet { LatestVersionedMultiLocation(&origin), v, ); - Self::deposit_event(Event::SupportedVersionChanged(origin, v)); + Self::deposit_event(Event::SupportedVersionChanged { + location: origin, + version: v, + }); Weight::zero() }, ( @@ -1994,33 +2020,33 @@ impl OnResponse for Pallet { let match_querier = match MultiLocation::try_from(match_querier) { Ok(mq) => mq, Err(_) => { - Self::deposit_event(Event::InvalidQuerierVersion(*origin, query_id)); + Self::deposit_event(Event::InvalidQuerierVersion { origin, query_id }); return Weight::zero() }, }; if querier.map_or(true, |q| q != &match_querier) { - Self::deposit_event(Event::InvalidQuerier( - *origin, + Self::deposit_event(Event::InvalidQuerier { + origin, query_id, - match_querier, - querier.cloned(), - )); + expected_querier: match_querier, + maybe_actual_querier: querier.cloned(), + }); return Weight::zero() } } let responder = match MultiLocation::try_from(responder) { Ok(r) => r, Err(_) => { - Self::deposit_event(Event::InvalidResponderVersion(*origin, query_id)); + Self::deposit_event(Event::InvalidResponderVersion { origin, query_id }); return Weight::zero() }, }; - if origin != &responder { - Self::deposit_event(Event::InvalidResponder( - *origin, + if origin != responder { + Self::deposit_event(Event::InvalidResponder { + origin, query_id, - Some(responder), - )); + expected_location: Some(responder), + }); return Weight::zero() } return match maybe_notify { @@ -2035,29 +2061,29 @@ impl OnResponse for Pallet { Queries::::remove(query_id); let weight = call.get_dispatch_info().weight; if weight.any_gt(max_weight) { - let e = Event::NotifyOverweight( + let e = Event::NotifyOverweight { query_id, pallet_index, call_index, - weight, - max_weight, - ); + actual_weight: weight, + max_budgeted_weight: max_weight, + }; Self::deposit_event(e); return Weight::zero() } - let dispatch_origin = Origin::Response(*origin).into(); + let dispatch_origin = Origin::Response(origin).into(); match call.dispatch(dispatch_origin) { Ok(post_info) => { - let e = Event::Notified(query_id, pallet_index, call_index); + let e = Event::Notified { query_id, pallet_index, call_index }; Self::deposit_event(e); post_info.actual_weight }, Err(error_and_info) => { - let e = Event::NotifyDispatchError( + let e = Event::NotifyDispatchError { query_id, pallet_index, call_index, - ); + }; Self::deposit_event(e); // Not much to do with the result as it is. It's up to the parachain to ensure that the // message makes sense. @@ -2066,13 +2092,14 @@ impl OnResponse for Pallet { } .unwrap_or(weight) } else { - let e = Event::NotifyDecodeFailed(query_id, pallet_index, call_index); + let e = + Event::NotifyDecodeFailed { query_id, pallet_index, call_index }; Self::deposit_event(e); Weight::zero() } }, None => { - let e = Event::ResponseReady(query_id, response.clone()); + let e = Event::ResponseReady { query_id, response: response.clone() }; Self::deposit_event(e); let at = frame_system::Pallet::::current_block_number(); let response = response.into(); @@ -2082,7 +2109,8 @@ impl OnResponse for Pallet { } }, _ => { - Self::deposit_event(Event::UnexpectedResponse(*origin, query_id)); + let e = Event::UnexpectedResponse { origin, query_id }; + Self::deposit_event(e); Weight::zero() }, } @@ -2094,7 +2122,7 @@ impl CheckSuspension for Pallet { _origin: &MultiLocation, _instructions: &mut [Instruction], _max_weight: Weight, - _weight_credit: &mut Weight, + _properties: &mut Properties, ) -> bool { XcmExecutionSuspended::::get() } diff --git a/xcm/pallet-xcm/src/mock.rs b/xcm/pallet-xcm/src/mock.rs index 30ad6457986b..de3f8d4957a3 100644 --- a/xcm/pallet-xcm/src/mock.rs +++ b/xcm/pallet-xcm/src/mock.rs @@ -243,7 +243,7 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/xcm/pallet-xcm/src/tests.rs b/xcm/pallet-xcm/src/tests.rs index ae359116e023..6415fe03d895 100644 --- a/xcm/pallet-xcm/src/tests.rs +++ b/xcm/pallet-xcm/src/tests.rs @@ -27,7 +27,10 @@ use polkadot_parachain::primitives::Id as ParaId; use sp_runtime::traits::{AccountIdConversion, BlakeTwo256, Hash}; use xcm::{latest::QueryResponseInfo, prelude::*}; use xcm_builder::AllowKnownQueryResponses; -use xcm_executor::{traits::ShouldExecute, XcmExecutor}; +use xcm_executor::{ + traits::{Properties, ShouldExecute}, + XcmExecutor, +}; const ALICE: AccountId = AccountId::new([0u8; 32]); const BOB: AccountId = AccountId::new([1u8; 32]); @@ -101,7 +104,11 @@ fn report_outcome_notify_works() { 0, Response::ExecutionResult(None), )), - RuntimeEvent::XcmPallet(crate::Event::Notified(0, 4, 2)), + RuntimeEvent::XcmPallet(crate::Event::Notified { + query_id: 0, + pallet_index: 4, + call_index: 2 + }), ] ); assert_eq!(crate::Queries::::iter().collect::>(), vec![]); @@ -157,10 +164,10 @@ fn report_outcome_works() { assert_eq!(r, Outcome::Complete(Weight::from_parts(1_000, 1_000))); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::ResponseReady( - 0, - Response::ExecutionResult(None), - )) + RuntimeEvent::XcmPallet(crate::Event::ResponseReady { + query_id: 0, + response: Response::ExecutionResult(None), + }) ); let response = Some((Response::ExecutionResult(None), 1)); @@ -206,12 +213,12 @@ fn custom_querier_works() { assert_eq!(r, Outcome::Complete(Weight::from_parts(1_000, 1_000))); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::InvalidQuerier( - AccountId32 { network: None, id: ALICE.into() }.into(), - 0, - querier.clone(), - None, - )), + RuntimeEvent::XcmPallet(crate::Event::InvalidQuerier { + origin: AccountId32 { network: None, id: ALICE.into() }.into(), + query_id: 0, + expected_querier: querier.clone(), + maybe_actual_querier: None, + }), ); // Supplying the wrong querier will also fail @@ -232,12 +239,12 @@ fn custom_querier_works() { assert_eq!(r, Outcome::Complete(Weight::from_parts(1_000, 1_000))); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::InvalidQuerier( - AccountId32 { network: None, id: ALICE.into() }.into(), - 0, - querier.clone(), - Some(MultiLocation::here()), - )), + RuntimeEvent::XcmPallet(crate::Event::InvalidQuerier { + origin: AccountId32 { network: None, id: ALICE.into() }.into(), + query_id: 0, + expected_querier: querier.clone(), + maybe_actual_querier: Some(MultiLocation::here()), + }), ); // Multiple failures should not have changed the query state @@ -257,10 +264,10 @@ fn custom_querier_works() { assert_eq!(r, Outcome::Complete(Weight::from_parts(1_000, 1_000))); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::ResponseReady( - 0, - Response::ExecutionResult(None), - )) + RuntimeEvent::XcmPallet(crate::Event::ResponseReady { + query_id: 0, + response: Response::ExecutionResult(None), + }) ); let response = Some((Response::ExecutionResult(None), 1)); @@ -285,6 +292,7 @@ fn send_works() { buy_execution((Parent, SEND_AMOUNT)), DepositAsset { assets: AllCounted(1).into(), beneficiary: sender.clone() }, ]); + let versioned_dest = Box::new(RelayLocation::get().into()); let versioned_message = Box::new(VersionedXcm::from(message.clone())); assert_ok!(XcmPallet::send( @@ -292,19 +300,20 @@ fn send_works() { versioned_dest, versioned_message )); - assert_eq!( - sent_xcm(), - vec![( - Here.into(), - Xcm(Some(DescendOrigin(sender.clone().try_into().unwrap())) - .into_iter() - .chain(message.0.clone().into_iter()) - .collect()) - )], - ); + let sent_message = Xcm(Some(DescendOrigin(sender.clone().try_into().unwrap())) + .into_iter() + .chain(message.0.clone().into_iter()) + .collect()); + let id = fake_message_hash(&sent_message); + assert_eq!(sent_xcm(), vec![(Here.into(), sent_message)]); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::Sent(sender, RelayLocation::get(), message)) + RuntimeEvent::XcmPallet(crate::Event::Sent { + origin: sender, + destination: RelayLocation::get(), + message, + message_id: id, + }) ); }); } @@ -376,7 +385,7 @@ fn teleport_assets_works() { let _check_v2_ok: xcm::v2::Xcm<()> = versioned_sent.try_into().unwrap(); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted { outcome: Outcome::Complete(weight) }) ); }); } @@ -420,7 +429,7 @@ fn limited_teleport_assets_works() { let _check_v2_ok: xcm::v2::Xcm<()> = versioned_sent.try_into().unwrap(); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted { outcome: Outcome::Complete(weight) }) ); }); } @@ -462,7 +471,7 @@ fn unlimited_teleport_assets_works() { ); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted { outcome: Outcome::Complete(weight) }) ); }); } @@ -509,7 +518,7 @@ fn reserve_transfer_assets_works() { let _check_v2_ok: xcm::v2::Xcm<()> = versioned_sent.try_into().unwrap(); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted { outcome: Outcome::Complete(weight) }) ); }); } @@ -557,7 +566,7 @@ fn limited_reserve_transfer_assets_works() { let _check_v2_ok: xcm::v2::Xcm<()> = versioned_sent.try_into().unwrap(); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted { outcome: Outcome::Complete(weight) }) ); }); } @@ -603,7 +612,7 @@ fn unlimited_reserve_transfer_assets_works() { ); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted { outcome: Outcome::Complete(weight) }) ); }); } @@ -635,7 +644,7 @@ fn execute_withdraw_to_deposit_works() { assert_eq!(Balances::total_balance(&BOB), SEND_AMOUNT); assert_eq!( last_event(), - RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted { outcome: Outcome::Complete(weight) }) ); }); } @@ -670,10 +679,14 @@ fn trapped_assets_can_be_claimed() { assert_eq!( last_events(2), vec![ - RuntimeEvent::XcmPallet(crate::Event::AssetsTrapped(hash.clone(), source, vma)), - RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete( - BaseXcmWeight::get() * 5 - ))) + RuntimeEvent::XcmPallet(crate::Event::AssetsTrapped { + hash: hash.clone(), + origin: source, + assets: vma + }), + RuntimeEvent::XcmPallet(crate::Event::Attempted { + outcome: Outcome::Complete(BaseXcmWeight::get() * 5) + }), ] ); assert_eq!(Balances::total_balance(&ALICE), INITIAL_BALANCE - SEND_AMOUNT); @@ -707,13 +720,8 @@ fn trapped_assets_can_be_claimed() { ]))), weight )); - assert_eq!( - last_event(), - RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Incomplete( - BaseXcmWeight::get(), - XcmError::UnknownClaim - ))) - ); + let outcome = Outcome::Incomplete(BaseXcmWeight::get(), XcmError::UnknownClaim); + assert_eq!(last_event(), RuntimeEvent::XcmPallet(crate::Event::Attempted { outcome })); }); } @@ -768,7 +776,7 @@ fn basic_subscription_works() { &remote, message.inner_mut(), weight, - &mut Weight::zero(), + &mut Properties { weight_credit: Weight::zero(), message_id: None }, )); }); } diff --git a/xcm/src/v3/mod.rs b/xcm/src/v3/mod.rs index 435998255a9c..aac0b15d33c9 100644 --- a/xcm/src/v3/mod.rs +++ b/xcm/src/v3/mod.rs @@ -184,7 +184,7 @@ pub mod prelude { NetworkId::{self, *}, OriginKind, Outcome, PalletInfo, Parent, ParentThen, PreparedMessage, QueryId, QueryResponseInfo, Response, Result as XcmResult, SendError, SendResult, SendXcm, - Unwrappable, + Unwrappable, Weight, WeightLimit::{self, *}, WildFungibility::{self, Fungible as WildFungible, NonFungible as WildNonFungible}, WildMultiAsset::{self, *}, @@ -337,19 +337,27 @@ impl TryFrom for WeightLimit { /// Contextual data pertaining to a specific list of XCM instructions. #[derive(Clone, Eq, PartialEq, Encode, Decode, Debug)] pub struct XcmContext { - /// The `MultiLocation` origin of the corresponding XCM. + /// The current value of the Origin register of the XCVM. pub origin: Option, - /// The hash of the XCM. - pub message_hash: XcmHash, - /// The topic of the XCM. + /// The identity of the XCM; this may be a hash of its versioned encoding but could also be + /// a high-level identity set by an appropriate barrier. + pub message_id: XcmHash, + /// The current value of the Topic register of the XCVM. pub topic: Option<[u8; 32]>, } impl XcmContext { - /// Constructor which sets the message hash to the supplied parameter and leaves the origin and + /// Constructor which sets the message ID to the supplied parameter and leaves the origin and /// topic unset. - pub fn with_message_hash(message_hash: XcmHash) -> XcmContext { - XcmContext { origin: None, message_hash, topic: None } + #[deprecated = "Use `with_message_id` instead."] + pub fn with_message_hash(message_id: XcmHash) -> XcmContext { + XcmContext { origin: None, message_id, topic: None } + } + + /// Constructor which sets the message ID to the supplied parameter and leaves the origin and + /// topic unset. + pub fn with_message_id(message_id: XcmHash) -> XcmContext { + XcmContext { origin: None, message_id, topic: None } } } @@ -933,7 +941,7 @@ pub enum Instruction { UnlockAsset { asset: MultiAsset, target: MultiLocation }, /// Asset (`asset`) has been locked on the `origin` system and may not be transferred. It may - /// only be unlocked with the receipt of the `UnlockAsset` instruction from this chain. + /// only be unlocked with the receipt of the `UnlockAsset` instruction from this chain. /// /// - `asset`: The asset(s) which are now unlockable from this origin. /// - `owner`: The owner of the asset on the chain in which it was locked. This may be a diff --git a/xcm/src/v3/traits.rs b/xcm/src/v3/traits.rs index b752647b0819..0482c030ee64 100644 --- a/xcm/src/v3/traits.rs +++ b/xcm/src/v3/traits.rs @@ -212,6 +212,52 @@ impl From for Error { pub type Result = result::Result<(), Error>; +/* +TODO: XCMv4 +/// Outcome of an XCM execution. +#[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo)] +pub enum Outcome { + /// Execution completed successfully; given weight was used. + Complete { used: Weight }, + /// Execution started, but did not complete successfully due to the given error; given weight + /// was used. + Incomplete { used: Weight, error: Error }, + /// Execution did not start due to the given error. + Error { error: Error }, +} + +impl Outcome { + pub fn ensure_complete(self) -> Result { + match self { + Outcome::Complete { .. } => Ok(()), + Outcome::Incomplete { error, .. } => Err(error), + Outcome::Error { error, .. } => Err(error), + } + } + pub fn ensure_execution(self) -> result::Result { + match self { + Outcome::Complete { used, .. } => Ok(used), + Outcome::Incomplete { used, .. } => Ok(used), + Outcome::Error { error, .. } => Err(error), + } + } + /// How much weight was used by the XCM execution attempt. + pub fn weight_used(&self) -> Weight { + match self { + Outcome::Complete { used, .. } => *used, + Outcome::Incomplete { used, .. } => *used, + Outcome::Error { .. } => Weight::zero(), + } + } +} + +impl From for Outcome { + fn from(error: Error) -> Self { + Self::Error { error, maybe_id: None } + } +} +*/ + /// Outcome of an XCM execution. #[derive(Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo)] pub enum Outcome { @@ -259,13 +305,34 @@ pub trait ExecuteXcm { fn execute( origin: impl Into, pre: Self::Prepared, - hash: XcmHash, + id: &mut XcmHash, weight_credit: Weight, ) -> Outcome; + fn prepare_and_execute( + origin: impl Into, + message: Xcm, + id: &mut XcmHash, + weight_limit: Weight, + weight_credit: Weight, + ) -> Outcome { + let pre = match Self::prepare(message) { + Ok(x) => x, + Err(_) => return Outcome::Error(Error::WeightNotComputable), + }; + let xcm_weight = pre.weight_of(); + if xcm_weight.any_gt(weight_limit) { + return Outcome::Error(Error::WeightLimitReached(xcm_weight)) + } + Self::execute(origin, pre, id, weight_credit) + } - /// Execute some XCM `message` with the message `hash` from `origin` using no more than `weight_limit` weight. - /// The weight limit is a basic hard-limit and the implementation may place further restrictions or requirements - /// on weight and other aspects. + /// Execute some XCM `message` with the message `hash` from `origin` using no more than + /// `weight_limit` weight. + /// + /// The weight limit is a basic hard-limit and the implementation may place further + /// restrictions or requirements on weight and other aspects. + // TODO: XCMv4 + // #[deprecated = "Use `prepare_and_execute` instead"] fn execute_xcm( origin: impl Into, message: Xcm, @@ -283,14 +350,17 @@ pub trait ExecuteXcm { Self::execute_xcm_in_credit(origin, message, hash, weight_limit, Weight::zero()) } - /// Execute some XCM `message` with the message `hash` from `origin` using no more than `weight_limit` weight. + /// Execute some XCM `message` with the message `hash` from `origin` using no more than + /// `weight_limit` weight. /// - /// Some amount of `weight_credit` may be provided which, depending on the implementation, may allow - /// execution without associated payment. + /// Some amount of `weight_credit` may be provided which, depending on the implementation, may + /// allow execution without associated payment. + // TODO: XCMv4 + // #[deprecated = "Use `prepare_and_execute` instead"] fn execute_xcm_in_credit( origin: impl Into, message: Xcm, - hash: XcmHash, + mut hash: XcmHash, weight_limit: Weight, weight_credit: Weight, ) -> Outcome { @@ -302,7 +372,7 @@ pub trait ExecuteXcm { if xcm_weight.any_gt(weight_limit) { return Outcome::Error(Error::WeightLimitReached(xcm_weight)) } - Self::execute(origin, pre, hash, weight_credit) + Self::execute(origin, pre, &mut hash, weight_credit) } /// Deduct some `fees` to the sovereign account of the given `location` and place them as per @@ -322,7 +392,12 @@ impl ExecuteXcm for () { fn prepare(message: Xcm) -> result::Result> { Err(message) } - fn execute(_: impl Into, _: Self::Prepared, _: XcmHash, _: Weight) -> Outcome { + fn execute( + _: impl Into, + _: Self::Prepared, + _: &mut XcmHash, + _: Weight, + ) -> Outcome { unreachable!() } fn charge_fees(_location: impl Into, _fees: MultiAssets) -> Result { diff --git a/xcm/xcm-builder/src/barriers.rs b/xcm/xcm-builder/src/barriers.rs index 489f91d6b659..c29dd6c685ae 100644 --- a/xcm/xcm-builder/src/barriers.rs +++ b/xcm/xcm-builder/src/barriers.rs @@ -23,16 +23,10 @@ use frame_support::{ }; use polkadot_parachain::primitives::IsSystem; use sp_std::{cell::Cell, marker::PhantomData, ops::ControlFlow, result::Result}; -use xcm::latest::{ - Instruction::{self, *}, - InteriorMultiLocation, Junction, Junctions, - Junctions::X1, - MultiLocation, Weight, - WeightLimit::*, -}; -use xcm_executor::traits::{CheckSuspension, OnResponse, ShouldExecute}; +use xcm::prelude::*; +use xcm_executor::traits::{CheckSuspension, OnResponse, Properties, ShouldExecute}; -/// Execution barrier that just takes `max_weight` from `weight_credit`. +/// Execution barrier that just takes `max_weight` from `properties.weight_credit`. /// /// Useful to allow XCM execution by local chain users via extrinsics. /// E.g. `pallet_xcm::reserve_asset_transfer` to transfer a reserve asset @@ -43,14 +37,15 @@ impl ShouldExecute for TakeWeightCredit { _origin: &MultiLocation, _instructions: &mut [Instruction], max_weight: Weight, - weight_credit: &mut Weight, + properties: &mut Properties, ) -> Result<(), ProcessMessageError> { log::trace!( target: "xcm::barriers", - "TakeWeightCredit origin: {:?}, instructions: {:?}, max_weight: {:?}, weight_credit: {:?}", - _origin, _instructions, max_weight, weight_credit, + "TakeWeightCredit origin: {:?}, instructions: {:?}, max_weight: {:?}, properties: {:?}", + _origin, _instructions, max_weight, properties, ); - *weight_credit = weight_credit + properties.weight_credit = properties + .weight_credit .checked_sub(&max_weight) .ok_or(ProcessMessageError::Overweight(max_weight))?; Ok(()) @@ -68,12 +63,12 @@ impl> ShouldExecute for AllowTopLevelPaidExecutionFro origin: &MultiLocation, instructions: &mut [Instruction], max_weight: Weight, - _weight_credit: &mut Weight, + _properties: &mut Properties, ) -> Result<(), ProcessMessageError> { log::trace!( target: "xcm::barriers", - "AllowTopLevelPaidExecutionFrom origin: {:?}, instructions: {:?}, max_weight: {:?}, weight_credit: {:?}", - origin, instructions, max_weight, _weight_credit, + "AllowTopLevelPaidExecutionFrom origin: {:?}, instructions: {:?}, max_weight: {:?}, properties: {:?}", + origin, instructions, max_weight, _properties, ); ensure!(T::contains(origin), ProcessMessageError::Unsupported); @@ -166,12 +161,12 @@ impl< origin: &MultiLocation, instructions: &mut [Instruction], max_weight: Weight, - weight_credit: &mut Weight, + properties: &mut Properties, ) -> Result<(), ProcessMessageError> { log::trace!( target: "xcm::barriers", - "WithComputedOrigin origin: {:?}, instructions: {:?}, max_weight: {:?}, weight_credit: {:?}", - origin, instructions, max_weight, weight_credit, + "WithComputedOrigin origin: {:?}, instructions: {:?}, max_weight: {:?}, properties: {:?}", + origin, instructions, max_weight, properties, ); let mut actual_origin = *origin; let skipped = Cell::new(0usize); @@ -205,11 +200,37 @@ impl< &actual_origin, &mut instructions[skipped.get()..], max_weight, - weight_credit, + properties, ) } } +/// Sets the message ID to `t` using a `SetTopic(t)` in the last position if present. +/// +/// Requires some inner barrier to pass on the rest of the message. +pub struct TrailingSetTopicAsId(PhantomData); +impl ShouldExecute for TrailingSetTopicAsId { + fn should_execute( + origin: &MultiLocation, + instructions: &mut [Instruction], + max_weight: Weight, + properties: &mut Properties, + ) -> Result<(), ProcessMessageError> { + log::trace!( + target: "xcm::barriers", + "TrailingSetTopicAsId origin: {:?}, instructions: {:?}, max_weight: {:?}, properties: {:?}", + origin, instructions, max_weight, properties, + ); + let until = if let Some(SetTopic(t)) = instructions.last() { + properties.message_id = Some(*t); + instructions.len() - 1 + } else { + instructions.len() + }; + InnerBarrier::should_execute(&origin, &mut instructions[..until], max_weight, properties) + } +} + /// Barrier condition that allows for a `SuspensionChecker` that controls whether or not the XCM /// executor will be suspended from executing the given XCM. pub struct RespectSuspension(PhantomData<(Inner, SuspensionChecker)>); @@ -222,12 +243,12 @@ where origin: &MultiLocation, instructions: &mut [Instruction], max_weight: Weight, - weight_credit: &mut Weight, + properties: &mut Properties, ) -> Result<(), ProcessMessageError> { - if SuspensionChecker::is_suspended(origin, instructions, max_weight, weight_credit) { + if SuspensionChecker::is_suspended(origin, instructions, max_weight, properties) { Err(ProcessMessageError::Yield) } else { - Inner::should_execute(origin, instructions, max_weight, weight_credit) + Inner::should_execute(origin, instructions, max_weight, properties) } } } @@ -242,12 +263,12 @@ impl> ShouldExecute for AllowUnpaidExecutionFrom { origin: &MultiLocation, instructions: &mut [Instruction], _max_weight: Weight, - _weight_credit: &mut Weight, + _properties: &mut Properties, ) -> Result<(), ProcessMessageError> { log::trace!( target: "xcm::barriers", - "AllowUnpaidExecutionFrom origin: {:?}, instructions: {:?}, max_weight: {:?}, weight_credit: {:?}", - origin, instructions, _max_weight, _weight_credit, + "AllowUnpaidExecutionFrom origin: {:?}, instructions: {:?}, max_weight: {:?}, properties: {:?}", + origin, instructions, _max_weight, _properties, ); ensure!(T::contains(origin), ProcessMessageError::Unsupported); Ok(()) @@ -264,12 +285,12 @@ impl> ShouldExecute for AllowExplicitUnpaidExecutionF origin: &MultiLocation, instructions: &mut [Instruction], max_weight: Weight, - _weight_credit: &mut Weight, + _properties: &mut Properties, ) -> Result<(), ProcessMessageError> { log::trace!( target: "xcm::barriers", - "AllowExplicitUnpaidExecutionFrom origin: {:?}, instructions: {:?}, max_weight: {:?}, weight_credit: {:?}", - origin, instructions, max_weight, _weight_credit, + "AllowExplicitUnpaidExecutionFrom origin: {:?}, instructions: {:?}, max_weight: {:?}, properties: {:?}", + origin, instructions, max_weight, _properties, ); ensure!(T::contains(origin), ProcessMessageError::Unsupported); instructions.matcher().match_next_inst(|inst| match inst { @@ -300,12 +321,12 @@ impl ShouldExecute for AllowKnownQueryResponses], _max_weight: Weight, - _weight_credit: &mut Weight, + _properties: &mut Properties, ) -> Result<(), ProcessMessageError> { log::trace!( target: "xcm::barriers", - "AllowKnownQueryResponses origin: {:?}, instructions: {:?}, max_weight: {:?}, weight_credit: {:?}", - origin, instructions, _max_weight, _weight_credit, + "AllowKnownQueryResponses origin: {:?}, instructions: {:?}, max_weight: {:?}, properties: {:?}", + origin, instructions, _max_weight, _properties, ); instructions .matcher() @@ -328,12 +349,12 @@ impl> ShouldExecute for AllowSubscriptionsFrom { origin: &MultiLocation, instructions: &mut [Instruction], _max_weight: Weight, - _weight_credit: &mut Weight, + _properties: &mut Properties, ) -> Result<(), ProcessMessageError> { log::trace!( target: "xcm::barriers", - "AllowSubscriptionsFrom origin: {:?}, instructions: {:?}, max_weight: {:?}, weight_credit: {:?}", - origin, instructions, _max_weight, _weight_credit, + "AllowSubscriptionsFrom origin: {:?}, instructions: {:?}, max_weight: {:?}, properties: {:?}", + origin, instructions, _max_weight, _properties, ); ensure!(T::contains(origin), ProcessMessageError::Unsupported); instructions @@ -346,3 +367,72 @@ impl> ShouldExecute for AllowSubscriptionsFrom { Ok(()) } } + +/// Deny executing the XCM if it matches any of the Deny filter regardless of anything else. +/// If it passes the Deny, and matches one of the Allow cases then it is let through. +pub struct DenyThenTry(PhantomData, PhantomData) +where + Deny: ShouldExecute, + Allow: ShouldExecute; + +impl ShouldExecute for DenyThenTry +where + Deny: ShouldExecute, + Allow: ShouldExecute, +{ + fn should_execute( + origin: &MultiLocation, + message: &mut [Instruction], + max_weight: Weight, + properties: &mut Properties, + ) -> Result<(), ProcessMessageError> { + Deny::should_execute(origin, message, max_weight, properties)?; + Allow::should_execute(origin, message, max_weight, properties) + } +} + +// See issue +pub struct DenyReserveTransferToRelayChain; +impl ShouldExecute for DenyReserveTransferToRelayChain { + fn should_execute( + origin: &MultiLocation, + message: &mut [Instruction], + _max_weight: Weight, + _properties: &mut Properties, + ) -> Result<(), ProcessMessageError> { + message.matcher().match_next_inst_while( + |_| true, + |inst| match inst { + InitiateReserveWithdraw { + reserve: MultiLocation { parents: 1, interior: Here }, + .. + } | + DepositReserveAsset { + dest: MultiLocation { parents: 1, interior: Here }, .. + } | + TransferReserveAsset { + dest: MultiLocation { parents: 1, interior: Here }, .. + } => { + Err(ProcessMessageError::Unsupported) // Deny + }, + + // An unexpected reserve transfer has arrived from the Relay Chain. Generally, + // `IsReserve` should not allow this, but we just log it here. + ReserveAssetDeposited { .. } + if matches!(origin, MultiLocation { parents: 1, interior: Here }) => + { + log::warn!( + target: "xcm::barrier", + "Unexpected ReserveAssetDeposited from the Relay Chain", + ); + Ok(ControlFlow::Continue(())) + }, + + _ => Ok(ControlFlow::Continue(())), + }, + )?; + + // Permit everything else + Ok(()) + } +} diff --git a/xcm/xcm-builder/src/lib.rs b/xcm/xcm-builder/src/lib.rs index 0f1753474624..9ff37209c015 100644 --- a/xcm/xcm-builder/src/lib.rs +++ b/xcm/xcm-builder/src/lib.rs @@ -50,8 +50,9 @@ pub use asset_conversion::{ConvertedAbstractAssetId, ConvertedConcreteAssetId}; mod barriers; pub use barriers::{ AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, IsChildSystemParachain, - RespectSuspension, TakeWeightCredit, WithComputedOrigin, + AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, IsChildSystemParachain, RespectSuspension, TakeWeightCredit, TrailingSetTopicAsId, + WithComputedOrigin, }; mod process_xcm_message; @@ -85,6 +86,9 @@ pub use matcher::{CreateMatcher, MatchXcm, Matcher}; mod filter_asset_location; pub use filter_asset_location::{Case, NativeAsset}; +mod routing; +pub use routing::{WithTopicSource, WithUniqueTopic}; + mod universal_exports; pub use universal_exports::{ ensure_is_remote, BridgeBlobDispatcher, BridgeMessage, DispatchBlob, DispatchBlobError, diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 4e73b11c3422..23fbb9d0cb6b 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -53,7 +53,7 @@ impl< let required = pre.weight_of(); ensure!(meter.can_accrue(required), ProcessMessageError::Overweight(required)); - let (consumed, result) = match XcmExecutor::execute(origin.into(), pre, *id, Weight::zero()) + let (consumed, result) = match XcmExecutor::execute(origin.into(), pre, id, Weight::zero()) { Outcome::Complete(w) => (w, Ok(true)), Outcome::Incomplete(w, _) => (w, Ok(false)), diff --git a/xcm/xcm-builder/src/routing.rs b/xcm/xcm-builder/src/routing.rs new file mode 100644 index 000000000000..c46e0ce78569 --- /dev/null +++ b/xcm/xcm-builder/src/routing.rs @@ -0,0 +1,102 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot 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. + +// Polkadot 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 Polkadot. If not, see . + +//! Various implementations for `SendXcm`. + +use frame_system::unique; +use parity_scale_codec::Encode; +use sp_std::{marker::PhantomData, result::Result}; +use xcm::prelude::*; + +/// Wrapper router which, if the message does not already end with a `SetTopic` instruction, +/// appends one to the message filled with a universally unique ID. This ID is returned from a +/// successful `deliver`. +/// +/// This is designed to be at the top-level of any routers, since it will always mutate the +/// passed `message` reference into a `None`. Don't try to combine it within a tuple except as the +/// last element. +pub struct WithUniqueTopic(PhantomData); +impl SendXcm for WithUniqueTopic { + type Ticket = (Inner::Ticket, [u8; 32]); + + fn validate( + destination: &mut Option, + message: &mut Option>, + ) -> SendResult { + let mut message = message.take().ok_or(SendError::MissingArgument)?; + let unique_id = if let Some(SetTopic(id)) = message.last() { + *id + } else { + let unique_id = unique(&message); + message.0.push(SetTopic(unique_id)); + unique_id + }; + let (ticket, assets) = Inner::validate(destination, &mut Some(message)) + .map_err(|_| SendError::NotApplicable)?; + Ok(((ticket, unique_id), assets)) + } + + fn deliver(ticket: Self::Ticket) -> Result { + let (ticket, unique_id) = ticket; + Inner::deliver(ticket)?; + Ok(unique_id) + } +} + +pub trait SourceTopic { + fn source_topic(entropy: impl Encode) -> XcmHash; +} + +impl SourceTopic for () { + fn source_topic(_: impl Encode) -> XcmHash { + [0u8; 32] + } +} + +/// Wrapper router which, if the message does not already end with a `SetTopic` instruction, +/// prepends one to the message filled with an ID from `TopicSource`. This ID is returned from a +/// successful `deliver`. +/// +/// This is designed to be at the top-level of any routers, since it will always mutate the +/// passed `message` reference into a `None`. Don't try to combine it within a tuple except as the +/// last element. +pub struct WithTopicSource(PhantomData<(Inner, TopicSource)>); +impl SendXcm for WithTopicSource { + type Ticket = (Inner::Ticket, [u8; 32]); + + fn validate( + destination: &mut Option, + message: &mut Option>, + ) -> SendResult { + let mut message = message.take().ok_or(SendError::MissingArgument)?; + let unique_id = if let Some(SetTopic(id)) = message.last() { + *id + } else { + let unique_id = TopicSource::source_topic(&message); + message.0.push(SetTopic(unique_id)); + unique_id + }; + let (ticket, assets) = Inner::validate(destination, &mut Some(message)) + .map_err(|_| SendError::NotApplicable)?; + Ok(((ticket, unique_id), assets)) + } + + fn deliver(ticket: Self::Ticket) -> Result { + let (ticket, unique_id) = ticket; + Inner::deliver(ticket)?; + Ok(unique_id) + } +} diff --git a/xcm/xcm-builder/src/tests/barriers.rs b/xcm/xcm-builder/src/tests/barriers.rs index 241a1458fe6c..99a9dd5a6609 100644 --- a/xcm/xcm-builder/src/tests/barriers.rs +++ b/xcm/xcm-builder/src/tests/barriers.rs @@ -14,30 +14,36 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . +use xcm_executor::traits::Properties; + use super::*; +fn props(weight_credit: Weight) -> Properties { + Properties { weight_credit, message_id: None } +} + #[test] fn take_weight_credit_barrier_should_work() { let mut message = Xcm::<()>(vec![TransferAsset { assets: (Parent, 100).into(), beneficiary: Here.into() }]); - let mut weight_credit = Weight::from_parts(10, 10); + let mut properties = props(Weight::from_parts(10, 10)); let r = TakeWeightCredit::should_execute( &Parent.into(), message.inner_mut(), Weight::from_parts(10, 10), - &mut weight_credit, + &mut properties, ); assert_eq!(r, Ok(())); - assert_eq!(weight_credit, Weight::zero()); + assert_eq!(properties.weight_credit, Weight::zero()); let r = TakeWeightCredit::should_execute( &Parent.into(), message.inner_mut(), Weight::from_parts(10, 10), - &mut weight_credit, + &mut properties, ); assert_eq!(r, Err(ProcessMessageError::Overweight(Weight::from_parts(10, 10)))); - assert_eq!(weight_credit, Weight::zero()); + assert_eq!(properties.weight_credit, Weight::zero()); } #[test] @@ -67,7 +73,7 @@ fn computed_origin_should_work() { &Parent.into(), message.inner_mut(), Weight::from_parts(100, 100), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Unsupported)); @@ -79,7 +85,7 @@ fn computed_origin_should_work() { &Parent.into(), message.inner_mut(), Weight::from_parts(100, 100), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Unsupported)); @@ -91,7 +97,7 @@ fn computed_origin_should_work() { &Parent.into(), message.inner_mut(), Weight::from_parts(100, 100), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Ok(())); } @@ -107,7 +113,7 @@ fn allow_unpaid_should_work() { &Parachain(1).into(), message.inner_mut(), Weight::from_parts(10, 10), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Unsupported)); @@ -115,7 +121,7 @@ fn allow_unpaid_should_work() { &Parent.into(), message.inner_mut(), Weight::from_parts(10, 10), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Ok(())); } @@ -147,7 +153,7 @@ fn allow_explicit_unpaid_should_work() { &Parachain(1).into(), good_message.inner_mut(), Weight::from_parts(20, 20), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Unsupported)); @@ -155,7 +161,7 @@ fn allow_explicit_unpaid_should_work() { &Parent.into(), bad_message1.inner_mut(), Weight::from_parts(20, 20), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Overweight(Weight::from_parts(20, 20)))); @@ -163,7 +169,7 @@ fn allow_explicit_unpaid_should_work() { &Parent.into(), bad_message2.inner_mut(), Weight::from_parts(20, 20), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Overweight(Weight::from_parts(20, 20)))); @@ -171,7 +177,7 @@ fn allow_explicit_unpaid_should_work() { &Parent.into(), good_message.inner_mut(), Weight::from_parts(20, 20), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Ok(())); @@ -187,7 +193,7 @@ fn allow_explicit_unpaid_should_work() { &Parent.into(), message_with_different_weight_parts.inner_mut(), Weight::from_parts(20, 20), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Overweight(Weight::from_parts(20, 20)))); @@ -195,7 +201,7 @@ fn allow_explicit_unpaid_should_work() { &Parent.into(), message_with_different_weight_parts.inner_mut(), Weight::from_parts(10, 10), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Ok(())); } @@ -211,7 +217,7 @@ fn allow_paid_should_work() { &Parachain(1).into(), message.inner_mut(), Weight::from_parts(10, 10), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Unsupported)); @@ -226,7 +232,7 @@ fn allow_paid_should_work() { &Parent.into(), underpaying_message.inner_mut(), Weight::from_parts(30, 30), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Overweight(Weight::from_parts(30, 30)))); @@ -241,7 +247,7 @@ fn allow_paid_should_work() { &Parachain(1).into(), paying_message.inner_mut(), Weight::from_parts(30, 30), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Unsupported)); @@ -249,7 +255,7 @@ fn allow_paid_should_work() { &Parent.into(), paying_message.inner_mut(), Weight::from_parts(30, 30), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Ok(())); @@ -264,7 +270,7 @@ fn allow_paid_should_work() { &Parent.into(), paying_message_with_different_weight_parts.inner_mut(), Weight::from_parts(20, 20), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Overweight(Weight::from_parts(20, 20)))); @@ -272,7 +278,7 @@ fn allow_paid_should_work() { &Parent.into(), paying_message_with_different_weight_parts.inner_mut(), Weight::from_parts(10, 10), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Ok(())) } @@ -288,7 +294,7 @@ fn suspension_should_work() { &Parent.into(), message.inner_mut(), Weight::from_parts(10, 10), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Err(ProcessMessageError::Yield)); @@ -299,7 +305,7 @@ fn suspension_should_work() { &Parent.into(), message.inner_mut(), Weight::from_parts(10, 10), - &mut Weight::zero(), + &mut props(Weight::zero()), ); assert_eq!(r, Ok(())); } diff --git a/xcm/xcm-builder/src/tests/bridging/local_para_para.rs b/xcm/xcm-builder/src/tests/bridging/local_para_para.rs index 117909725b76..77248e72ed19 100644 --- a/xcm/xcm-builder/src/tests/bridging/local_para_para.rs +++ b/xcm/xcm-builder/src/tests/bridging/local_para_para.rs @@ -26,7 +26,8 @@ parameter_types! { } type TheBridge = TestBridge>; -type Router = UnpaidLocalExporter, UniversalLocation>; +type Router = + TestTopic, UniversalLocation>>; /// ```nocompile /// local | remote @@ -40,21 +41,26 @@ type Router = UnpaidLocalExporter, Un /// ``` #[test] fn sending_to_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - let dest = (Parent, Parent, Remote::get(), Parachain(1)).into(); - assert_eq!(send_xcm::(dest, msg).unwrap().1, (Here, 100).into()); - assert_eq!(TheBridge::service(), 1); - assert_eq!( - take_received_remote_messages(), - vec![( - Here.into(), - Xcm(vec![ - UniversalOrigin(Local::get().into()), - DescendOrigin(Parachain(1).into()), - Trap(1), - ]) - )] - ); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + let dest = (Parent, Parent, Remote::get(), Parachain(1)).into(); + assert_eq!(send_xcm::(dest, msg).unwrap().1, (Here, 100).into()); + assert_eq!(TheBridge::service(), 1); + assert_eq!( + take_received_remote_messages(), + vec![( + Here.into(), + xcm_with_topic( + [0; 32], + vec![ + UniversalOrigin(Local::get().into()), + DescendOrigin(Parachain(1).into()), + Trap(1), + ] + ) + )] + ); + }); } /// ```nocompile @@ -69,19 +75,24 @@ fn sending_to_bridged_chain_works() { /// ``` #[test] fn sending_to_parachain_of_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - let dest = (Parent, Parent, Remote::get(), Parachain(1000)).into(); - assert_eq!(send_xcm::(dest, msg).unwrap().1, (Here, 100).into()); - assert_eq!(TheBridge::service(), 1); - let expected = vec![( - (Parent, Parachain(1000)).into(), - Xcm(vec![ - UniversalOrigin(Local::get().into()), - DescendOrigin(Parachain(1).into()), - Trap(1), - ]), - )]; - assert_eq!(take_received_remote_messages(), expected); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + let dest = (Parent, Parent, Remote::get(), Parachain(1000)).into(); + assert_eq!(send_xcm::(dest, msg).unwrap().1, (Here, 100).into()); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + (Parent, Parachain(1000)).into(), + xcm_with_topic( + [0; 32], + vec![ + UniversalOrigin(Local::get().into()), + DescendOrigin(Parachain(1).into()), + Trap(1), + ], + ), + )]; + assert_eq!(take_received_remote_messages(), expected); + }); } /// ```nocompile @@ -96,17 +107,22 @@ fn sending_to_parachain_of_bridged_chain_works() { /// ``` #[test] fn sending_to_relay_chain_of_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - let dest = (Parent, Parent, Remote::get()).into(); - assert_eq!(send_xcm::(dest, msg).unwrap().1, (Here, 100).into()); - assert_eq!(TheBridge::service(), 1); - let expected = vec![( - Parent.into(), - Xcm(vec![ - UniversalOrigin(Local::get().into()), - DescendOrigin(Parachain(1).into()), - Trap(1), - ]), - )]; - assert_eq!(take_received_remote_messages(), expected); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + let dest = (Parent, Parent, Remote::get()).into(); + assert_eq!(send_xcm::(dest, msg).unwrap().1, (Here, 100).into()); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + Parent.into(), + xcm_with_topic( + [0; 32], + vec![ + UniversalOrigin(Local::get().into()), + DescendOrigin(Parachain(1).into()), + Trap(1), + ], + ), + )]; + assert_eq!(take_received_remote_messages(), expected); + }); } diff --git a/xcm/xcm-builder/src/tests/bridging/local_relay_relay.rs b/xcm/xcm-builder/src/tests/bridging/local_relay_relay.rs index 66099bb823d4..ff2b714718e2 100644 --- a/xcm/xcm-builder/src/tests/bridging/local_relay_relay.rs +++ b/xcm/xcm-builder/src/tests/bridging/local_relay_relay.rs @@ -26,7 +26,8 @@ parameter_types! { } type TheBridge = TestBridge>; -type Router = UnpaidLocalExporter, UniversalLocation>; +type Router = + TestTopic, UniversalLocation>>; /// ```nocompile /// local | remote @@ -36,16 +37,20 @@ type Router = UnpaidLocalExporter, Un /// ``` #[test] fn sending_to_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - assert_eq!( - send_xcm::((Parent, Remote::get()).into(), msg).unwrap().1, - (Here, 100).into() - ); - assert_eq!(TheBridge::service(), 1); - assert_eq!( - take_received_remote_messages(), - vec![(Here.into(), Xcm(vec![UniversalOrigin(Local::get().into()), Trap(1)]))] - ); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + assert_eq!( + send_xcm::((Parent, Remote::get()).into(), msg).unwrap().1, + (Here, 100).into() + ); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + Here.into(), + xcm_with_topic([0; 32], vec![UniversalOrigin(Local::get().into()), Trap(1)]), + )]; + assert_eq!(take_received_remote_messages(), expected); + assert_eq!(RoutingLog::take(), vec![]); + }); } /// ```nocompile @@ -60,11 +65,16 @@ fn sending_to_bridged_chain_works() { /// ``` #[test] fn sending_to_parachain_of_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - let dest = (Parent, Remote::get(), Parachain(1000)).into(); - assert_eq!(send_xcm::(dest, msg).unwrap().1, (Here, 100).into()); - assert_eq!(TheBridge::service(), 1); - let expected = - vec![(Parachain(1000).into(), Xcm(vec![UniversalOrigin(Local::get().into()), Trap(1)]))]; - assert_eq!(take_received_remote_messages(), expected); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + let dest = (Parent, Remote::get(), Parachain(1000)).into(); + assert_eq!(send_xcm::(dest, msg).unwrap().1, (Here, 100).into()); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + Parachain(1000).into(), + xcm_with_topic([0; 32], vec![UniversalOrigin(Local::get().into()), Trap(1)]), + )]; + assert_eq!(take_received_remote_messages(), expected); + assert_eq!(RoutingLog::take(), vec![]); + }); } diff --git a/xcm/xcm-builder/src/tests/bridging/mod.rs b/xcm/xcm-builder/src/tests/bridging/mod.rs index 194e171cb620..2b5de62975ee 100644 --- a/xcm/xcm-builder/src/tests/bridging/mod.rs +++ b/xcm/xcm-builder/src/tests/bridging/mod.rs @@ -17,7 +17,7 @@ //! Tests specific to the bridging primitives use super::mock::*; -use crate::universal_exports::*; +use crate::{universal_exports::*, WithTopicSource}; use frame_support::{parameter_types, traits::Get}; use std::{cell::RefCell, marker::PhantomData}; use xcm_executor::{ @@ -37,12 +37,73 @@ parameter_types! { pub Local: NetworkId = ByGenesis([0; 32]); pub Remote: NetworkId = ByGenesis([1; 32]); pub Price: MultiAssets = MultiAssets::from((Here, 100u128)); + pub static UsingTopic: bool = false; } std::thread_local! { static BRIDGE_TRAFFIC: RefCell>> = RefCell::new(Vec::new()); } +fn maybe_with_topic(f: impl Fn()) { + UsingTopic::set(false); + f(); + UsingTopic::set(true); + f(); +} + +fn xcm_with_topic(topic: XcmHash, mut xcm: Vec>) -> Xcm { + if UsingTopic::get() { + xcm.push(SetTopic(topic)); + } + Xcm(xcm) +} + +fn fake_id() -> XcmHash { + [255; 32] +} + +fn test_weight(mut count: u64) -> Weight { + if UsingTopic::get() { + count += 1; + } + Weight::from_parts(count * 10, count * 10) +} + +fn maybe_forward_id_for(topic: &XcmHash) -> XcmHash { + match UsingTopic::get() { + true => forward_id_for(topic), + false => fake_id(), + } +} + +enum TestTicket { + Basic(T::Ticket), + Topic( as SendXcm>::Ticket), +} + +struct TestTopic(PhantomData); +impl SendXcm for TestTopic { + type Ticket = TestTicket; + fn deliver(ticket: Self::Ticket) -> core::result::Result { + match ticket { + TestTicket::Basic(t) => R::deliver(t), + TestTicket::Topic(t) => WithTopicSource::::deliver(t), + } + } + fn validate( + destination: &mut Option, + message: &mut Option>, + ) -> SendResult { + Ok(if UsingTopic::get() { + let (t, a) = WithTopicSource::::validate(destination, message)?; + (TestTicket::Topic(t), a) + } else { + let (t, a) = R::validate(destination, message)?; + (TestTicket::Basic(t), a) + }) + } +} + struct TestBridge(PhantomData); impl TestBridge { fn service() -> u64 { @@ -71,7 +132,7 @@ impl SendXcm for TestRemoteIncomingRouter { Ok((pair, MultiAssets::new())) } fn deliver(pair: (MultiLocation, Xcm<()>)) -> Result { - let hash = fake_message_hash(&pair.1); + let hash = fake_id(); REMOTE_INCOMING_XCM.with(|q| q.borrow_mut().push(pair)); Ok(hash) } @@ -107,6 +168,20 @@ fn deliver( export_xcm::(n, c, s, d, m).map(|(hash, _)| hash) } +#[derive(Eq, PartialEq, Clone, Debug)] +pub struct LogEntry { + local: Junctions, + remote: Junctions, + id: XcmHash, + message: Xcm<()>, + outcome: Outcome, + paid: bool, +} + +parameter_types! { + pub static RoutingLog: Vec = vec![]; +} + impl, Remote: Get, RemoteExporter: ExportXcm> SendXcm for UnpaidExecutingRouter { @@ -133,15 +208,20 @@ impl, Remote: Get, RemoteExporter: ExportXcm> S AllowUnpaidFrom::set(vec![origin.clone()]); set_exporter_override(price::, deliver::); // The we execute it: - let hash = fake_message_hash(&message); - let outcome = XcmExecutor::::execute_xcm( + let mut id = fake_id(); + let outcome = XcmExecutor::::prepare_and_execute( origin, - message.into(), - hash, + message.clone().into(), + &mut id, Weight::from_parts(2_000_000_000_000, 2_000_000_000_000), + Weight::zero(), ); + let local = Local::get(); + let remote = Remote::get(); + let entry = LogEntry { local, remote, id, message, outcome: outcome.clone(), paid: false }; + RoutingLog::mutate(|l| l.push(entry)); match outcome { - Outcome::Complete(..) => Ok(hash), + Outcome::Complete(..) => Ok(id), Outcome::Incomplete(..) => Err(Transport("Error executing")), Outcome::Error(..) => Err(Transport("Unable to execute")), } @@ -178,15 +258,20 @@ impl, Remote: Get, RemoteExporter: ExportXcm> S AllowPaidFrom::set(vec![origin.clone()]); set_exporter_override(price::, deliver::); // Then we execute it: - let hash = fake_message_hash(&message); - let outcome = XcmExecutor::::execute_xcm( + let mut id = fake_id(); + let outcome = XcmExecutor::::prepare_and_execute( origin, - message.into(), - hash, + message.clone().into(), + &mut id, Weight::from_parts(2_000_000_000_000, 2_000_000_000_000), + Weight::zero(), ); + let local = Local::get(); + let remote = Remote::get(); + let entry = LogEntry { local, remote, id, message, outcome: outcome.clone(), paid: true }; + RoutingLog::mutate(|l| l.push(entry)); match outcome { - Outcome::Complete(..) => Ok(hash), + Outcome::Complete(..) => Ok(id), Outcome::Incomplete(..) => Err(Transport("Error executing")), Outcome::Error(..) => Err(Transport("Unable to execute")), } diff --git a/xcm/xcm-builder/src/tests/bridging/paid_remote_relay_relay.rs b/xcm/xcm-builder/src/tests/bridging/paid_remote_relay_relay.rs index a618193d6e30..5472a3bd541d 100644 --- a/xcm/xcm-builder/src/tests/bridging/paid_remote_relay_relay.rs +++ b/xcm/xcm-builder/src/tests/bridging/paid_remote_relay_relay.rs @@ -27,8 +27,8 @@ parameter_types! { pub UniversalLocation: Junctions = X2(GlobalConsensus(Local::get()), Parachain(100)); pub RelayUniversalLocation: Junctions = X1(GlobalConsensus(Local::get())); pub RemoteUniversalLocation: Junctions = X1(GlobalConsensus(Remote::get())); - pub static BridgeTable: Vec<(NetworkId, MultiLocation, Option)> - = vec![(Remote::get(), MultiLocation::parent(), Some((Parent, 200u128).into()))]; + pub BridgeTable: Vec<(NetworkId, MultiLocation, Option)> + = vec![(Remote::get(), MultiLocation::parent(), Some((Parent, 200u128 + if UsingTopic::get() { 20 } else { 0 }).into()))]; // ^^^ 100 to use the bridge (export) and 100 for the remote execution weight (5 instructions // x (10 + 10) weight each). } @@ -41,7 +41,7 @@ type LocalBridgeRouter = SovereignPaidRemoteExporter< LocalInnerRouter, UniversalLocation, >; -type LocalRouter = (LocalInnerRouter, LocalBridgeRouter); +type LocalRouter = TestTopic<(LocalInnerRouter, LocalBridgeRouter)>; /// ```nocompile /// local | remote @@ -55,33 +55,66 @@ type LocalRouter = (LocalInnerRouter, LocalBridgeRouter); /// ``` #[test] fn sending_to_bridged_chain_works() { + maybe_with_topic(|| { + let dest: MultiLocation = (Parent, Parent, Remote::get()).into(); + + // Initialize the local relay so that our parachain has funds to pay for export. + clear_assets(Parachain(100)); + add_asset(Parachain(100), (Here, 1000u128)); + + let price = 200u128 + if UsingTopic::get() { 20 } else { 0 }; + + let msg = Xcm(vec![Trap(1)]); + assert_eq!(send_xcm::(dest, msg).unwrap().1, (Parent, price).into()); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + Here.into(), + xcm_with_topic( + [0; 32], + vec![ + UniversalOrigin(Local::get().into()), + DescendOrigin(Parachain(100).into()), + Trap(1), + ], + ), + )]; + assert_eq!(take_received_remote_messages(), expected); + + // The export cost 50 ref time and 50 proof size weight units (and thus 100 units of balance). + assert_eq!(asset_list(Parachain(100)), vec![(Here, 1000u128 - price).into()]); + + let entry = LogEntry { + local: UniversalLocation::get(), + remote: RelayUniversalLocation::get(), + id: maybe_forward_id_for(&[0; 32]), + message: xcm_with_topic( + maybe_forward_id_for(&[0; 32]), + vec![ + WithdrawAsset(MultiAsset::from((Here, price)).into()), + BuyExecution { fees: (Here, price).into(), weight_limit: Unlimited }, + ExportMessage { + network: ByGenesis([1; 32]), + destination: Here, + xcm: xcm_with_topic([0; 32], vec![Trap(1)]), + }, + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: Parachain(100).into() }, + ], + ), + outcome: Outcome::Complete(test_weight(5)), + paid: true, + }; + assert_eq!(RoutingLog::take(), vec![entry]); + }); +} +#[test] +fn sending_to_bridged_chain_without_funds_fails() { let dest: MultiLocation = (Parent, Parent, Remote::get()).into(); // Routing won't work if we don't have enough funds. assert_eq!( send_xcm::(dest.clone(), Xcm(vec![Trap(1)])), Err(SendError::Transport("Error executing")), ); - - // Initialize the local relay so that our parachain has funds to pay for export. - add_asset(Parachain(100), (Here, 1000u128)); - - let msg = Xcm(vec![Trap(1)]); - assert_eq!(send_xcm::(dest, msg).unwrap().1, (Parent, 200u128).into()); - assert_eq!(TheBridge::service(), 1); - assert_eq!( - take_received_remote_messages(), - vec![( - Here.into(), - Xcm(vec![ - UniversalOrigin(Local::get().into()), - DescendOrigin(Parachain(100).into()), - Trap(1), - ]) - )] - ); - - // The export cost 50 ref time and 50 proof size weight units (and thus 100 units of balance). - assert_eq!(asset_list(Parachain(100)), vec![(Here, 800u128).into()]); } /// ```nocompile @@ -96,29 +129,64 @@ fn sending_to_bridged_chain_works() { /// ``` #[test] fn sending_to_parachain_of_bridged_chain_works() { + maybe_with_topic(|| { + let dest: MultiLocation = (Parent, Parent, Remote::get(), Parachain(100)).into(); + + // Initialize the local relay so that our parachain has funds to pay for export. + clear_assets(Parachain(100)); + add_asset(Parachain(100), (Here, 1000u128)); + + let price = 200u128 + if UsingTopic::get() { 20 } else { 0 }; + + let msg = Xcm(vec![Trap(1)]); + assert_eq!(send_xcm::(dest, msg).unwrap().1, (Parent, price).into()); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + Parachain(100).into(), + xcm_with_topic( + [0; 32], + vec![ + UniversalOrigin(Local::get().into()), + DescendOrigin(Parachain(100).into()), + Trap(1), + ], + ), + )]; + assert_eq!(take_received_remote_messages(), expected); + + // The export cost 50 ref time and 50 proof size weight units (and thus 100 units of balance). + assert_eq!(asset_list(Parachain(100)), vec![(Here, 1000u128 - price).into()]); + + let entry = LogEntry { + local: UniversalLocation::get(), + remote: RelayUniversalLocation::get(), + id: maybe_forward_id_for(&[0; 32]), + message: xcm_with_topic( + maybe_forward_id_for(&[0; 32]), + vec![ + WithdrawAsset(MultiAsset::from((Here, price)).into()), + BuyExecution { fees: (Here, price).into(), weight_limit: Unlimited }, + ExportMessage { + network: ByGenesis([1; 32]), + destination: Parachain(100).into(), + xcm: xcm_with_topic([0; 32], vec![Trap(1)]), + }, + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: Parachain(100).into() }, + ], + ), + outcome: Outcome::Complete(test_weight(5)), + paid: true, + }; + assert_eq!(RoutingLog::take(), vec![entry]); + }); +} +#[test] +fn sending_to_parachain_of_bridged_chain_without_funds_fails() { let dest: MultiLocation = (Parent, Parent, Remote::get(), Parachain(100)).into(); // Routing won't work if we don't have enough funds. assert_eq!( send_xcm::(dest.clone(), Xcm(vec![Trap(1)])), Err(SendError::Transport("Error executing")), ); - - // Initialize the local relay so that our parachain has funds to pay for export. - add_asset(Parachain(100), (Here, 1000u128)); - - let msg = Xcm(vec![Trap(1)]); - assert_eq!(send_xcm::(dest, msg).unwrap().1, (Parent, 200u128).into()); - assert_eq!(TheBridge::service(), 1); - let expected = vec![( - Parachain(100).into(), - Xcm(vec![ - UniversalOrigin(Local::get().into()), - DescendOrigin(Parachain(100).into()), - Trap(1), - ]), - )]; - assert_eq!(take_received_remote_messages(), expected); - - // The export cost 50 ref time and 50 proof size weight units (and thus 100 units of balance). - assert_eq!(asset_list(Parachain(100)), vec![(Here, 800u128).into()]); } diff --git a/xcm/xcm-builder/src/tests/bridging/remote_para_para.rs b/xcm/xcm-builder/src/tests/bridging/remote_para_para.rs index 06df4cae2a79..b760e6829e9f 100644 --- a/xcm/xcm-builder/src/tests/bridging/remote_para_para.rs +++ b/xcm/xcm-builder/src/tests/bridging/remote_para_para.rs @@ -34,7 +34,7 @@ type LocalInnerRouter = UnpaidExecutingRouter; type LocalBridgingRouter = UnpaidRemoteExporter, LocalInnerRouter, UniversalLocation>; -type LocalRouter = (LocalInnerRouter, LocalBridgingRouter); +type LocalRouter = TestTopic<(LocalInnerRouter, LocalBridgingRouter)>; /// ```nocompile /// local | remote @@ -48,25 +48,49 @@ type LocalRouter = (LocalInnerRouter, LocalBridgingRouter); /// ``` #[test] fn sending_to_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - assert_eq!( - send_xcm::((Parent, Parent, Remote::get(), Parachain(1)).into(), msg) - .unwrap() - .1, - MultiAssets::new() - ); - assert_eq!(TheBridge::service(), 1); - assert_eq!( - take_received_remote_messages(), - vec![( - Here.into(), - Xcm(vec![ - UniversalOrigin(Local::get().into()), - DescendOrigin(Parachain(1000).into()), - Trap(1) - ]) - )] - ); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + assert_eq!( + send_xcm::((Parent, Parent, Remote::get(), Parachain(1)).into(), msg) + .unwrap() + .1, + MultiAssets::new() + ); + assert_eq!(TheBridge::service(), 1); + assert_eq!( + take_received_remote_messages(), + vec![( + Here.into(), + xcm_with_topic( + [0; 32], + vec![ + UniversalOrigin(Local::get().into()), + DescendOrigin(Parachain(1000).into()), + Trap(1) + ] + ) + )] + ); + let entry = LogEntry { + local: UniversalLocation::get(), + remote: ParaBridgeUniversalLocation::get(), + id: maybe_forward_id_for(&[0; 32]), + message: xcm_with_topic( + maybe_forward_id_for(&[0; 32]), + vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + ExportMessage { + network: ByGenesis([1; 32]), + destination: Parachain(1).into(), + xcm: xcm_with_topic([0; 32], vec![Trap(1)]), + }, + ], + ), + outcome: Outcome::Complete(test_weight(2)), + paid: false, + }; + assert_eq!(RoutingLog::take(), vec![entry]); + }); } /// ```nocompile @@ -81,19 +105,43 @@ fn sending_to_bridged_chain_works() { /// ``` #[test] fn sending_to_sibling_of_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - let dest = (Parent, Parent, Remote::get(), Parachain(1000)).into(); - assert_eq!(send_xcm::(dest, msg).unwrap().1, MultiAssets::new()); - assert_eq!(TheBridge::service(), 1); - let expected = vec![( - (Parent, Parachain(1000)).into(), - Xcm(vec![ - UniversalOrigin(Local::get().into()), - DescendOrigin(Parachain(1000).into()), - Trap(1), - ]), - )]; - assert_eq!(take_received_remote_messages(), expected); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + let dest = (Parent, Parent, Remote::get(), Parachain(1000)).into(); + assert_eq!(send_xcm::(dest, msg).unwrap().1, MultiAssets::new()); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + (Parent, Parachain(1000)).into(), + xcm_with_topic( + [0; 32], + vec![ + UniversalOrigin(Local::get().into()), + DescendOrigin(Parachain(1000).into()), + Trap(1), + ], + ), + )]; + assert_eq!(take_received_remote_messages(), expected); + let entry = LogEntry { + local: UniversalLocation::get(), + remote: ParaBridgeUniversalLocation::get(), + id: maybe_forward_id_for(&[0; 32]), + message: xcm_with_topic( + maybe_forward_id_for(&[0; 32]), + vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + ExportMessage { + network: ByGenesis([1; 32]), + destination: Parachain(1000).into(), + xcm: xcm_with_topic([0; 32], vec![Trap(1)]), + }, + ], + ), + outcome: Outcome::Complete(test_weight(2)), + paid: false, + }; + assert_eq!(RoutingLog::take(), vec![entry]); + }); } /// ```nocompile @@ -108,17 +156,41 @@ fn sending_to_sibling_of_bridged_chain_works() { /// ``` #[test] fn sending_to_relay_of_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - let dest = (Parent, Parent, Remote::get()).into(); - assert_eq!(send_xcm::(dest, msg).unwrap().1, MultiAssets::new()); - assert_eq!(TheBridge::service(), 1); - let expected = vec![( - Parent.into(), - Xcm(vec![ - UniversalOrigin(Local::get().into()), - DescendOrigin(Parachain(1000).into()), - Trap(1), - ]), - )]; - assert_eq!(take_received_remote_messages(), expected); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + let dest = (Parent, Parent, Remote::get()).into(); + assert_eq!(send_xcm::(dest, msg).unwrap().1, MultiAssets::new()); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + Parent.into(), + xcm_with_topic( + [0; 32], + vec![ + UniversalOrigin(Local::get().into()), + DescendOrigin(Parachain(1000).into()), + Trap(1), + ], + ), + )]; + assert_eq!(take_received_remote_messages(), expected); + let entry = LogEntry { + local: UniversalLocation::get(), + remote: ParaBridgeUniversalLocation::get(), + id: maybe_forward_id_for(&[0; 32]), + message: xcm_with_topic( + maybe_forward_id_for(&[0; 32]), + vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + ExportMessage { + network: ByGenesis([1; 32]), + destination: Here, + xcm: xcm_with_topic([0; 32], vec![Trap(1)]), + }, + ], + ), + outcome: Outcome::Complete(test_weight(2)), + paid: false, + }; + assert_eq!(RoutingLog::take(), vec![entry]); + }); } diff --git a/xcm/xcm-builder/src/tests/bridging/remote_para_para_via_relay.rs b/xcm/xcm-builder/src/tests/bridging/remote_para_para_via_relay.rs index 56579643861d..9dc94e27e9aa 100644 --- a/xcm/xcm-builder/src/tests/bridging/remote_para_para_via_relay.rs +++ b/xcm/xcm-builder/src/tests/bridging/remote_para_para_via_relay.rs @@ -34,7 +34,7 @@ type LocalInnerRouter = UnpaidExecutingRouter; type LocalBridgingRouter = UnpaidRemoteExporter, LocalInnerRouter, UniversalLocation>; -type LocalRouter = (LocalInnerRouter, LocalBridgingRouter); +type LocalRouter = TestTopic<(LocalInnerRouter, LocalBridgingRouter)>; /// ```nocompile /// local | remote @@ -48,18 +48,40 @@ type LocalRouter = (LocalInnerRouter, LocalBridgingRouter); /// ``` #[test] fn sending_to_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - assert_eq!( - send_xcm::((Parent, Remote::get(), Parachain(1)).into(), msg) - .unwrap() - .1, - MultiAssets::new() - ); - assert_eq!(TheBridge::service(), 1); - assert_eq!( - take_received_remote_messages(), - vec![(Here.into(), Xcm(vec![UniversalOrigin(Local::get().into()), Trap(1)]))] - ); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + assert_eq!( + send_xcm::((Parent, Remote::get(), Parachain(1)).into(), msg) + .unwrap() + .1, + MultiAssets::new() + ); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + Here.into(), + xcm_with_topic([0; 32], vec![UniversalOrigin(Local::get().into()), Trap(1)]), + )]; + assert_eq!(take_received_remote_messages(), expected); + let entry = LogEntry { + local: UniversalLocation::get(), + remote: ParaBridgeUniversalLocation::get(), + id: maybe_forward_id_for(&[0; 32]), + message: xcm_with_topic( + maybe_forward_id_for(&[0; 32]), + vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + ExportMessage { + network: ByGenesis([1; 32]), + destination: Parachain(1).into(), + xcm: xcm_with_topic([0; 32], vec![Trap(1)]), + }, + ], + ), + outcome: Outcome::Complete(test_weight(2)), + paid: false, + }; + assert_eq!(RoutingLog::take(), vec![entry]); + }); } /// ```nocompile @@ -74,15 +96,36 @@ fn sending_to_bridged_chain_works() { /// ``` #[test] fn sending_to_sibling_of_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - let dest = (Parent, Remote::get(), Parachain(1000)).into(); - assert_eq!(send_xcm::(dest, msg).unwrap().1, MultiAssets::new()); - assert_eq!(TheBridge::service(), 1); - let expected = vec![( - (Parent, Parachain(1000)).into(), - Xcm(vec![UniversalOrigin(Local::get().into()), Trap(1)]), - )]; - assert_eq!(take_received_remote_messages(), expected); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + let dest = (Parent, Remote::get(), Parachain(1000)).into(); + assert_eq!(send_xcm::(dest, msg).unwrap().1, MultiAssets::new()); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + (Parent, Parachain(1000)).into(), + xcm_with_topic([0; 32], vec![UniversalOrigin(Local::get().into()), Trap(1)]), + )]; + assert_eq!(take_received_remote_messages(), expected); + let entry = LogEntry { + local: UniversalLocation::get(), + remote: ParaBridgeUniversalLocation::get(), + id: maybe_forward_id_for(&[0; 32]), + message: xcm_with_topic( + maybe_forward_id_for(&[0; 32]), + vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + ExportMessage { + network: ByGenesis([1; 32]), + destination: Parachain(1000).into(), + xcm: xcm_with_topic([0; 32], vec![Trap(1)]), + }, + ], + ), + outcome: Outcome::Complete(test_weight(2)), + paid: false, + }; + assert_eq!(RoutingLog::take(), vec![entry]); + }); } /// ```nocompile @@ -97,10 +140,34 @@ fn sending_to_sibling_of_bridged_chain_works() { /// ``` #[test] fn sending_to_relay_of_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - let dest = (Parent, Remote::get()).into(); - assert_eq!(send_xcm::(dest, msg).unwrap().1, MultiAssets::new()); - assert_eq!(TheBridge::service(), 1); - let expected = vec![(Parent.into(), Xcm(vec![UniversalOrigin(Local::get().into()), Trap(1)]))]; - assert_eq!(take_received_remote_messages(), expected); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + let dest = (Parent, Remote::get()).into(); + assert_eq!(send_xcm::(dest, msg).unwrap().1, MultiAssets::new()); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + Parent.into(), + xcm_with_topic([0; 32], vec![UniversalOrigin(Local::get().into()), Trap(1)]), + )]; + assert_eq!(take_received_remote_messages(), expected); + let entry = LogEntry { + local: UniversalLocation::get(), + remote: ParaBridgeUniversalLocation::get(), + id: maybe_forward_id_for(&[0; 32]), + message: xcm_with_topic( + maybe_forward_id_for(&[0; 32]), + vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + ExportMessage { + network: ByGenesis([1; 32]), + destination: Here, + xcm: xcm_with_topic([0; 32], vec![Trap(1)]), + }, + ], + ), + outcome: Outcome::Complete(test_weight(2)), + paid: false, + }; + assert_eq!(RoutingLog::take(), vec![entry]); + }); } diff --git a/xcm/xcm-builder/src/tests/bridging/remote_relay_relay.rs b/xcm/xcm-builder/src/tests/bridging/remote_relay_relay.rs index 4230ea27b715..2b34c93c0752 100644 --- a/xcm/xcm-builder/src/tests/bridging/remote_relay_relay.rs +++ b/xcm/xcm-builder/src/tests/bridging/remote_relay_relay.rs @@ -34,7 +34,7 @@ type LocalInnerRouter = UnpaidExecutingRouter; type LocalBridgeRouter = UnpaidRemoteExporter, LocalInnerRouter, UniversalLocation>; -type LocalRouter = (LocalInnerRouter, LocalBridgeRouter); +type LocalRouter = TestTopic<(LocalInnerRouter, LocalBridgeRouter)>; /// ```nocompile /// local | remote @@ -48,23 +48,47 @@ type LocalRouter = (LocalInnerRouter, LocalBridgeRouter); /// ``` #[test] fn sending_to_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - assert_eq!( - send_xcm::((Parent, Parent, Remote::get()).into(), msg).unwrap().1, - MultiAssets::new() - ); - assert_eq!(TheBridge::service(), 1); - assert_eq!( - take_received_remote_messages(), - vec![( - Here.into(), - Xcm(vec![ - UniversalOrigin(Local::get().into()), - DescendOrigin(Parachain(1000).into()), - Trap(1) - ]) - )] - ); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + assert_eq!( + send_xcm::((Parent, Parent, Remote::get()).into(), msg).unwrap().1, + MultiAssets::new() + ); + assert_eq!(TheBridge::service(), 1); + assert_eq!( + take_received_remote_messages(), + vec![( + Here.into(), + xcm_with_topic( + [0; 32], + vec![ + UniversalOrigin(Local::get().into()), + DescendOrigin(Parachain(1000).into()), + Trap(1) + ] + ) + )] + ); + let entry = LogEntry { + local: UniversalLocation::get(), + remote: RelayUniversalLocation::get(), + id: maybe_forward_id_for(&[0; 32]), + message: xcm_with_topic( + maybe_forward_id_for(&[0; 32]), + vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + ExportMessage { + network: ByGenesis([1; 32]), + destination: Here, + xcm: xcm_with_topic([0; 32], vec![Trap(1)]), + }, + ], + ), + outcome: Outcome::Complete(test_weight(2)), + paid: false, + }; + assert_eq!(RoutingLog::take(), vec![entry]); + }); } /// ```nocompile @@ -79,17 +103,41 @@ fn sending_to_bridged_chain_works() { /// ``` #[test] fn sending_to_parachain_of_bridged_chain_works() { - let msg = Xcm(vec![Trap(1)]); - let dest = (Parent, Parent, Remote::get(), Parachain(1000)).into(); - assert_eq!(send_xcm::(dest, msg).unwrap().1, MultiAssets::new()); - assert_eq!(TheBridge::service(), 1); - let expected = vec![( - Parachain(1000).into(), - Xcm(vec![ - UniversalOrigin(Local::get().into()), - DescendOrigin(Parachain(1000).into()), - Trap(1), - ]), - )]; - assert_eq!(take_received_remote_messages(), expected); + maybe_with_topic(|| { + let msg = Xcm(vec![Trap(1)]); + let dest = (Parent, Parent, Remote::get(), Parachain(1000)).into(); + assert_eq!(send_xcm::(dest, msg).unwrap().1, MultiAssets::new()); + assert_eq!(TheBridge::service(), 1); + let expected = vec![( + Parachain(1000).into(), + xcm_with_topic( + [0; 32], + vec![ + UniversalOrigin(Local::get().into()), + DescendOrigin(Parachain(1000).into()), + Trap(1), + ], + ), + )]; + assert_eq!(take_received_remote_messages(), expected); + let entry = LogEntry { + local: UniversalLocation::get(), + remote: RelayUniversalLocation::get(), + id: maybe_forward_id_for(&[0; 32]), + message: xcm_with_topic( + maybe_forward_id_for(&[0; 32]), + vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + ExportMessage { + network: ByGenesis([1; 32]), + destination: Parachain(1000).into(), + xcm: xcm_with_topic([0; 32], vec![Trap(1)]), + }, + ], + ), + outcome: Outcome::Complete(test_weight(2)), + paid: false, + }; + assert_eq!(RoutingLog::take(), vec![entry]); + }) } diff --git a/xcm/xcm-builder/src/tests/mock.rs b/xcm/xcm-builder/src/tests/mock.rs index dad4e8854448..b87e78df5b12 100644 --- a/xcm/xcm-builder/src/tests/mock.rs +++ b/xcm/xcm-builder/src/tests/mock.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use crate::{ - barriers::{AllowSubscriptionsFrom, RespectSuspension}, + barriers::{AllowSubscriptionsFrom, RespectSuspension, TrailingSetTopicAsId}, test_utils::*, }; pub use crate::{ @@ -41,6 +41,7 @@ pub use sp_std::{ marker::PhantomData, }; pub use xcm::latest::{prelude::*, Weight}; +use xcm_executor::traits::Properties; pub use xcm_executor::{ traits::{ AssetExchange, AssetLock, CheckSuspension, ConvertOrigin, Enact, ExportXcm, FeeManager, @@ -241,6 +242,9 @@ pub fn asset_list(who: impl Into) -> Vec { pub fn add_asset(who: impl Into, what: impl Into) { ASSETS.with(|a| a.borrow_mut().entry(who.into()).or_insert(Assets::new()).subsume(what.into())); } +pub fn clear_assets(who: impl Into) { + ASSETS.with(|a| a.borrow_mut().remove(&who.into())); +} pub struct TestAssetTransactor; impl TransactAsset for TestAssetTransactor { @@ -429,7 +433,7 @@ impl CheckSuspension for TestSuspender { _origin: &MultiLocation, _instructions: &mut [Instruction], _max_weight: Weight, - _weight_credit: &mut Weight, + _properties: &mut Properties, ) -> bool { SUSPENDED.with(|s| s.get()) } @@ -651,7 +655,7 @@ impl Config for TestConfig { type IsReserve = TestIsReserve; type IsTeleporter = TestIsTeleporter; type UniversalLocation = ExecutorUniversalLocation; - type Barrier = RespectSuspension; + type Barrier = TrailingSetTopicAsId>; type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = TestResponseHandler; diff --git a/xcm/xcm-builder/src/universal_exports.rs b/xcm/xcm-builder/src/universal_exports.rs index 2d1c9f6d4c35..38795042d00d 100644 --- a/xcm/xcm-builder/src/universal_exports.rs +++ b/xcm/xcm-builder/src/universal_exports.rs @@ -130,6 +130,10 @@ impl)>>> ExporterFor } } +pub fn forward_id_for(original_id: &XcmHash) -> XcmHash { + (b"forward_id_for", original_id).using_encoded(sp_io::hashing::blake2_256) +} + /// Implementation of `SendXcm` which wraps the message inside an `ExportMessage` instruction /// and sends it to a destination known to be able to handle it. /// @@ -139,6 +143,16 @@ impl)>>> ExporterFor /// /// This is only useful if we have special dispensation by the remote bridges to have the /// `ExportMessage` instruction executed without payment. +/// +/// The `XcmHash` value returned by `deliver` will always be the same as that returned by the +/// message exporter (`Bridges`). Generally this should take notice of the message should it +/// end with the `SetTopic` instruction. +/// +/// In the case that the message ends with a `SetTopic(T)` (as should be the case if the top-level +/// router is `EnsureUniqueTopic`), then the forwarding message (i.e. the one carrying the +/// export instruction *to* the bridge in local consensus) will also end with a `SetTopic` whose +/// inner is `forward_id_for(T)`. If this is not the case then the onward message will not be given +/// the `SetTopic` afterword. pub struct UnpaidRemoteExporter( PhantomData<(Bridges, Router, UniversalLocation)>, ); @@ -155,21 +169,32 @@ impl Some(forward_id_for(t)), + _ => None, + }; + // We then send a normal message to the bridge asking it to export the prepended // message to the remote chain. This will only work if the bridge will do the message // export for free. Common-good chains will typically be afforded this. - let message = Xcm(vec![ + let mut message = Xcm(vec![ UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ExportMessage { network: remote_network, destination: remote_location, xcm }, ]); + if let Some(forward_id) = maybe_forward_id { + message.0.push(SetTopic(forward_id)); + } validate_send::(bridge, message) } - fn deliver(validation: Router::Ticket) -> Result { + fn deliver(validation: Self::Ticket) -> Result { Router::deliver(validation) } } @@ -179,6 +204,16 @@ impl( PhantomData<(Bridges, Router, UniversalLocation)>, ); @@ -196,6 +231,14 @@ impl Some(forward_id_for(t)), + _ => None, + }; + let (bridge, maybe_payment) = Bridges::exporter_for(&remote_network, &remote_location, &xcm).ok_or(NotApplicable)?; @@ -204,7 +247,7 @@ impl, Price: Get> .ok_or(SendError::MissingArgument)? .split_global() .map_err(|()| SendError::Unroutable)?; - let mut inner: Xcm<()> = vec![UniversalOrigin(GlobalConsensus(local_net))].into(); + let mut message = message.take().ok_or(SendError::MissingArgument)?; + let maybe_id = match message.last() { + Some(SetTopic(t)) => Some(*t), + _ => None, + }; + message.0.insert(0, UniversalOrigin(GlobalConsensus(local_net))); if local_sub != Here { - inner.inner_mut().push(DescendOrigin(local_sub)); + message.0.insert(1, DescendOrigin(local_sub)); } - inner - .inner_mut() - .extend(message.take().ok_or(SendError::MissingArgument)?.into_iter()); - let message = VersionedXcm::from(inner); - let hash = message.using_encoded(sp_io::hashing::blake2_256); + let message = VersionedXcm::from(message); + let id = maybe_id.unwrap_or_else(|| message.using_encoded(sp_io::hashing::blake2_256)); let blob = BridgeMessage { universal_dest, message }.encode(); - Ok(((blob, hash), Price::get())) + Ok(((blob, id), Price::get())) } - fn deliver((blob, hash): (Vec, XcmHash)) -> Result { + fn deliver((blob, id): (Vec, XcmHash)) -> Result { Bridge::haul_blob(blob)?; - Ok(hash) + Ok(id) } } diff --git a/xcm/xcm-builder/tests/mock/mod.rs b/xcm/xcm-builder/tests/mock/mod.rs index 8f22b79e11bc..2cee366742ce 100644 --- a/xcm/xcm-builder/tests/mock/mod.rs +++ b/xcm/xcm-builder/tests/mock/mod.rs @@ -117,7 +117,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/xcm/xcm-builder/tests/scenarios.rs b/xcm/xcm-builder/tests/scenarios.rs index 64e9b86a91cd..e587c4118e74 100644 --- a/xcm/xcm-builder/tests/scenarios.rs +++ b/xcm/xcm-builder/tests/scenarios.rs @@ -16,7 +16,6 @@ mod mock; -use frame_support::weights::Weight; use mock::{ fake_message_hash, kusama_like_with_balances, AccountId, Balance, Balances, BaseXcmWeight, System, XcmConfig, CENTS, diff --git a/xcm/xcm-executor/integration-tests/src/lib.rs b/xcm/xcm-executor/integration-tests/src/lib.rs index 1500bb836ae4..95138250cca9 100644 --- a/xcm/xcm-executor/integration-tests/src/lib.rs +++ b/xcm/xcm-executor/integration-tests/src/lib.rs @@ -65,9 +65,9 @@ fn basic_buy_fees_message_executes() { client.state_at(block_hash).expect("state should exist").inspect_state(|| { assert!(polkadot_test_runtime::System::events().iter().any(|r| matches!( r.event, - polkadot_test_runtime::RuntimeEvent::Xcm(pallet_xcm::Event::Attempted( - Outcome::Complete(_) - )), + polkadot_test_runtime::RuntimeEvent::Xcm(pallet_xcm::Event::Attempted { + outcome: Outcome::Complete(_) + }), ))); }); } @@ -118,9 +118,9 @@ fn transact_recursion_limit_works() { client.state_at(block_hash).expect("state should exist").inspect_state(|| { assert!(polkadot_test_runtime::System::events().iter().any(|r| matches!( r.event, - polkadot_test_runtime::RuntimeEvent::Xcm(pallet_xcm::Event::Attempted( - Outcome::Incomplete(_, XcmError::ExceedsStackLimit) - )), + polkadot_test_runtime::RuntimeEvent::Xcm(pallet_xcm::Event::Attempted { + outcome: Outcome::Incomplete(_, XcmError::ExceedsStackLimit) + }), ))); }); } @@ -195,10 +195,10 @@ fn query_response_fires() { client.state_at(block_hash).expect("state should exist").inspect_state(|| { assert!(polkadot_test_runtime::System::events().iter().any(|r| matches!( r.event, - polkadot_test_runtime::RuntimeEvent::Xcm(pallet_xcm::Event::ResponseReady( - q, - Response::ExecutionResult(None), - )) if q == query_id, + polkadot_test_runtime::RuntimeEvent::Xcm(pallet_xcm::Event::ResponseReady { + query_id: q, + response: Response::ExecutionResult(None), + }) if q == query_id, ))); assert_eq!( polkadot_test_runtime::Xcm::query(query_id), diff --git a/xcm/xcm-executor/src/lib.rs b/xcm/xcm-executor/src/lib.rs index 749a63114d95..ce9d3d4644e8 100644 --- a/xcm/xcm-executor/src/lib.rs +++ b/xcm/xcm-executor/src/lib.rs @@ -31,8 +31,8 @@ use xcm::latest::prelude::*; pub mod traits; use traits::{ validate_export, AssetExchange, AssetLock, CallDispatcher, ClaimAssets, ConvertOrigin, - DropAssets, Enact, ExportXcm, FeeManager, FeeReason, OnResponse, ShouldExecute, TransactAsset, - VersionChangeNotifier, WeightBounds, WeightTrader, + DropAssets, Enact, ExportXcm, FeeManager, FeeReason, OnResponse, Properties, ShouldExecute, + TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, }; mod assets; @@ -193,8 +193,8 @@ impl ExecuteXcm for XcmExecutor, WeighedMessage(xcm_weight, mut message): WeighedMessage, - message_hash: XcmHash, - mut weight_credit: Weight, + id: &mut XcmHash, + weight_credit: Weight, ) -> Outcome { let origin = origin.into(); log::trace!( @@ -204,24 +204,27 @@ impl ExecuteXcm for XcmExecutor for frame_benchmarking::BenchmarkError { } impl XcmExecutor { - pub fn new(origin: impl Into, message_hash: XcmHash) -> Self { + pub fn new(origin: impl Into, message_id: XcmHash) -> Self { let origin = origin.into(); Self { holding: Assets::new(), holding_limit: Config::MaxAssetsIntoHolding::get() as usize, - context: XcmContext { origin: Some(origin), message_hash, topic: None }, + context: XcmContext { origin: Some(origin), message_id, topic: None }, original_origin: origin, trader: Config::Trader::new(), error: None, diff --git a/xcm/xcm-executor/src/traits/mod.rs b/xcm/xcm-executor/src/traits/mod.rs index 64c77f2abf45..3b904630d73e 100644 --- a/xcm/xcm-executor/src/traits/mod.rs +++ b/xcm/xcm-executor/src/traits/mod.rs @@ -40,7 +40,7 @@ pub use token_matching::{ mod on_response; pub use on_response::{OnResponse, VersionChangeNotifier}; mod should_execute; -pub use should_execute::{CheckSuspension, ShouldExecute}; +pub use should_execute::{CheckSuspension, Properties, ShouldExecute}; mod transact_asset; pub use transact_asset::TransactAsset; mod weight; diff --git a/xcm/xcm-executor/src/traits/should_execute.rs b/xcm/xcm-executor/src/traits/should_execute.rs index 84aa9d1364ea..2b634e375136 100644 --- a/xcm/xcm-executor/src/traits/should_execute.rs +++ b/xcm/xcm-executor/src/traits/should_execute.rs @@ -16,7 +16,19 @@ use frame_support::traits::ProcessMessageError; use sp_std::result::Result; -use xcm::latest::{Instruction, MultiLocation, Weight}; +use xcm::latest::{Instruction, MultiLocation, Weight, XcmHash}; + +/// Properyies of an XCM message and its imminent execution. +#[derive(Clone, Eq, PartialEq, Debug)] +pub struct Properties { + /// The amount of weight that the system has determined this + /// message may utilize in its execution. Typically non-zero only because of prior fee + /// payment, but could in principle be due to other factors. + pub weight_credit: Weight, + /// The identity of the message, if one is known. If left as `None`, then it will generally + /// default to the hash of the message which may be non-unique. + pub message_id: Option, +} /// Trait to determine whether the execution engine should actually execute a given XCM. /// @@ -28,14 +40,13 @@ pub trait ShouldExecute { /// - `origin`: The origin (sender) of the message. /// - `instructions`: The message itself. /// - `max_weight`: The (possibly over-) estimation of the weight of execution of the message. - /// - `weight_credit`: The pre-established amount of weight that the system has determined this - /// message may utilize in its execution. Typically non-zero only because of prior fee - /// payment, but could in principle be due to other factors. + /// - `properties`: Various pre-established properties of the message which may be mutated by + /// this API. fn should_execute( origin: &MultiLocation, instructions: &mut [Instruction], max_weight: Weight, - weight_credit: &mut Weight, + properties: &mut Properties, ) -> Result<(), ProcessMessageError>; } @@ -45,21 +56,21 @@ impl ShouldExecute for Tuple { origin: &MultiLocation, instructions: &mut [Instruction], max_weight: Weight, - weight_credit: &mut Weight, + properties: &mut Properties, ) -> Result<(), ProcessMessageError> { for_tuples!( #( - match Tuple::should_execute(origin, instructions, max_weight, weight_credit) { + match Tuple::should_execute(origin, instructions, max_weight, properties) { Ok(()) => return Ok(()), _ => (), } )* ); log::trace!( target: "xcm::should_execute", - "did not pass barrier: origin: {:?}, instructions: {:?}, max_weight: {:?}, weight_credit: {:?}", + "did not pass barrier: origin: {:?}, instructions: {:?}, max_weight: {:?}, properties: {:?}", origin, instructions, max_weight, - weight_credit, + properties, ); Err(ProcessMessageError::Unsupported) } @@ -79,7 +90,7 @@ pub trait CheckSuspension { origin: &MultiLocation, instructions: &mut [Instruction], max_weight: Weight, - weight_credit: &mut Weight, + properties: &mut Properties, ) -> bool; } @@ -89,10 +100,10 @@ impl CheckSuspension for Tuple { origin: &MultiLocation, instruction: &mut [Instruction], max_weight: Weight, - weight_credit: &mut Weight, + properties: &mut Properties, ) -> bool { for_tuples!( #( - if Tuple::is_suspended(origin, instruction, max_weight, weight_credit) { + if Tuple::is_suspended(origin, instruction, max_weight, properties) { return true } )* ); diff --git a/xcm/xcm-executor/src/traits/transact_asset.rs b/xcm/xcm-executor/src/traits/transact_asset.rs index 0770228ed827..832397a0fd25 100644 --- a/xcm/xcm-executor/src/traits/transact_asset.rs +++ b/xcm/xcm-executor/src/traits/transact_asset.rs @@ -397,7 +397,7 @@ mod tests { MultiTransactor::deposit_asset( &(Here, 1u128).into(), &Here.into(), - &XcmContext::with_message_hash([0; 32]), + &XcmContext::with_message_id([0; 32]), ), Err(XcmError::AssetNotFound) ); @@ -411,7 +411,7 @@ mod tests { MultiTransactor::deposit_asset( &(Here, 1u128).into(), &Here.into(), - &XcmContext::with_message_hash([0; 32]), + &XcmContext::with_message_id([0; 32]), ), Ok(()) ); @@ -425,7 +425,7 @@ mod tests { MultiTransactor::deposit_asset( &(Here, 1u128).into(), &Here.into(), - &XcmContext::with_message_hash([0; 32]), + &XcmContext::with_message_id([0; 32]), ), Err(XcmError::Overflow) ); @@ -439,7 +439,7 @@ mod tests { MultiTransactor::deposit_asset( &(Here, 1u128).into(), &Here.into(), - &XcmContext::with_message_hash([0; 32]), + &XcmContext::with_message_id([0; 32]), ), Ok(()), ); diff --git a/xcm/xcm-simulator/example/src/parachain.rs b/xcm/xcm-simulator/example/src/parachain.rs index 1985c721765e..cea5a93ec0af 100644 --- a/xcm/xcm-simulator/example/src/parachain.rs +++ b/xcm/xcm-simulator/example/src/parachain.rs @@ -106,7 +106,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/xcm/xcm-simulator/example/src/relay_chain.rs b/xcm/xcm-simulator/example/src/relay_chain.rs index bebafed3471c..10ad9b68c634 100644 --- a/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/xcm/xcm-simulator/example/src/relay_chain.rs @@ -92,7 +92,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/xcm/xcm-simulator/fuzzer/src/parachain.rs b/xcm/xcm-simulator/fuzzer/src/parachain.rs index aace3b379c6a..4934bd6ab1c1 100644 --- a/xcm/xcm-simulator/fuzzer/src/parachain.rs +++ b/xcm/xcm-simulator/fuzzer/src/parachain.rs @@ -96,7 +96,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; diff --git a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs index 2f2105db9357..6b0023a78965 100644 --- a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs +++ b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs @@ -91,7 +91,7 @@ impl pallet_balances::Config for Runtime { type WeightInfo = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>;