Crates.io | xcm-emulator |
lib.rs | xcm-emulator |
version | 0.12.0 |
source | src |
created_at | 2023-06-21 02:48:23.583377 |
updated_at | 2024-07-13 13:38:43.332049 |
description | Test kit to emulate XCM program execution. (polkadot v1.14.0) |
homepage | |
repository | |
max_upload_size | |
id | 895729 |
size | 58,680 |
XCM-Emulator is a tool to emulate XCM program execution using pre-configured runtimes, including those used to run on live networks, such as Kusama, Polkadot, Asset Hubs, et cetera. This allows for testing cross-chain message passing and verifying outcomes, weights, and side-effects. It is faster than spinning up a zombienet and as all the chains are in one process debugging using Clion is easy.
As the messages do not physically go through the same messaging infrastructure there is some code that is not being tested compared to using slower E2E tests. In future it may be possible to run these XCM emulated tests as E2E tests (without changes).
As well as the XCM message transport being mocked out, so too are areas around consensus, in particular things like disputes, staking and iamonline events can't be tested.
If you just wish to test execution of various XCM instructions
against the XCM VM then the xcm-simulator
(in the Polkadot
repo) is the perfect tool for this.