diff --git a/runtime/robonomics/src/xcm_config.rs b/runtime/robonomics/src/xcm_config.rs index 1d717e45f..c1676885b 100644 --- a/runtime/robonomics/src/xcm_config.rs +++ b/runtime/robonomics/src/xcm_config.rs @@ -145,8 +145,8 @@ impl Contains for ParentOrParentsPlurality { } match &location.interior { Here => true, - Junctions::X1(arc) => { - matches!(arc.as_ref(), [Junction::Plurality { .. }]) + Junctions::X1(junction) => { + matches!(junction, Junction::Plurality { .. }) } _ => false, } diff --git a/scripts/zombienet/ADDING_TESTS.md b/scripts/zombienet/ADDING_TESTS.md index 46c1fa3e0..417f7f0b6 100644 --- a/scripts/zombienet/ADDING_TESTS.md +++ b/scripts/zombienet/ADDING_TESTS.md @@ -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) @@ -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) diff --git a/scripts/zombienet/README.md b/scripts/zombienet/README.md index 88af16f0f..c3d222e62 100644 --- a/scripts/zombienet/README.md +++ b/scripts/zombienet/README.md @@ -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 diff --git a/scripts/zombienet/run-tests.sh b/scripts/zombienet/run-tests.sh index f37473c13..0c91f2920 100755 --- a/scripts/zombienet/run-tests.sh +++ b/scripts/zombienet/run-tests.sh @@ -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" diff --git a/scripts/zombienet/tests/xcm-tests.js b/scripts/zombienet/tests/xcm-tests.js index 443571358..d07c0badc 100644 --- a/scripts/zombienet/tests/xcm-tests.js +++ b/scripts/zombienet/tests/xcm-tests.js @@ -203,7 +203,7 @@ async function testXcmDownwardMessage(testResults) { const dest = { V4: { parents: 0, - interior: { X1: { Parachain: parachainId.toString() } } + interior: { X1: { Parachain: parachainId.toNumber() } } } }; @@ -364,7 +364,7 @@ async function testAssetHubTransfer(testResults) { const dest = { V4: { parents: 1, - interior: { X1: { Parachain: '1000' } } + interior: { X1: { Parachain: 1000 } } } }; @@ -372,7 +372,7 @@ async function testAssetHubTransfer(testResults) { const beneficiary = { V4: { parents: 0, - interior: { X1: [{ AccountId32: { network: null, id: alice.publicKey } }] } + interior: { X1: { AccountId32: { network: null, id: alice.publicKey } } } } };