Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
7,000 changes: 2,220 additions & 4,780 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ cumulus-client-consensus-common = "0.15.0"
cumulus-client-consensus-proposer = "0.14.0"
cumulus-client-service = "0.15.0"

# Paseo
asset-hub-paseo-runtime = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
paseo-runtime = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
paseo-runtime-constants = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
# Paseo (note: using polkadot as stopgap until paseo updated to polkadot sdk v1.14.0)
asset-hub-polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes", rev = "4260e50", default-features = false }
polkadot-runtime = { git = "https://github.com/polkadot-fellows/runtimes", rev = "4260e50", default-features = false }
polkadot-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes", rev = "4260e50", default-features = false }
27 changes: 16 additions & 11 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ repository.workspace = true

[dev-dependencies]
codec.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt", "std", "tracing-log"] }
tracing-subscriber = { workspace = true, features = [
"env-filter",
"fmt",
"std",
"tracing-log",
] }

# Substrate
frame-support.workspace = true
Expand Down Expand Up @@ -36,9 +41,9 @@ cumulus-primitives-core.workspace = true
emulated-integration-tests-common.workspace = true

# Paseo
asset-hub-paseo-runtime.workspace = true
paseo-runtime.workspace = true
paseo-runtime-constants.workspace = true
asset-hub-polkadot-runtime.workspace = true
polkadot-runtime.workspace = true
polkadot-runtime-constants.workspace = true

# Local
pop-runtime-devnet.workspace = true
Expand All @@ -47,15 +52,15 @@ pop-runtime-common.workspace = true
[features]
default = ["std"]
std = [
"asset-hub-paseo-runtime/std",
"asset-hub-polkadot-runtime/std",
"cumulus-primitives-core/std",
"frame-support/std",
"pallet-assets/std",
"pallet-balances/std",
"pallet-message-queue/std",
"pallet-xcm/std",
"paseo-runtime/std",
"paseo-runtime-constants/std",
"polkadot-runtime/std",
"polkadot-runtime-constants/std",
"polkadot-primitives/std",
"polkadot-runtime-parachains/std",
"pop-runtime-devnet/std",
Expand All @@ -71,26 +76,26 @@ std = [
]

runtime-benchmarks = [
"asset-hub-paseo-runtime/runtime-benchmarks",
"asset-hub-polkadot-runtime/runtime-benchmarks",
"cumulus-primitives-core/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"paseo-runtime/runtime-benchmarks",
"polkadot-runtime/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"pop-runtime-devnet/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
]

try-runtime = [
"asset-hub-paseo-runtime/try-runtime",
"asset-hub-polkadot-runtime/try-runtime",
"frame-support/try-runtime",
"pallet-assets/try-runtime",
"pallet-balances/std",
"pallet-message-queue/try-runtime",
"paseo-runtime/try-runtime",
"polkadot-runtime/try-runtime",
"pop-runtime-devnet/try-runtime",
"sp-runtime/try-runtime",
]
26 changes: 14 additions & 12 deletions integration-tests/src/chains/asset_hub_paseo/genesis.rs
Original file line number Diff line number Diff line change
@@ -1,44 +1,46 @@
// Note: using polkadot as stopgap until paseo updated to polkadot sdk v1.14.0
use asset_hub_polkadot_runtime as asset_hub_runtime;
use emulated_integration_tests_common::{
accounts, build_genesis_storage, get_account_id_from_seed, get_from_seed, SAFE_XCM_VERSION,
};
use polkadot_primitives::{AccountId, Balance};
use sp_core::{sr25519, storage::Storage};

pub(crate) const PARA_ID: u32 = 1000;
pub(crate) const ED: Balance = paseo_runtime_constants::currency::EXISTENTIAL_DEPOSIT / 10;
pub(crate) const ED: Balance = polkadot_runtime_constants::currency::EXISTENTIAL_DEPOSIT / 10;

pub(crate) fn genesis() -> Storage {
let genesis_config = asset_hub_paseo_runtime::RuntimeGenesisConfig {
system: asset_hub_paseo_runtime::SystemConfig::default(),
balances: asset_hub_paseo_runtime::BalancesConfig {
let genesis_config = asset_hub_runtime::RuntimeGenesisConfig {
system: asset_hub_runtime::SystemConfig::default(),
balances: asset_hub_runtime::BalancesConfig {
balances: accounts::init_balances()
.iter()
.cloned()
.map(|k| (k, ED * 4096 * 4096))
.collect(),
},
parachain_info: asset_hub_paseo_runtime::ParachainInfoConfig {
parachain_info: asset_hub_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(),
..Default::default()
},
collator_selection: asset_hub_paseo_runtime::CollatorSelectionConfig {
collator_selection: asset_hub_runtime::CollatorSelectionConfig {
invulnerables: invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: asset_hub_paseo_runtime::SessionConfig {
session: asset_hub_runtime::SessionConfig {
keys: invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
asset_hub_paseo_runtime::SessionKeys { aura }, // session keys
acc.clone(), // account id
acc, // validator id
asset_hub_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
},
polkadot_xcm: asset_hub_paseo_runtime::PolkadotXcmConfig {
polkadot_xcm: asset_hub_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
Expand All @@ -47,7 +49,7 @@ pub(crate) fn genesis() -> Storage {

build_genesis_storage(
&genesis_config,
asset_hub_paseo_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
asset_hub_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
)
}

Expand Down
25 changes: 14 additions & 11 deletions integration-tests/src/chains/asset_hub_paseo/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Note: using polkadot as stopgap until paseo updated to polkadot sdk v1.14.0
use asset_hub_polkadot_runtime as asset_hub_runtime;
pub(crate) mod genesis;

use crate::chains::paseo::Paseo;
Expand All @@ -13,27 +15,28 @@ decl_test_parachains! {
pub struct AssetHubPaseo {
genesis = genesis::genesis(),
on_init = {
asset_hub_paseo_runtime::AuraExt::on_initialize(1);
asset_hub_runtime::AuraExt::on_initialize(1);
},
runtime = asset_hub_paseo_runtime,
// Note: using polkadot as stopgap until paseo updated to polkadot sdk v1.14.0
runtime = asset_hub_runtime,
core = {
XcmpMessageHandler: asset_hub_paseo_runtime::XcmpQueue,
LocationToAccountId: asset_hub_paseo_runtime::xcm_config::LocationToAccountId,
ParachainInfo: asset_hub_paseo_runtime::ParachainInfo,
XcmpMessageHandler: asset_hub_runtime::XcmpQueue,
LocationToAccountId: asset_hub_runtime::xcm_config::LocationToAccountId,
ParachainInfo: asset_hub_runtime::ParachainInfo,
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
},
pallets = {
PolkadotXcm: asset_hub_paseo_runtime::PolkadotXcm,
Assets: asset_hub_paseo_runtime::Assets,
ForeignAssets: asset_hub_paseo_runtime::ForeignAssets,
Balances: asset_hub_paseo_runtime::Balances,
PolkadotXcm: asset_hub_runtime::PolkadotXcm,
Assets: asset_hub_runtime::Assets,
ForeignAssets: asset_hub_runtime::ForeignAssets,
Balances: asset_hub_runtime::Balances,
}
},
}

// AssetHubPaseo implementation
impl_accounts_helpers_for_parachain!(AssetHubPaseo);
impl_assert_events_helpers_for_parachain!(AssetHubPaseo);
impl_assets_helpers_for_parachain!(AssetHubPaseo, Paseo);
impl_foreign_assets_helpers_for_parachain!(AssetHubPaseo, Paseo);
impl_assets_helpers_for_parachain!(AssetHubPaseo);
impl_foreign_assets_helpers_for_parachain!(AssetHubPaseo, xcm::v3::Location);
impl_xcm_helpers_for_parachain!(AssetHubPaseo);
40 changes: 21 additions & 19 deletions integration-tests/src/chains/paseo/genesis.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
use emulated_integration_tests_common::{
accounts, build_genesis_storage, get_account_id_from_seed, get_from_seed, get_host_config,
validators,
accounts, build_genesis_storage, get_from_seed, get_host_config, validators,
};
use paseo_runtime_constants::currency::UNITS as PAS;
use polkadot_primitives::{AssignmentId, Balance, ValidatorId};
use polkadot_runtime as runtime;
use polkadot_runtime_constants as runtime_constants;
use runtime_constants::currency::UNITS as PAS;
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_consensus_babe::AuthorityId as BabeId;
use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId;
use sp_consensus_grandpa::AuthorityId as GrandpaId;
use sp_core::{sr25519, storage::Storage};
use sp_core::storage::Storage;

pub(crate) const ED: Balance = paseo_runtime_constants::currency::EXISTENTIAL_DEPOSIT;
pub(crate) const ED: Balance = runtime_constants::currency::EXISTENTIAL_DEPOSIT;
const ENDOWMENT: u128 = 1_000_000 * PAS;

fn session_keys(
Expand All @@ -20,8 +21,8 @@ fn session_keys(
para_assignment: AssignmentId,
authority_discovery: AuthorityDiscoveryId,
beefy: BeefyId,
) -> paseo_runtime::SessionKeys {
paseo_runtime::SessionKeys {
) -> polkadot_runtime::SessionKeys {
polkadot_runtime::SessionKeys {
babe,
grandpa,
para_validator,
Expand All @@ -32,12 +33,12 @@ fn session_keys(
}

pub(crate) fn genesis() -> Storage {
let genesis_config = paseo_runtime::RuntimeGenesisConfig {
system: paseo_runtime::SystemConfig::default(),
balances: paseo_runtime::BalancesConfig {
let genesis_config = runtime::RuntimeGenesisConfig {
system: runtime::SystemConfig::default(),
balances: runtime::BalancesConfig {
balances: accounts::init_balances().iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
},
session: paseo_runtime::SessionConfig {
session: runtime::SessionConfig {
keys: validators::initial_authorities()
.iter()
.map(|x| {
Expand All @@ -56,21 +57,22 @@ pub(crate) fn genesis() -> Storage {
})
.collect::<Vec<_>>(),
},
babe: paseo_runtime::BabeConfig {
babe: runtime::BabeConfig {
authorities: Default::default(),
epoch_config: Some(paseo_runtime::BABE_GENESIS_EPOCH_CONFIG),
epoch_config: runtime::BABE_GENESIS_EPOCH_CONFIG,
..Default::default()
},
sudo: paseo_runtime::SudoConfig {
key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")),
},
configuration: paseo_runtime::ConfigurationConfig { config: get_host_config() },
registrar: paseo_runtime::RegistrarConfig {
// TODO: sudo pallet is not configured in polkadot runtime
// sudo: runtime::SudoConfig {
// key: Some(get_account_id_from_seed::<sr25519::Public>("Alice")),
// },
configuration: runtime::ConfigurationConfig { config: get_host_config() },
registrar: runtime::RegistrarConfig {
next_free_para_id: polkadot_primitives::LOWEST_PUBLIC_ID,
..Default::default()
},
..Default::default()
};

build_genesis_storage(&genesis_config, paseo_runtime::WASM_BINARY.unwrap())
build_genesis_storage(&genesis_config, runtime::WASM_BINARY.unwrap())
}
16 changes: 9 additions & 7 deletions integration-tests/src/chains/paseo/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub(crate) mod genesis;
use polkadot_runtime as runtime;

use emulated_integration_tests_common::{
impl_accounts_helpers_for_relay_chain, impl_assert_events_helpers_for_relay_chain,
Expand All @@ -8,19 +9,20 @@ use emulated_integration_tests_common::{

// Paseo declaration
decl_test_relay_chains! {
#[api_version(10)]
#[api_version(11)]
pub struct Paseo {
genesis = genesis::genesis(),
on_init = (),
runtime = paseo_runtime,
runtime = runtime,
core = {
SovereignAccountOf: paseo_runtime::xcm_config::SovereignAccountOf,
SovereignAccountOf: runtime::xcm_config::SovereignAccountOf,
},
pallets = {
XcmPallet: paseo_runtime::XcmPallet,
Sudo: paseo_runtime::Sudo,
Balances: paseo_runtime::Balances,
Hrmp: paseo_runtime::Hrmp,
XcmPallet: runtime::XcmPallet,
// TODO: sudo pallet is not configured in polkadot runtime
// Sudo: runtime::Sudo,
Balances: runtime::Balances,
Hrmp: runtime::Hrmp,
}
},
}
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/src/chains/pop_network/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pub(crate) mod genesis;

use crate::chains::paseo::Paseo;
use emulated_integration_tests_common::{
impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain,
impl_assets_helpers_for_parachain, impl_xcm_helpers_for_parachain, impls::Parachain,
Expand Down Expand Up @@ -33,5 +32,5 @@ decl_test_parachains! {
// PopNetwork implementation
impl_accounts_helpers_for_parachain!(PopNetwork);
impl_assert_events_helpers_for_parachain!(PopNetwork);
impl_assets_helpers_for_parachain!(PopNetwork, Paseo);
impl_assets_helpers_for_parachain!(PopNetwork);
impl_xcm_helpers_for_parachain!(PopNetwork);
Loading