Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .config/zepter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ workflows:
# Check that `A` activates the features of `B`.
'propagate-feature',
# These are the features to check:
'--features=try-runtime,runtime-benchmarks,std,ahm-kusama,stable2503',
'--features=try-runtime,runtime-benchmarks,std,stable2503',
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
'--left-side-feature-missing=ignore',
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ jobs:

- name: Download AHM test snapshots
run: |
curl -sL 'https://tasty.limo/uploads/polkadot-2025-05-09.snap.lz4' -o polkadot.snap.lz4
curl -sL 'https://tasty.limo/uploads/ah-polkadot-2025-05-09.snap.lz4' -o ah-polkadot.snap.lz4
python3 -m pip install gdown
gdown 1USQPAxqhflyiw1aeJIILTqrNJr9ZjvzR # 2025-07-28
gdown 1Z21yzXbQrD5rGFTZnSjrTHi9CGhGPi4z # 2025-07-28

lz4 -d polkadot.snap.lz4 polkadot.snap
lz4 -d ah-polkadot.snap.lz4 ah-polkadot.snap

Expand Down
480 changes: 240 additions & 240 deletions Cargo.lock

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions integration-tests/ahm/Justfile

This file was deleted.

6 changes: 2 additions & 4 deletions integration-tests/ahm/src/balances_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl AhMigrationCheck for BalancesCrossChecker {

fn post_check(rc_pre_payload: Self::RcPrePayload, ah_pre_payload: Self::AhPrePayload) {
let (rc_total_issuance_before, rc_checking_balance_before) = rc_pre_payload;
let (ah_total_issuance_before, ah_checking_balance_before) = ah_pre_payload;
let (ah_total_issuance_before, _ah_checking_balance_before) = ah_pre_payload;

let ah_checking_balance_after = pallet_balances::Pallet::<AhRuntime>::total_balance(
&<AhRuntime as pallet_ah_migrator::Config>::CheckingAccount::get(),
Expand Down Expand Up @@ -122,9 +122,7 @@ impl AhMigrationCheck for BalancesCrossChecker {
// Currently allowing for a difference of 0.1 DOT.
assert!(
ah_total_issuance_after.abs_diff(rc_total_issuance_before) < MIN_DOT_ERROR,
"Total issuance is not correctly tracked: before migration {} after migration {}.",
rc_total_issuance_before,
ah_total_issuance_after
"Total issuance is not correctly tracked: before migration {rc_total_issuance_before} after migration {ah_total_issuance_after}."
);
}
}
8 changes: 1 addition & 7 deletions integration-tests/ahm/src/call_filter_asset_hub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,10 @@

//! Asset Hub Migration tests.

use crate::porting_prelude::*;

use asset_hub_polkadot_runtime::{
AhMigrator, Block, BuildStorage, Runtime as T, RuntimeCall, RuntimeOrigin, System,
};
use asset_hub_polkadot_runtime::{BuildStorage, Runtime as T, RuntimeCall, RuntimeOrigin};
use cumulus_primitives_core::AggregateMessageOrigin;
use frame_support::{sp_runtime::traits::Dispatchable, traits::Contains};
use pallet_ah_migrator::*;
use polkadot_primitives::Id as ParaId;
use remote_externalities::{Builder, Mode, OfflineConfig, RemoteExternalities};
use sp_runtime::AccountId32;

/// Check that the call filtering mechanism works.
Expand Down
7 changes: 1 addition & 6 deletions integration-tests/ahm/src/call_filter_relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,10 @@

//! Asset Hub Migration tests.

use crate::porting_prelude::*;

use frame_support::{sp_runtime::traits::Dispatchable, traits::Contains};
use pallet_rc_migrator::*;
use polkadot_primitives::Id as ParaId;
use polkadot_runtime::{
Block, BuildStorage, RcMigrator, Runtime as T, RuntimeCall, RuntimeOrigin, System,
};
use remote_externalities::{Builder, Mode, OfflineConfig, RemoteExternalities};
use polkadot_runtime::{BuildStorage, Runtime as T, RuntimeCall, RuntimeOrigin};
use runtime_parachains::inclusion::AggregateMessageOrigin;
use sp_runtime::AccountId32;

Expand Down
22 changes: 6 additions & 16 deletions integration-tests/ahm/src/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,8 @@

use crate::porting_prelude::*;

use frame_support::{
pallet_prelude::*,
traits::{Currency, Defensive},
};
use frame_system::pallet_prelude::*;
use pallet_ah_migrator::types::AhMigrationCheck;
use pallet_rc_migrator::types::{RcMigrationCheck, ToPolkadotSs58};
use sp_runtime::{
traits::{Dispatchable, TryConvert},
AccountId32,
};
use std::{collections::BTreeMap, str::FromStr};
use pallet_rc_migrator::types::RcMigrationCheck;

pub struct SanityChecks;

Expand All @@ -40,8 +30,8 @@ impl RcMigrationCheck for SanityChecks {
assert!(
pallet_rc_migrator::RcMigrationStage::<RcRuntime>::get() ==
pallet_rc_migrator::MigrationStage::Scheduled {
start: 0u32.into(),
cool_off_end: 0u32.into(),
start: 0u32,
cool_off_end: 0u32,
}
);
}
Expand All @@ -65,7 +55,7 @@ impl AhMigrationCheck for SanityChecks {
);
}

fn post_check(rc_pre_payload: Self::RcPrePayload, _: Self::AhPrePayload) {
fn post_check(_rc_pre_payload: Self::RcPrePayload, _: Self::AhPrePayload) {
assert!(
pallet_ah_migrator::AhMigrationStage::<AhRuntime>::get() ==
pallet_ah_migrator::MigrationStage::MigrationDone
Expand All @@ -76,10 +66,10 @@ impl AhMigrationCheck for SanityChecks {
/// Assert that the root hash is what we expect.
pub fn assert_root_hash(chain: &str, want_hex: &str) {
let got = hex::encode(sp_io::storage::root(sp_runtime::StateVersion::V1));
println!("{chain} root hash: {:?}", got);
println!("{chain} root hash: {got:?}");
if got == want_hex {
return
}

panic!("The root hash of {chain} is not as expected. Please adjust the root hash in integration-tests/ahm/src/checks.rs\nExpected: {}\nGot: {}", want_hex, got);
panic!("The root hash of {chain} is not as expected. Please adjust the root hash in integration-tests/ahm/src/checks.rs\nExpected: {want_hex}\nGot: {got}");
}
11 changes: 1 addition & 10 deletions integration-tests/ahm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,7 @@ pub mod xcm_route;

/// Imports for the AHM tests that can be reused for other chains.
pub mod porting_prelude {
// Dependency renaming depending on runtimes or SDK names:
#[cfg(not(feature = "ahm-kusama"))]
pub mod dependency_alias {
// Polkadot it is the canonical code
}
pub use dependency_alias::*;

// Import renaming depending on runtimes or SDK names:
#[cfg(not(feature = "ahm-kusama"))]
// For Kusama, we will add a feature here. For now it is just a stub.
pub mod import_alias {
pub use polkadot_runtime_constants::DOLLARS as RC_DOLLARS;
}
Expand All @@ -59,6 +51,5 @@ pub mod porting_prelude {
RuntimeOrigin as RcRuntimeOrigin,
};

#[cfg(not(feature = "ahm-kusama"))]
pub use polkadot_runtime_constants::proxy as rc_proxy_definition;
}
Loading
Loading