Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions runtime/robonomics/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ impl Contains<Location> for ParentOrParentsPlurality {
}
match &location.interior {
Here => true,
Junctions::X1(arc) => {
matches!(arc.as_ref(), [Junction::Plurality { .. }])
Junctions::X1(junction) => {
matches!(junction, Junction::Plurality { .. })
}
_ => false,
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/zombienet/ADDING_TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ await api.tx.sudo.sudo(tx).signAndSend(sudo);

## XCM Testing Examples

The test suite includes XCM (Cross-Consensus Messaging) v5 tests demonstrating cross-chain communication patterns.
The test suite includes XCM (Cross-Consensus Messaging) v4 tests demonstrating cross-chain communication patterns.

### Testing XCM Upward Messages (Parachain → Relay Chain)

Expand Down Expand Up @@ -523,7 +523,7 @@ async function testAssetHubTransfer(testResults) {

### Key Points for XCM Tests

1. **Use XCM v5 Types**: Always use `Location` (not `MultiLocation`) and the v5 API
1. **Use XCM v4 Types**: Use the `Location` type (v4+) instead of the legacy v3 `MultiLocation`; the examples above use XCM v4 enums (e.g. `V4` variants).
2. **Event Monitoring**: Subscribe to events on both source and destination chains
3. **Timeouts**: XCM messages may take time to process; use appropriate timeouts
4. **Weight Limits**: Specify weight limits for execution (Unlimited for testing)
Expand Down
2 changes: 1 addition & 1 deletion scripts/zombienet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const TESTS_CONFIG = {

### XCM Tests

The XCM test suite uses XCM v5 with the new `Location` types. All tests verify cross-chain message passing and execution.
The XCM test suite uses XCM v4 with the new `Location` types. All tests verify cross-chain message passing and execution.

#### 4. XCM Upward Message Test
- **Purpose**: Tests XCM messages from parachain to relay chain
Expand Down
6 changes: 6 additions & 0 deletions scripts/zombienet/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"

# Configuration
# NOTE: These version strings are pinned to specific upstream releases for compatibility
# with this repository's zombienet test setup. When updating, ensure the new versions
# remain compatible with the network configuration files in this directory.
# Latest zombienet releases: https://github.com/paritytech/zombienet/releases
ZOMBIENET_VERSION="v1.3.106"
# Latest Polkadot node releases: https://github.com/paritytech/polkadot-sdk/releases
# Use a version that matches the relay chain configuration used by these tests.
POLKADOT_VERSION="stable2512"
ZOMBIENET_BIN="${SCRIPT_DIR}/bin/zombienet-linux-x64"
POLKADOT_BIN="${SCRIPT_DIR}/bin/polkadot"
Expand Down
6 changes: 3 additions & 3 deletions scripts/zombienet/tests/xcm-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ async function testXcmDownwardMessage(testResults) {
const dest = {
V4: {
parents: 0,
interior: { X1: { Parachain: parachainId.toString() } }
interior: { X1: { Parachain: parachainId.toNumber() } }
}
};

Expand Down Expand Up @@ -364,15 +364,15 @@ async function testAssetHubTransfer(testResults) {
const dest = {
V4: {
parents: 1,
interior: { X1: { Parachain: '1000' } }
interior: { X1: { Parachain: 1000 } }
}
};

// Create beneficiary (Alice on AssetHub)
const beneficiary = {
V4: {
parents: 0,
interior: { X1: [{ AccountId32: { network: null, id: alice.publicKey } }] }
interior: { X1: { AccountId32: { network: null, id: alice.publicKey } } }
}
};

Expand Down
Loading