mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 15:41:02 +00:00
Remove kusama and polkadot runtime crates (#1731)
This pull request is removing the Kusama and Polkadot runtime crates. As still some crates dependent on the runtime crates, this pull request is doing some more changes. - It removes the `hostperfcheck` CLI command. This CLI command could compare the current node against the standard hardware by doing some checks. Later we added the hardware benchmark feature to Substrate. This hardware benchmark is running on every node startup and prints a warning if the current node is too slow. This makes this CLI command a duplicate that was also depending on the kusama runtime. - The pull request is removing the emulated integration tests that were requiring the Kusama or Polkadot runtime crates.
This commit is contained in:
@@ -19,8 +19,7 @@ pub mod xcm_helpers;
|
||||
|
||||
use constants::{
|
||||
accounts::{ALICE, BOB},
|
||||
asset_hub_kusama, asset_hub_polkadot, asset_hub_westend, bridge_hub_kusama,
|
||||
bridge_hub_polkadot, bridge_hub_rococo, collectives, kusama, penpal, polkadot, rococo, westend,
|
||||
asset_hub_rococo, asset_hub_westend, bridge_hub_rococo, penpal, rococo, westend,
|
||||
};
|
||||
use impls::{RococoWococoMessageHandler, WococoRococoMessageHandler};
|
||||
|
||||
@@ -34,36 +33,6 @@ use xcm_emulator::{
|
||||
};
|
||||
|
||||
decl_test_relay_chains! {
|
||||
#[api_version(5)]
|
||||
pub struct Polkadot {
|
||||
genesis = polkadot::genesis(),
|
||||
on_init = (),
|
||||
runtime = polkadot_runtime,
|
||||
core = {
|
||||
MessageProcessor: DefaultMessageProcessor<Polkadot>,
|
||||
SovereignAccountOf: polkadot_runtime::xcm_config::SovereignAccountOf,
|
||||
},
|
||||
pallets = {
|
||||
XcmPallet: polkadot_runtime::XcmPallet,
|
||||
Balances: polkadot_runtime::Balances,
|
||||
Hrmp: polkadot_runtime::Hrmp,
|
||||
}
|
||||
},
|
||||
#[api_version(5)]
|
||||
pub struct Kusama {
|
||||
genesis = kusama::genesis(),
|
||||
on_init = (),
|
||||
runtime = kusama_runtime,
|
||||
core = {
|
||||
MessageProcessor: DefaultMessageProcessor<Kusama>,
|
||||
SovereignAccountOf: kusama_runtime::xcm_config::SovereignAccountOf,
|
||||
},
|
||||
pallets = {
|
||||
XcmPallet: kusama_runtime::XcmPallet,
|
||||
Balances: kusama_runtime::Balances,
|
||||
Hrmp: kusama_runtime::Hrmp,
|
||||
}
|
||||
},
|
||||
#[api_version(7)]
|
||||
pub struct Westend {
|
||||
genesis = westend::genesis(),
|
||||
@@ -112,164 +81,6 @@ decl_test_relay_chains! {
|
||||
}
|
||||
|
||||
decl_test_parachains! {
|
||||
// Polkadot Parachains
|
||||
pub struct AssetHubPolkadot {
|
||||
genesis = asset_hub_polkadot::genesis(),
|
||||
on_init = {
|
||||
asset_hub_polkadot_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = asset_hub_polkadot_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue,
|
||||
DmpMessageHandler: asset_hub_polkadot_runtime::DmpQueue,
|
||||
LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm,
|
||||
Assets: asset_hub_polkadot_runtime::Assets,
|
||||
Balances: asset_hub_polkadot_runtime::Balances,
|
||||
}
|
||||
},
|
||||
pub struct Collectives {
|
||||
genesis = collectives::genesis(),
|
||||
on_init = {
|
||||
collectives_polkadot_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = collectives_polkadot_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: collectives_polkadot_runtime::XcmpQueue,
|
||||
DmpMessageHandler: collectives_polkadot_runtime::DmpQueue,
|
||||
LocationToAccountId: collectives_polkadot_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: collectives_polkadot_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: collectives_polkadot_runtime::PolkadotXcm,
|
||||
Balances: collectives_polkadot_runtime::Balances,
|
||||
}
|
||||
},
|
||||
pub struct BridgeHubPolkadot {
|
||||
genesis = bridge_hub_polkadot::genesis(),
|
||||
on_init = {
|
||||
bridge_hub_polkadot_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = bridge_hub_polkadot_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: bridge_hub_polkadot_runtime::XcmpQueue,
|
||||
DmpMessageHandler: bridge_hub_polkadot_runtime::DmpQueue,
|
||||
LocationToAccountId: bridge_hub_polkadot_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: bridge_hub_polkadot_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: bridge_hub_polkadot_runtime::PolkadotXcm,
|
||||
}
|
||||
},
|
||||
pub struct PenpalPolkadotA {
|
||||
genesis = penpal::genesis(penpal::PARA_ID_A),
|
||||
on_init = {
|
||||
penpal_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = penpal_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: penpal_runtime::XcmpQueue,
|
||||
DmpMessageHandler: penpal_runtime::DmpQueue,
|
||||
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: penpal_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: penpal_runtime::PolkadotXcm,
|
||||
Assets: penpal_runtime::Assets,
|
||||
}
|
||||
},
|
||||
pub struct PenpalPolkadotB {
|
||||
genesis = penpal::genesis(penpal::PARA_ID_B),
|
||||
on_init = {
|
||||
penpal_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = penpal_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: penpal_runtime::XcmpQueue,
|
||||
DmpMessageHandler: penpal_runtime::DmpQueue,
|
||||
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: penpal_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: penpal_runtime::PolkadotXcm,
|
||||
Assets: penpal_runtime::Assets,
|
||||
}
|
||||
},
|
||||
// Kusama Parachains
|
||||
pub struct AssetHubKusama {
|
||||
genesis = asset_hub_kusama::genesis(),
|
||||
on_init = {
|
||||
asset_hub_kusama_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = asset_hub_kusama_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue,
|
||||
DmpMessageHandler: asset_hub_kusama_runtime::DmpQueue,
|
||||
LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: asset_hub_kusama_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm,
|
||||
Assets: asset_hub_kusama_runtime::Assets,
|
||||
ForeignAssets: asset_hub_kusama_runtime::ForeignAssets,
|
||||
PoolAssets: asset_hub_kusama_runtime::PoolAssets,
|
||||
AssetConversion: asset_hub_kusama_runtime::AssetConversion,
|
||||
Balances: asset_hub_kusama_runtime::Balances,
|
||||
}
|
||||
},
|
||||
pub struct BridgeHubKusama {
|
||||
genesis = bridge_hub_kusama::genesis(),
|
||||
on_init = {
|
||||
bridge_hub_kusama_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = bridge_hub_kusama_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: bridge_hub_kusama_runtime::XcmpQueue,
|
||||
DmpMessageHandler: bridge_hub_kusama_runtime::DmpQueue,
|
||||
LocationToAccountId: bridge_hub_kusama_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: bridge_hub_kusama_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: bridge_hub_kusama_runtime::PolkadotXcm,
|
||||
}
|
||||
},
|
||||
pub struct PenpalKusamaA {
|
||||
genesis = penpal::genesis(penpal::PARA_ID_A),
|
||||
on_init = {
|
||||
penpal_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = penpal_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: penpal_runtime::XcmpQueue,
|
||||
DmpMessageHandler: penpal_runtime::DmpQueue,
|
||||
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: penpal_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: penpal_runtime::PolkadotXcm,
|
||||
Assets: penpal_runtime::Assets,
|
||||
}
|
||||
},
|
||||
pub struct PenpalKusamaB {
|
||||
genesis = penpal::genesis(penpal::PARA_ID_B),
|
||||
on_init = {
|
||||
penpal_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
runtime = penpal_runtime,
|
||||
core = {
|
||||
XcmpMessageHandler: penpal_runtime::XcmpQueue,
|
||||
DmpMessageHandler: penpal_runtime::DmpQueue,
|
||||
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
|
||||
ParachainInfo: penpal_runtime::ParachainInfo,
|
||||
},
|
||||
pallets = {
|
||||
PolkadotXcm: penpal_runtime::PolkadotXcm,
|
||||
Assets: penpal_runtime::Assets,
|
||||
}
|
||||
},
|
||||
// Westend Parachains
|
||||
pub struct AssetHubWestend {
|
||||
genesis = asset_hub_westend::genesis(),
|
||||
@@ -329,7 +140,7 @@ decl_test_parachains! {
|
||||
},
|
||||
// AssetHubRococo (aka Rockmine/Rockmine2) mirrors AssetHubKusama
|
||||
pub struct AssetHubRococo {
|
||||
genesis = asset_hub_kusama::genesis(),
|
||||
genesis = asset_hub_rococo::genesis(),
|
||||
on_init = {
|
||||
asset_hub_polkadot_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
@@ -363,7 +174,7 @@ decl_test_parachains! {
|
||||
}
|
||||
},
|
||||
pub struct AssetHubWococo {
|
||||
genesis = asset_hub_polkadot::genesis(),
|
||||
genesis = asset_hub_westend::genesis(),
|
||||
on_init = {
|
||||
asset_hub_polkadot_runtime::AuraExt::on_initialize(1);
|
||||
},
|
||||
@@ -399,31 +210,6 @@ decl_test_parachains! {
|
||||
}
|
||||
|
||||
decl_test_networks! {
|
||||
pub struct PolkadotMockNet {
|
||||
relay_chain = Polkadot,
|
||||
parachains = vec![
|
||||
AssetHubPolkadot,
|
||||
Collectives,
|
||||
BridgeHubPolkadot,
|
||||
PenpalPolkadotA,
|
||||
PenpalPolkadotB,
|
||||
],
|
||||
// TODO: uncomment when https://github.com/paritytech/cumulus/pull/2528 is merged
|
||||
// bridge = PolkadotKusamaMockBridge
|
||||
bridge = ()
|
||||
},
|
||||
pub struct KusamaMockNet {
|
||||
relay_chain = Kusama,
|
||||
parachains = vec![
|
||||
AssetHubKusama,
|
||||
PenpalKusamaA,
|
||||
BridgeHubKusama,
|
||||
PenpalKusamaB,
|
||||
],
|
||||
// TODO: uncomment when https://github.com/paritytech/cumulus/pull/2528 is merged
|
||||
// bridge = KusamaPolkadotMockBridge
|
||||
bridge = ()
|
||||
},
|
||||
pub struct WestendMockNet {
|
||||
relay_chain = Westend,
|
||||
parachains = vec![
|
||||
@@ -475,16 +261,6 @@ decl_test_bridges! {
|
||||
// }
|
||||
}
|
||||
|
||||
// Polkadot implementation
|
||||
impl_accounts_helpers_for_relay_chain!(Polkadot);
|
||||
impl_assert_events_helpers_for_relay_chain!(Polkadot);
|
||||
impl_hrmp_channels_helpers_for_relay_chain!(Polkadot);
|
||||
|
||||
// Kusama implementation
|
||||
impl_accounts_helpers_for_relay_chain!(Kusama);
|
||||
impl_assert_events_helpers_for_relay_chain!(Kusama);
|
||||
impl_hrmp_channels_helpers_for_relay_chain!(Kusama);
|
||||
|
||||
// Westend implementation
|
||||
impl_accounts_helpers_for_relay_chain!(Westend);
|
||||
impl_assert_events_helpers_for_relay_chain!(Westend);
|
||||
@@ -497,65 +273,31 @@ impl_assert_events_helpers_for_relay_chain!(Rococo);
|
||||
impl_accounts_helpers_for_relay_chain!(Wococo);
|
||||
impl_assert_events_helpers_for_relay_chain!(Wococo);
|
||||
|
||||
// AssetHubPolkadot implementation
|
||||
impl_accounts_helpers_for_parachain!(AssetHubPolkadot);
|
||||
impl_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot);
|
||||
impl_assert_events_helpers_for_parachain!(AssetHubPolkadot);
|
||||
|
||||
// AssetHubKusama implementation
|
||||
impl_accounts_helpers_for_parachain!(AssetHubKusama);
|
||||
impl_assets_helpers_for_parachain!(AssetHubKusama, Kusama);
|
||||
impl_assert_events_helpers_for_parachain!(AssetHubKusama);
|
||||
|
||||
// AssetHubWestend implementation
|
||||
impl_accounts_helpers_for_parachain!(AssetHubWestend);
|
||||
impl_assets_helpers_for_parachain!(AssetHubWestend, Westend);
|
||||
impl_assert_events_helpers_for_parachain!(AssetHubWestend);
|
||||
|
||||
// PenpalPolkadot implementations
|
||||
impl_assert_events_helpers_for_parachain!(PenpalPolkadotA);
|
||||
impl_assert_events_helpers_for_parachain!(PenpalPolkadotB);
|
||||
|
||||
// PenpalKusama implementations
|
||||
impl_assert_events_helpers_for_parachain!(PenpalKusamaA);
|
||||
impl_assert_events_helpers_for_parachain!(PenpalKusamaB);
|
||||
|
||||
// PenpalWestendA implementation
|
||||
impl_assert_events_helpers_for_parachain!(PenpalWestendA);
|
||||
|
||||
// Collectives implementation
|
||||
impl_accounts_helpers_for_parachain!(Collectives);
|
||||
impl_assert_events_helpers_for_parachain!(Collectives);
|
||||
|
||||
// BridgeHubRococo implementation
|
||||
impl_accounts_helpers_for_parachain!(BridgeHubRococo);
|
||||
impl_assert_events_helpers_for_parachain!(BridgeHubRococo);
|
||||
|
||||
decl_test_sender_receiver_accounts_parameter_types! {
|
||||
// Relays
|
||||
Polkadot { sender: ALICE, receiver: BOB },
|
||||
Kusama { sender: ALICE, receiver: BOB },
|
||||
Westend { sender: ALICE, receiver: BOB },
|
||||
Rococo { sender: ALICE, receiver: BOB },
|
||||
Wococo { sender: ALICE, receiver: BOB },
|
||||
// Asset Hubs
|
||||
AssetHubPolkadot { sender: ALICE, receiver: BOB },
|
||||
AssetHubKusama { sender: ALICE, receiver: BOB },
|
||||
AssetHubWestend { sender: ALICE, receiver: BOB },
|
||||
AssetHubRococo { sender: ALICE, receiver: BOB },
|
||||
AssetHubWococo { sender: ALICE, receiver: BOB },
|
||||
// Collectives
|
||||
Collectives { sender: ALICE, receiver: BOB },
|
||||
// Bridged Hubs
|
||||
BridgeHubPolkadot { sender: ALICE, receiver: BOB },
|
||||
BridgeHubKusama { sender: ALICE, receiver: BOB },
|
||||
BridgeHubRococo { sender: ALICE, receiver: BOB },
|
||||
BridgeHubWococo { sender: ALICE, receiver: BOB },
|
||||
// Penpals
|
||||
PenpalPolkadotA { sender: ALICE, receiver: BOB },
|
||||
PenpalPolkadotB { sender: ALICE, receiver: BOB },
|
||||
PenpalKusamaA { sender: ALICE, receiver: BOB },
|
||||
PenpalKusamaB { sender: ALICE, receiver: BOB },
|
||||
PenpalWestendA { sender: ALICE, receiver: BOB },
|
||||
PenpalRococoA { sender: ALICE, receiver: BOB }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user