Support XCM v1 (Companion to #2815) (#561)

* support for XCM v1

* Fixes

* Fix.

* Use `xcm::latest`

* Bump Polkadot

Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Gavin Wood
2021-08-06 21:13:33 +02:00
committed by Bastian Köcher
parent fd80849dde
commit e36689ffc8
12 changed files with 225 additions and 207 deletions
Generated
+173 -158
View File
@@ -90,6 +90,12 @@ dependencies = [
"opaque-debug 0.3.0",
]
[[package]]
name = "ahash"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e"
[[package]]
name = "ahash"
version = "0.7.4"
@@ -729,7 +735,7 @@ dependencies = [
[[package]]
name = "bp-header-chain"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"finality-grandpa",
"frame-support",
@@ -744,7 +750,7 @@ dependencies = [
[[package]]
name = "bp-message-dispatch"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bp-runtime",
"frame-support",
@@ -755,7 +761,7 @@ dependencies = [
[[package]]
name = "bp-messages"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bitvec",
"bp-runtime",
@@ -770,7 +776,7 @@ dependencies = [
[[package]]
name = "bp-polkadot-core"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bp-messages",
"bp-runtime",
@@ -787,7 +793,7 @@ dependencies = [
[[package]]
name = "bp-rialto"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bp-messages",
"bp-runtime",
@@ -802,7 +808,7 @@ dependencies = [
[[package]]
name = "bp-rococo"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bp-messages",
"bp-polkadot-core",
@@ -819,7 +825,7 @@ dependencies = [
[[package]]
name = "bp-runtime"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"frame-support",
"hash-db",
@@ -836,7 +842,7 @@ dependencies = [
[[package]]
name = "bp-test-utils"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bp-header-chain",
"ed25519-dalek",
@@ -851,7 +857,7 @@ dependencies = [
[[package]]
name = "bp-wococo"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bp-messages",
"bp-polkadot-core",
@@ -866,7 +872,7 @@ dependencies = [
[[package]]
name = "bridge-runtime-common"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bp-message-dispatch",
"bp-messages",
@@ -3202,13 +3208,22 @@ dependencies = [
"crunchy",
]
[[package]]
name = "hashbrown"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
dependencies = [
"ahash 0.4.7",
]
[[package]]
name = "hashbrown"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
dependencies = [
"ahash",
"ahash 0.7.4",
]
[[package]]
@@ -3247,9 +3262,9 @@ dependencies = [
[[package]]
name = "hex-literal"
version = "0.3.3"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21e4590e13640f19f249fe3e4eca5113bc4289f2497710378190e7f4bd96f45b"
checksum = "5af1f635ef1bc545d78392b136bfe1c9809e029023c84a3638a864a10b8819c8"
[[package]]
name = "hex-literal-impl"
@@ -3599,7 +3614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5"
dependencies = [
"autocfg 1.0.1",
"hashbrown",
"hashbrown 0.11.2",
"serde",
]
@@ -3908,8 +3923,8 @@ dependencies = [
[[package]]
name = "kusama-runtime"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -3921,7 +3936,7 @@ dependencies = [
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"log",
"pallet-authority-discovery",
"pallet-authorship",
@@ -4681,11 +4696,11 @@ dependencies = [
[[package]]
name = "lru"
version = "0.6.6"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91"
checksum = "1f374d42cdfc1d7dbf3d3dec28afab2eb97ffbf43a3234d795b5986dbf4b90ba"
dependencies = [
"hashbrown",
"hashbrown 0.9.1",
]
[[package]]
@@ -4788,7 +4803,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5"
dependencies = [
"hash-db",
"hashbrown",
"hashbrown 0.11.2",
"parity-util-mem",
]
@@ -4821,8 +4836,8 @@ dependencies = [
[[package]]
name = "metered-channel"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"derive_more 0.99.14",
"futures 0.3.16",
@@ -5407,7 +5422,7 @@ dependencies = [
[[package]]
name = "pallet-bridge-dispatch"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bp-message-dispatch",
"bp-runtime",
@@ -5423,7 +5438,7 @@ dependencies = [
[[package]]
name = "pallet-bridge-grandpa"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bp-header-chain",
"bp-runtime",
@@ -5444,7 +5459,7 @@ dependencies = [
[[package]]
name = "pallet-bridge-messages"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bitvec",
"bp-message-dispatch",
@@ -6074,8 +6089,8 @@ dependencies = [
[[package]]
name = "pallet-xcm"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"frame-support",
"frame-system",
@@ -6193,7 +6208,7 @@ checksum = "7ad6f1acec69b95caf435bbd158d486e5a0a44fcf51531e84922c59ff09e8457"
dependencies = [
"cfg-if 1.0.0",
"ethereum-types",
"hashbrown",
"hashbrown 0.11.2",
"impl-trait-for-tuples",
"lru",
"parity-util-mem-derive",
@@ -6525,8 +6540,8 @@ checksum = "989d43012e2ca1c4a02507c67282691a0a3207f9dc67cec596b43fe925b3d325"
[[package]]
name = "polkadot-approval-distribution"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"polkadot-node-network-protocol",
@@ -6539,8 +6554,8 @@ dependencies = [
[[package]]
name = "polkadot-availability-bitfield-distribution"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"polkadot-node-network-protocol",
@@ -6552,8 +6567,8 @@ dependencies = [
[[package]]
name = "polkadot-availability-distribution"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"lru",
@@ -6575,8 +6590,8 @@ dependencies = [
[[package]]
name = "polkadot-availability-recovery"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"lru",
@@ -6594,8 +6609,8 @@ dependencies = [
[[package]]
name = "polkadot-cli"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"frame-benchmarking-cli",
"futures 0.3.16",
@@ -6614,8 +6629,8 @@ dependencies = [
[[package]]
name = "polkadot-client"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"beefy-primitives",
"frame-benchmarking",
@@ -6717,8 +6732,8 @@ dependencies = [
[[package]]
name = "polkadot-collator-protocol"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"always-assert",
"futures 0.3.16",
@@ -6737,8 +6752,8 @@ dependencies = [
[[package]]
name = "polkadot-core-primitives"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"parity-scale-codec",
"parity-util-mem",
@@ -6749,8 +6764,8 @@ dependencies = [
[[package]]
name = "polkadot-dispute-distribution"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"lru",
@@ -6773,8 +6788,8 @@ dependencies = [
[[package]]
name = "polkadot-erasure-coding"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"parity-scale-codec",
"polkadot-node-primitives",
@@ -6787,8 +6802,8 @@ dependencies = [
[[package]]
name = "polkadot-gossip-support"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"polkadot-node-network-protocol",
@@ -6805,8 +6820,8 @@ dependencies = [
[[package]]
name = "polkadot-network-bridge"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-trait",
"futures 0.3.16",
@@ -6825,8 +6840,8 @@ dependencies = [
[[package]]
name = "polkadot-node-collation-generation"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"parity-scale-codec",
@@ -6843,8 +6858,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-approval-voting"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bitvec",
"derive_more 0.99.14",
@@ -6873,8 +6888,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-av-store"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bitvec",
"futures 0.3.16",
@@ -6893,8 +6908,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-backing"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bitvec",
"futures 0.3.16",
@@ -6911,8 +6926,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-bitfield-signing"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"polkadot-node-subsystem",
@@ -6926,8 +6941,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-candidate-validation"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-trait",
"futures 0.3.16",
@@ -6944,8 +6959,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-chain-api"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"polkadot-node-subsystem",
@@ -6959,8 +6974,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-chain-selection"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"futures-timer 3.0.2",
@@ -6976,8 +6991,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-dispute-coordinator"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bitvec",
"derive_more 0.99.14",
@@ -6995,8 +7010,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-dispute-participation"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"polkadot-node-primitives",
@@ -7008,8 +7023,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-parachains-inherent"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-trait",
"futures 0.3.16",
@@ -7025,8 +7040,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-provisioner"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bitvec",
"futures 0.3.16",
@@ -7040,8 +7055,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-pvf"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"always-assert",
"assert_matches",
@@ -7070,8 +7085,8 @@ dependencies = [
[[package]]
name = "polkadot-node-core-runtime-api"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"memory-lru",
@@ -7088,8 +7103,8 @@ dependencies = [
[[package]]
name = "polkadot-node-jaeger"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-std",
"lazy_static",
@@ -7106,8 +7121,8 @@ dependencies = [
[[package]]
name = "polkadot-node-metrics"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-trait",
"futures 0.3.16",
@@ -7122,8 +7137,8 @@ dependencies = [
[[package]]
name = "polkadot-node-network-protocol"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-trait",
"futures 0.3.16",
@@ -7139,8 +7154,8 @@ dependencies = [
[[package]]
name = "polkadot-node-primitives"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"futures 0.3.16",
"parity-scale-codec",
@@ -7163,8 +7178,8 @@ dependencies = [
[[package]]
name = "polkadot-node-subsystem"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"polkadot-node-jaeger",
"polkadot-node-subsystem-types",
@@ -7173,8 +7188,8 @@ dependencies = [
[[package]]
name = "polkadot-node-subsystem-test-helpers"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-trait",
"futures 0.3.16",
@@ -7199,8 +7214,8 @@ dependencies = [
[[package]]
name = "polkadot-node-subsystem-types"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-std",
"async-trait",
@@ -7229,8 +7244,8 @@ dependencies = [
[[package]]
name = "polkadot-node-subsystem-util"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-trait",
"futures 0.3.16",
@@ -7259,8 +7274,8 @@ dependencies = [
[[package]]
name = "polkadot-overseer"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-trait",
"futures 0.3.16",
@@ -7281,8 +7296,8 @@ dependencies = [
[[package]]
name = "polkadot-overseer-all-subsystems-gen"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"assert_matches",
"proc-macro2 1.0.28",
@@ -7292,8 +7307,8 @@ dependencies = [
[[package]]
name = "polkadot-overseer-gen"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-trait",
"futures 0.3.16",
@@ -7309,8 +7324,8 @@ dependencies = [
[[package]]
name = "polkadot-overseer-gen-proc-macro"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"proc-macro-crate 1.0.0",
"proc-macro2 1.0.28",
@@ -7320,8 +7335,8 @@ dependencies = [
[[package]]
name = "polkadot-parachain"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"derive_more 0.99.14",
"frame-support",
@@ -7336,12 +7351,12 @@ dependencies = [
[[package]]
name = "polkadot-primitives"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bitvec",
"frame-system",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"parity-scale-codec",
"parity-util-mem",
"polkadot-core-primitives",
@@ -7366,8 +7381,8 @@ dependencies = [
[[package]]
name = "polkadot-rpc"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"beefy-gadget",
"beefy-gadget-rpc",
@@ -7399,8 +7414,8 @@ dependencies = [
[[package]]
name = "polkadot-runtime"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -7412,7 +7427,7 @@ dependencies = [
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"log",
"pallet-authority-discovery",
"pallet-authorship",
@@ -7474,8 +7489,8 @@ dependencies = [
[[package]]
name = "polkadot-runtime-common"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bitvec",
"frame-benchmarking",
@@ -7517,8 +7532,8 @@ dependencies = [
[[package]]
name = "polkadot-runtime-parachains"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"bitflags",
"bitvec",
@@ -7556,15 +7571,15 @@ dependencies = [
[[package]]
name = "polkadot-service"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"async-trait",
"beefy-gadget",
"beefy-primitives",
"frame-system-rpc-runtime-api",
"futures 0.3.16",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"kusama-runtime",
"kvdb",
"kvdb-rocksdb",
@@ -7605,7 +7620,7 @@ dependencies = [
"polkadot-runtime",
"polkadot-runtime-parachains",
"polkadot-statement-distribution",
"rococo-runtime 0.9.9",
"rococo-runtime 0.9.9-1",
"sc-authority-discovery",
"sc-basic-authorship",
"sc-block-builder",
@@ -7652,8 +7667,8 @@ dependencies = [
[[package]]
name = "polkadot-statement-distribution"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"arrayvec 0.5.2",
"futures 0.3.16",
@@ -7673,8 +7688,8 @@ dependencies = [
[[package]]
name = "polkadot-statement-table"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"parity-scale-codec",
"polkadot-primitives",
@@ -7683,8 +7698,8 @@ dependencies = [
[[package]]
name = "polkadot-test-client"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"parity-scale-codec",
"polkadot-node-subsystem",
@@ -7708,8 +7723,8 @@ dependencies = [
[[package]]
name = "polkadot-test-runtime"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -7768,8 +7783,8 @@ dependencies = [
[[package]]
name = "polkadot-test-service"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"frame-benchmarking",
"frame-system",
@@ -8614,7 +8629,7 @@ dependencies = [
"frame-support",
"frame-system",
"hex",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"log",
"pallet-assets",
"pallet-aura",
@@ -8648,8 +8663,8 @@ dependencies = [
[[package]]
name = "rococo-runtime"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"beefy-primitives",
"bp-messages",
@@ -8661,7 +8676,7 @@ dependencies = [
"frame-support",
"frame-system",
"frame-system-rpc-runtime-api",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"log",
"pallet-authority-discovery",
"pallet-authorship",
@@ -10174,7 +10189,7 @@ dependencies = [
"frame-support",
"frame-system",
"hex",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"log",
"parachain-info",
"parity-scale-codec",
@@ -10257,8 +10272,8 @@ dependencies = [
[[package]]
name = "slot-range-helper"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"enumn",
"parity-scale-codec",
@@ -11082,7 +11097,7 @@ dependencies = [
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"hex",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"log",
"node-primitives",
"pallet-assets",
@@ -11170,7 +11185,7 @@ dependencies = [
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"hex",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"log",
"node-primitives",
"pallet-assets",
@@ -11560,18 +11575,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.26"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2"
checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.26"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745"
checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0"
dependencies = [
"proc-macro2 1.0.28",
"quote 1.0.9",
@@ -12074,7 +12089,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa"
dependencies = [
"hash-db",
"hashbrown",
"hashbrown 0.11.2",
"log",
"rustc-hex",
"smallvec 1.6.1",
@@ -12179,7 +12194,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59"
dependencies = [
"cfg-if 0.1.10",
"rand 0.6.5",
"rand 0.7.3",
"static_assertions",
]
@@ -12776,8 +12791,8 @@ dependencies = [
[[package]]
name = "westend-runtime"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -12789,7 +12804,7 @@ dependencies = [
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"log",
"pallet-authority-discovery",
"pallet-authorship",
@@ -12877,7 +12892,7 @@ dependencies = [
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"hex",
"hex-literal 0.3.3",
"hex-literal 0.3.1",
"log",
"node-primitives",
"pallet-assets",
@@ -13018,8 +13033,8 @@ dependencies = [
[[package]]
name = "xcm"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"derivative",
"impl-trait-for-tuples",
@@ -13029,8 +13044,8 @@ dependencies = [
[[package]]
name = "xcm-builder"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"frame-support",
"frame-system",
@@ -13048,8 +13063,8 @@ dependencies = [
[[package]]
name = "xcm-executor"
version = "0.9.9"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#0f4a7663c605d4b002ccae02df22a7fc0819d582"
version = "0.9.9-1"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.9#7a9f624777ad2d2adb3a1e6797a31f9d653c9587"
dependencies = [
"frame-support",
"impl-trait-for-tuples",
+3 -3
View File
@@ -26,7 +26,7 @@ use cumulus_primitives_core::relay_chain::BlockNumber as RelayBlockNumber;
use cumulus_primitives_core::DmpMessageHandler;
use codec::{Encode, Decode};
use sp_runtime::RuntimeDebug;
use xcm::{VersionedXcm, v0::{Xcm, Junction, Outcome, ExecuteXcm, Error as XcmError}};
use xcm::{VersionedXcm, latest::{Xcm, Junction, Outcome, ExecuteXcm, Error as XcmError}};
use frame_support::{traits::EnsureOrigin, dispatch::Weight, weights::constants::WEIGHT_PER_MILLIS};
pub use pallet::*;
@@ -341,11 +341,11 @@ mod tests {
use sp_runtime::{testing::Header, traits::{IdentityLookup, BlakeTwo256}};
use sp_runtime::DispatchError::BadOrigin;
use sp_version::RuntimeVersion;
use xcm::v0::{MultiLocation, OriginKind};
use xcm::latest::{MultiLocation, OriginKind};
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
type Block = frame_system::mocking::MockBlock<Test>;
type Xcm = xcm::v0::Xcm<Call>;
type Xcm = xcm::latest::Xcm<Call>;
frame_support::construct_runtime!(
pub enum Test where
+1 -1
View File
@@ -25,7 +25,7 @@ use cumulus_primitives_core::{ParaId, DmpMessageHandler};
use cumulus_primitives_core::relay_chain::BlockNumber as RelayBlockNumber;
use codec::{Encode, Decode};
use sp_runtime::traits::BadOrigin;
use xcm::{VersionedXcm, v0::{Xcm, Junction, Outcome, ExecuteXcm}};
use xcm::{VersionedXcm, latest::{Xcm, Junction, Outcome, ExecuteXcm}};
use frame_support::dispatch::Weight;
pub use pallet::*;
+11 -10
View File
@@ -42,11 +42,8 @@ use rand_chacha::{
ChaChaRng,
};
use sp_runtime::{traits::Hash, RuntimeDebug};
use sp_std::{convert::TryFrom, prelude::*};
use xcm::{
v0::{Error as XcmError, ExecuteXcm, Junction, MultiLocation, Outcome, SendXcm, Xcm},
VersionedXcm,
};
use sp_std::{prelude::*, convert::TryFrom};
use xcm::{latest::prelude::*, WrapVersion, VersionedXcm};
pub use pallet::*;
@@ -69,6 +66,9 @@ pub mod pallet {
/// Information on the avaialble XCMP channels.
type ChannelInfo: GetChannelInfo;
/// Means of converting an `Xcm` into a `VersionedXcm`.
type VersionWrapper: WrapVersion;
}
impl Default for QueueConfigData {
@@ -351,7 +351,7 @@ impl<T: Config> Pallet<T> {
log::debug!("Processing XCMP-XCM: {:?}", &hash);
let (result, event) = match Xcm::<T::Call>::try_from(xcm) {
Ok(xcm) => {
let location = (Junction::Parent, Junction::Parachain(sender.into()));
let location = (Parent, Parachain(sender.into()));
match T::XcmExecutor::execute_xcm(location.into(), xcm, max_weight) {
Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)),
Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))),
@@ -777,13 +777,14 @@ impl<T: Config> SendXcm for Pallet<T> {
fn send_xcm(dest: MultiLocation, msg: Xcm<()>) -> Result<(), XcmError> {
match &dest {
// An HRMP message for a sibling parachain.
MultiLocation::X2(Junction::Parent, Junction::Parachain(id)) => {
let msg = VersionedXcm::<()>::from(msg);
let hash = T::Hashing::hash_of(&msg);
X2(Parent, Parachain(id)) => {
let versioned_xcm = T::VersionWrapper::wrap_version(&dest, msg)
.map_err(|()| XcmError::DestinationUnsupported)?;
let hash = T::Hashing::hash_of(&versioned_xcm);
Self::send_fragment(
(*id).into(),
XcmpMessageFormat::ConcatenatedVersionedXcm,
msg,
versioned_xcm,
)
.map_err(|e| XcmError::SendFailed(<&'static str>::from(e)))?;
Self::deposit_event(Event::XcmpMessageSent(Some(hash)));
+4 -8
View File
@@ -17,10 +17,7 @@ use super::*;
use crate as xcmp_queue;
use sp_core::H256;
use frame_support::parameter_types;
use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup},
testing::{Header},
};
use sp_runtime::{traits::{BlakeTwo256, IdentityLookup}, testing::Header};
use xcm_builder::{
FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, CurrencyAdapter,
ParentIsDefault,
@@ -107,10 +104,8 @@ impl cumulus_pallet_parachain_system::Config for Test {
}
parameter_types! {
pub const RelayChain: MultiLocation = MultiLocation::X1(Junction::Parent);
pub Ancestry: MultiLocation = MultiLocation::X1(
Junction::Parachain(1u32.into())
);
pub const RelayChain: MultiLocation = X1(Parent);
pub Ancestry: MultiLocation = X1(Parachain(1u32.into()));
pub UnitWeightCost: Weight = 1_000_000;
}
@@ -157,6 +152,7 @@ impl Config for Test {
type Event = Event;
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
type ChannelInfo = ParachainSystem;
type VersionWrapper = ();
}
pub fn new_test_ext() -> sp_io::TestExternalities {
+1 -1
View File
@@ -23,7 +23,7 @@ use sp_runtime::traits::Saturating;
use frame_system::Config as SystemConfig;
use cumulus_primitives_core::ParaId;
use cumulus_pallet_xcm::{Origin as CumulusOrigin, ensure_sibling_para};
use xcm::v0::{Xcm, Error as XcmError, SendXcm, OriginKind, MultiLocation, Junction};
use xcm::latest::{Xcm, Error as XcmError, SendXcm, OriginKind, MultiLocation, Junction};
pub use pallet::*;
+3 -2
View File
@@ -56,7 +56,7 @@ pub use sp_runtime::{Perbill, Permill};
// XCM imports
use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough};
use polkadot_parachain::primitives::Sibling;
use xcm::v0::{BodyId, Junction::*, MultiLocation, MultiLocation::*, NetworkId, Xcm};
use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset,
@@ -356,7 +356,7 @@ pub type LocalOriginToLocation = SignedToAccountId32<Origin, AccountId, RococoNe
/// queues.
pub type XcmRouter = (
// Two routers - use UMP to communicate with the relay chain:
cumulus_primitives_utility::ParentAsUmp<ParachainSystem>,
cumulus_primitives_utility::ParentAsUmp<ParachainSystem, ()>,
// ..and XCMP to communicate with the sibling chains.
XcmpQueue,
);
@@ -383,6 +383,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type Event = Event;
type XcmExecutor = XcmExecutor<XcmConfig>;
type ChannelInfo = ParachainSystem;
type VersionWrapper = ();
}
impl cumulus_pallet_dmp_queue::Config for Runtime {
+1 -1
View File
@@ -51,7 +51,7 @@ pub use sp_runtime::BuildStorage;
pub use sp_runtime::{Perbill, Permill};
// XCM imports
use xcm::v0::{Junction::*, MultiLocation, MultiLocation::*, NetworkId};
use xcm::latest::prelude::*;
use xcm_builder::{
AllowUnpaidExecutionFrom, FixedWeightBounds, LocationInverter, ParentAsSuperuser,
ParentIsDefault, SovereignSignedViaLocation,
+7 -6
View File
@@ -68,7 +68,7 @@ pub use sp_runtime::BuildStorage;
use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough};
use polkadot_parachain::primitives::Sibling;
use polkadot_runtime_common::{BlockHashCount, RocksDbWeight, SlowAdjustingFeeUpdate};
use xcm::v0::{BodyId, Junction, MultiLocation, NetworkId};
use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset,
@@ -466,10 +466,10 @@ impl parachain_info::Config for Runtime {}
impl cumulus_pallet_aura_ext::Config for Runtime {}
parameter_types! {
pub const KsmLocation: MultiLocation = MultiLocation::X1(Junction::Parent);
pub const KsmLocation: MultiLocation = X1(Parent);
pub const RelayNetwork: NetworkId = NetworkId::Kusama;
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
pub Ancestry: MultiLocation = Junction::Parachain(ParachainInfo::parachain_id().into()).into();
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
}
/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
@@ -529,8 +529,8 @@ parameter_types! {
match_type! {
pub type ParentOrParentsExecutivePlurality: impl Contains<MultiLocation> = {
MultiLocation::X1(Junction::Parent) |
MultiLocation::X2(Junction::Parent, Junction::Plurality { id: BodyId::Executive, .. })
X1(Parent) |
X2(Parent, Plurality { id: BodyId::Executive, .. })
};
}
@@ -568,7 +568,7 @@ pub type LocalOriginToLocation = SignedToAccountId32<Origin, AccountId, RelayNet
/// queues.
pub type XcmRouter = (
// Two routers - use UMP to communicate with the relay chain:
cumulus_primitives_utility::ParentAsUmp<ParachainSystem>,
cumulus_primitives_utility::ParentAsUmp<ParachainSystem, ()>,
// ..and XCMP to communicate with the sibling chains.
XcmpQueue,
);
@@ -595,6 +595,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type Event = Event;
type XcmExecutor = XcmExecutor<XcmConfig>;
type ChannelInfo = ParachainSystem;
type VersionWrapper = ();
}
impl cumulus_pallet_dmp_queue::Config for Runtime {
+7 -6
View File
@@ -68,7 +68,7 @@ pub use sp_runtime::BuildStorage;
use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough};
use polkadot_parachain::primitives::Sibling;
use polkadot_runtime_common::{BlockHashCount, RocksDbWeight, SlowAdjustingFeeUpdate};
use xcm::v0::{BodyId, Junction, MultiAsset, MultiLocation, NetworkId, Xcm};
use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset,
@@ -432,10 +432,10 @@ impl parachain_info::Config for Runtime {}
impl cumulus_pallet_aura_ext::Config for Runtime {}
parameter_types! {
pub const DotLocation: MultiLocation = MultiLocation::X1(Junction::Parent);
pub const DotLocation: MultiLocation = X1(Parent);
pub const RelayNetwork: NetworkId = NetworkId::Polkadot;
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
pub Ancestry: MultiLocation = Junction::Parachain(ParachainInfo::parachain_id().into()).into();
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
}
/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
@@ -495,8 +495,8 @@ parameter_types! {
match_type! {
pub type ParentOrParentsExecutivePlurality: impl Contains<MultiLocation> = {
MultiLocation::X1(Junction::Parent) |
MultiLocation::X2(Junction::Parent, Junction::Plurality { id: BodyId::Executive, .. })
X1(Parent) |
X2(Parent, Plurality { id: BodyId::Executive, .. })
};
}
@@ -534,7 +534,7 @@ pub type LocalOriginToLocation = SignedToAccountId32<Origin, AccountId, RelayNet
/// queues.
pub type XcmRouter = (
// Two routers - use UMP to communicate with the relay chain:
cumulus_primitives_utility::ParentAsUmp<ParachainSystem>,
cumulus_primitives_utility::ParentAsUmp<ParachainSystem, ()>,
// ..and XCMP to communicate with the sibling chains.
XcmpQueue,
);
@@ -561,6 +561,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type Event = Event;
type XcmExecutor = XcmExecutor<XcmConfig>;
type ChannelInfo = ParachainSystem;
type VersionWrapper = ();
}
impl cumulus_pallet_dmp_queue::Config for Runtime {
+7 -6
View File
@@ -68,7 +68,7 @@ pub use sp_runtime::BuildStorage;
use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling;
use polkadot_runtime_common::{BlockHashCount, RocksDbWeight, SlowAdjustingFeeUpdate};
use xcm::v0::{Junction, MultiLocation, NetworkId};
use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset,
@@ -431,10 +431,10 @@ impl parachain_info::Config for Runtime {}
impl cumulus_pallet_aura_ext::Config for Runtime {}
parameter_types! {
pub const WestendLocation: MultiLocation = MultiLocation::X1(Junction::Parent);
pub const WestendLocation: MultiLocation = X1(Parent);
pub RelayNetwork: NetworkId = NetworkId::Named(b"Westend".to_vec());
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
pub Ancestry: MultiLocation = Junction::Parachain(ParachainInfo::parachain_id().into()).into();
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
}
/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
@@ -493,8 +493,8 @@ parameter_types! {
match_type! {
pub type ParentOrParentsPlurality: impl Contains<MultiLocation> = {
MultiLocation::X1(Junction::Parent) |
MultiLocation::X2(Junction::Parent, Junction::Plurality { .. })
X1(Parent) |
X2(Parent, Plurality { .. })
};
}
@@ -532,7 +532,7 @@ pub type LocalOriginToLocation = SignedToAccountId32<Origin, AccountId, RelayNet
/// queues.
pub type XcmRouter = (
// Two routers - use UMP to communicate with the relay chain:
cumulus_primitives_utility::ParentAsUmp<ParachainSystem>,
cumulus_primitives_utility::ParentAsUmp<ParachainSystem, ()>,
// ..and XCMP to communicate with the sibling chains.
XcmpQueue,
);
@@ -559,6 +559,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type Event = Event;
type XcmExecutor = XcmExecutor<XcmConfig>;
type ChannelInfo = ParachainSystem;
type VersionWrapper = ();
}
impl cumulus_pallet_dmp_queue::Config for Runtime {
+7 -5
View File
@@ -22,7 +22,7 @@
use sp_std::marker::PhantomData;
use codec::Encode;
use cumulus_primitives_core::UpwardMessageSender;
use xcm::{VersionedXcm, v0::{Xcm, MultiLocation, Junction, SendXcm, Error as XcmError}};
use xcm::{WrapVersion, latest::prelude::*};
/// Xcm router which recognises the `Parent` destination and handles it by sending the message into
/// the given UMP `UpwardMessageSender` implementation. Thus this essentially adapts an
@@ -31,13 +31,15 @@ use xcm::{VersionedXcm, v0::{Xcm, MultiLocation, Junction, SendXcm, Error as Xcm
/// NOTE: This is a pretty dumb "just send it" router; we will probably want to introduce queuing
/// to UMP eventually and when we do, the pallet which implements the queuing will be responsible
/// for the `SendXcm` implementation.
pub struct ParentAsUmp<T>(PhantomData<T>);
impl<T: UpwardMessageSender> SendXcm for ParentAsUmp<T> {
pub struct ParentAsUmp<T, W>(PhantomData<(T, W)>);
impl<T: UpwardMessageSender, W: WrapVersion> SendXcm for ParentAsUmp<T, W> {
fn send_xcm(dest: MultiLocation, msg: Xcm<()>) -> Result<(), XcmError> {
match &dest {
// An upward message for the relay chain.
MultiLocation::X1(Junction::Parent) => {
let data = VersionedXcm::<()>::from(msg).encode();
MultiLocation::X1(Parent) => {
let versioned_xcm = W::wrap_version(&dest, msg)
.map_err(|()| XcmError::DestinationUnsupported)?;
let data = versioned_xcm.encode();
T::send_upward_message(data)
.map_err(|e| XcmError::SendFailed(e.into()))?;