[Feature] XCM-Emulator (#2447)

* [Feature] XCM-Emulator

* ".git/.scripts/commands/fmt/fmt.sh"

* rename

* readme

* more rename

* rename directory

* implement AssetTransactor

* Update xcm/xcm-emulator/README.md

Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com>

* address review comments (#2502)

* Update xcm/xcm-emulator/example/src/lib.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update xcm/xcm-emulator/README.md

* Use 2d weights.

* Point out nearer the failure why it should fail

* Move test-runtime to under examples

* Walk through how to use it

* proof needs to be non-zero

* Apply suggestions from code review

* Update xcm/xcm-emulator/README.md

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Improve xcm emulator (#2593)

* folder restructutre

* common created

* make macros repetitions

* messenger traits for relay and para

* default Messenger impls

* messenger traits refactor

* declared two networks

* init network approach works

* queues use HashMap but relay block number

* init and reset refactor

* messengers trait name changed

* relay block number suboptimal

* fix reset hashmap keys

* genesis added

* test ext added for parachains

* genesis added relay chains

* genesis to storage

* new_ext replaced by on_init

* new relay block number approach

* ext_wrapper added

* added types to Parachain trait

* relay chain with types

* restructure

* para_ids working

* replace para_id getter

* replace para_id getter 2

* tests restructure + common variables

* added sovereign and balances helpers

* more helpers + tess pass

* expected events macro added

* added events trait method

* expect_events macro improve

* expect_events macro done

* network traits added

* reserve_transfer test added

* para & relay macro inputs redefined

* added collectives & BH paras

* test restructure

* statemine removed

* nitpick

* rename test folder + events logs

* clean

* weight threshold helper

* update readme

* remove cumulus-test-service dependancy

* fmt

* comment docs

* update e2e tests to xcm v3

* clippy + runtime-benchmark + clean docs

---------

Co-authored-by: command-bot <>
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com>
Co-authored-by: Squirrel <gilescope@gmail.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Ignacio Palacios <ignacio.palacios.santos@gmail.com>
This commit is contained in:
Roman Useinov
2023-05-19 19:53:41 +02:00
committed by GitHub
parent 8425e2a5c0
commit 944ab483d5
40 changed files with 3848 additions and 1859 deletions
+108
View File
@@ -1347,6 +1347,15 @@ dependencies = [
"thiserror",
]
[[package]]
name = "casey"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fabe85130dda9cf267715582ce6cf1ab581c8dfe3cb33f7065fee0f14e3fea14"
dependencies = [
"syn 1.0.109",
]
[[package]]
name = "cast"
version = "0.3.0"
@@ -4861,6 +4870,47 @@ dependencies = [
"num-traits",
]
[[package]]
name = "integration-tests-common"
version = "1.0.0"
dependencies = [
"bridge-hub-kusama-runtime",
"bridge-hub-polkadot-runtime",
"collectives-polkadot-runtime",
"cumulus-primitives-core",
"frame-support",
"frame-system",
"kusama-runtime",
"kusama-runtime-constants",
"pallet-assets",
"pallet-balances",
"pallet-im-online",
"pallet-staking",
"pallet-xcm",
"parachain-info",
"parachains-common",
"parity-scale-codec",
"penpal-runtime",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-primitives",
"polkadot-runtime",
"polkadot-runtime-constants",
"polkadot-runtime-parachains",
"polkadot-service",
"sc-consensus-grandpa",
"sp-authority-discovery",
"sp-consensus-babe",
"sp-core",
"sp-runtime",
"sp-weights",
"statemine-runtime",
"statemint-runtime",
"xcm",
"xcm-emulator",
"xcm-executor",
]
[[package]]
name = "interceptor"
version = "0.8.2"
@@ -13536,6 +13586,32 @@ dependencies = [
"xcm-executor",
]
[[package]]
name = "statemint-it"
version = "1.0.0"
dependencies = [
"frame-support",
"frame-system",
"integration-tests-common",
"pallet-assets",
"pallet-balances",
"pallet-xcm",
"parachains-common",
"parity-scale-codec",
"penpal-runtime",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime",
"polkadot-runtime-parachains",
"sp-core",
"sp-runtime",
"sp-weights",
"statemint-runtime",
"xcm",
"xcm-emulator",
"xcm-executor",
]
[[package]]
name = "statemint-runtime"
version = "1.0.0"
@@ -16058,6 +16134,38 @@ dependencies = [
"xcm-executor",
]
[[package]]
name = "xcm-emulator"
version = "0.1.0"
dependencies = [
"casey",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
"cumulus-primitives-parachain-inherent",
"cumulus-test-relay-sproof-builder",
"cumulus-test-service",
"frame-support",
"frame-system",
"log",
"pallet-balances",
"parachain-info",
"parachains-common",
"parity-scale-codec",
"paste",
"polkadot-primitives",
"polkadot-runtime-parachains",
"quote",
"sp-arithmetic",
"sp-core",
"sp-io",
"sp-std",
"sp-trie",
"xcm",
"xcm-executor",
]
[[package]]
name = "xcm-executor"
version = "0.9.41"