-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The Vision
History
We have always had a mix of tools for testing system parachains prior to releases. However, these have always had major problems or tradeoffs, for example:
- Requiring beefy hardware to run multi-chain dev networks;
- Not using the actual production state;
- Hard-to-read Yaml, JS, macro syntaxes.
In Parity's latest releases, prior to handing over the runtimes to the Fellowship, we used a combination of Rust-based XCM-Emulator tests and JavaScript integration tests. The Emulator tests were meant to run in CI and are easy to work with for testing XCM interactions. The JS tests served as a final check prior to publishing a release, but had their own weaknesses too.
Acala has a tool called Chopsticks that fetches the on-chain state and starts a development network based on it. This is quite powerful and should be part of our testing future.
Motivation
The objective of this effort is to come up with a test suite such that the Fellowship would feel comfortable whitelisting a runtime upgrade with the tested upgrades. There are a few design constraints to consider:
- Anyone should be able to run the test suite.
- Parity's
polkadot-sdkrepo shall not depend on the runtimes maintained by the Fellowship. - The tools are well-documented and can be used by parachain developers to write their own tests.
- When a test fails, tools should support debugging.
- Tests should be runnable in CI such that failures can be detected in PRs and not at the moment of a release.
Tools
I envision a mix of both Emulator and Chopsticks.
Emulator is useful for things like ensuring that XCM programs will work properly when executed in the context of each chain. The tests run in a single process and allow for easy debugging.
Chopsticks is better suited to ensuring that runtime upgrades will work given real network conditions (for example, that a migration that iterates through some keys will not go overweight).
Both of these tools will need some modifications to be ideal for these purposes. They are both opinionated toward the people who made them. We should make them more general to work for these objectives. IMO, Parity should contribute directly to Chopsticks.
Test Coverage
We should have a set of tests related strictly to the Polkadot system (Relay Chain plus system paras). This set should include expected interactions with the chains from non-system chains.
Of course, any parachain should be able to write tests specific to their own chain. However, I would not think that these tests failing would prevent a system upgrade. Of course, they should be open for discussion and perhaps there is a reasonable solution.
The Plan
Plan to plan:
- Decide what test coverage we need.
- Decide the best tools to achieve it - probably Chopsticks and Emulator.
- Decide on repo architecture to facilitate anyone running it.
Currently, starting this effort is @joepetrowski, @0xmovses, and @NachoPal. Would be happy to have more people involved in designing this test suite (cc @ggwpez, @bkchr).
This should become a Fellowship RFC once we have a more detailed plan.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status