BridgeHub[Rococo/Wococo] test batched relaying of messages and their dispatch (#2578)

Added some tests that aim to cover the runtime configuration
that is exercised when BH receives relayed complex message.

* checks correct importing of proofs for:
  bridged chain finality, bridged para heads, bridged messages,
* checks relayer extension correctly configured to reward
  submitting relayer,
* checks relayed message is successfully dispatched.

Also moved generic test-utils from
  `asset-test-utils: parachains/runtimes/assets/test-utils`
one level up to new crate
  `parachains-runtimes-test-utils: parachains/runtimes/test-utils`
to be reused by BridgeHubs.

Signed-off-by: acatangiu <adrian@parity.io>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
This commit is contained in:
Adrian Catangiu
2023-05-18 18:10:36 +03:00
committed by GitHub
parent 93cf3908e0
commit 4e4799927a
21 changed files with 1723 additions and 980 deletions
+52
View File
@@ -394,6 +394,7 @@ dependencies = [
"pallet-xcm",
"parachain-info",
"parachains-common",
"parachains-runtimes-test-utils",
"parity-scale-codec",
"polkadot-parachain",
"sp-consensus-aura",
@@ -914,13 +915,18 @@ name = "bp-test-utils"
version = "0.1.0"
dependencies = [
"bp-header-chain",
"bp-parachains",
"bp-polkadot-core",
"bp-runtime",
"ed25519-dalek",
"finality-grandpa",
"parity-scale-codec",
"sp-application-crypto",
"sp-consensus-grandpa",
"sp-core",
"sp-runtime",
"sp-std",
"sp-trie",
]
[[package]]
@@ -1126,6 +1132,7 @@ dependencies = [
"sp-core",
"sp-inherents",
"sp-io",
"sp-keyring",
"sp-offchain",
"sp-runtime",
"sp-session",
@@ -1144,28 +1151,40 @@ name = "bridge-hub-test-utils"
version = "0.1.0"
dependencies = [
"asset-test-utils",
"bp-bridge-hub-rococo",
"bp-bridge-hub-wococo",
"bp-header-chain",
"bp-messages",
"bp-parachains",
"bp-polkadot-core",
"bp-relayers",
"bp-runtime",
"bp-test-utils",
"bridge-runtime-common",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
"cumulus-pallet-xcmp-queue",
"frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
"log",
"pallet-balances",
"pallet-bridge-grandpa",
"pallet-bridge-messages",
"pallet-bridge-parachains",
"pallet-bridge-relayers",
"pallet-collator-selection",
"pallet-session",
"pallet-utility",
"pallet-xcm",
"pallet-xcm-benchmarks",
"parachain-info",
"parachains-runtimes-test-utils",
"parity-scale-codec",
"sp-core",
"sp-io",
"sp-keyring",
"sp-runtime",
"xcm",
"xcm-builder",
@@ -8051,6 +8070,39 @@ dependencies = [
"xcm-executor",
]
[[package]]
name = "parachains-runtimes-test-utils"
version = "1.0.0"
dependencies = [
"assets-common",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
"cumulus-primitives-parachain-inherent",
"cumulus-test-relay-sproof-builder",
"frame-support",
"frame-system",
"hex-literal 0.3.4",
"pallet-assets",
"pallet-balances",
"pallet-collator-selection",
"pallet-session",
"pallet-xcm",
"parachain-info",
"parachains-common",
"parity-scale-codec",
"polkadot-parachain",
"sp-consensus-aura",
"sp-core",
"sp-io",
"sp-runtime",
"sp-std",
"substrate-wasm-builder",
"xcm",
"xcm-executor",
]
[[package]]
name = "parity-db"
version = "0.4.8"