Skip to content

Commit

Permalink
Merge pull request #158 from paseo-network/release/1.3.4-runtime
Browse files Browse the repository at this point in the history
Upgrade runtime v1.3.4
  • Loading branch information
al3mart authored Dec 3, 2024
2 parents d37c12a + 5cef1e3 commit e151502
Show file tree
Hide file tree
Showing 52 changed files with 1,555 additions and 1,691 deletions.
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ repository = "https://github.com/paseo-network/runtimes.git"
license = "GPL-3.0-only"

[workspace.dependencies]
kusama-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.3.3", package = "kusama-runtime-constants", default-features = false }
bp-bridge-hub-kusama = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.3.3", package = "bp-bridge-hub-kusama", default-features = false }
bp-bridge-hub-polkadot = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.3.3", package = "bp-bridge-hub-polkadot", default-features = false }
bp-asset-hub-kusama = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.3.3", package = "bp-asset-hub-kusama", default-features = false }
collectives-polkadot-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.3.3", package = "collectives-polkadot-runtime-constants", default-features = false }
kusama-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.3.4", package = "kusama-runtime-constants", default-features = false }
bp-bridge-hub-kusama = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.3.4", package = "bp-bridge-hub-kusama", default-features = false }
bp-bridge-hub-polkadot = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.3.4", package = "bp-bridge-hub-polkadot", default-features = false }
bp-asset-hub-kusama = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.3.4", package = "bp-asset-hub-kusama", default-features = false }
collectives-polkadot-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.3.4", package = "collectives-polkadot-runtime-constants", default-features = false }


# Local dependencies
Expand All @@ -33,6 +33,7 @@ penpal-emulated-chain = { path = "integration-tests/emulated/chains/parachains/t
people-paseo-emulated-chain = { path = "integration-tests/emulated/chains/parachains/people/people-paseo"}
paseo-emulated-chain = { path = "integration-tests/emulated/chains/relays/paseo"}
assert_matches = { version = "1.5.0" }
approx = { version = "0.5.1" }
asset-test-utils = { version = "15.0.0" }
assets-common = { version = "0.15.0", default-features = false }
authority-discovery-primitives = { version = "33.0.0", default-features = false, package = "sp-authority-discovery" }
Expand Down Expand Up @@ -108,7 +109,6 @@ pallet-fast-unstake = { version = "35.0.0", default-features = false }
pallet-glutton = { version = "22.0.0", default-features = false }
pallet-grandpa = { version = "36.0.0", default-features = false }
pallet-identity = { version = "36.0.0", default-features = false }
pallet-im-online = { version = "35.0.0", default-features = false }
pallet-indices = { version = "36.0.0", default-features = false }
pallet-insecure-randomness-collective-flip = { version = "24.0.0", default-features = false }
pallet-membership = { version = "36.0.0", default-features = false }
Expand Down Expand Up @@ -258,4 +258,4 @@ opt-level = 3
[profile.production]
inherits = "release"
lto = true
codegen-units = 1
codegen-units = 1
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ pub fn genesis() -> Storage {
assets: vec![
// Penpal's teleportable asset representation
(
PenpalATeleportableAssetLocation::get().try_into().unwrap(),
PenpalATeleportableAssetLocation::get(),
PenpalASiblingSovereignAccount::get(),
false,
ED,
),
(
PenpalBTeleportableAssetLocation::get().try_into().unwrap(),
PenpalBTeleportableAssetLocation::get(),
PenpalBSiblingSovereignAccount::get(),
false,
ED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ impl_accounts_helpers_for_parachain!(AssetHubPaseo);
impl_assert_events_helpers_for_parachain!(AssetHubPaseo);
impl_assets_helpers_for_system_parachain!(AssetHubPaseo, Paseo);
impl_assets_helpers_for_parachain!(AssetHubPaseo);
impl_foreign_assets_helpers_for_parachain!(AssetHubPaseo, xcm::v3::Location);
impl_foreign_assets_helpers_for_parachain!(AssetHubPaseo, xcm::v4::Location);
impl_xcm_helpers_for_parachain!(AssetHubPaseo);
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use emulated_integration_tests_common::{
impls::Parachain, xcm_emulator::decl_test_parachains,
};

// CoretimePolkadot Parachain declaration
// CoretimePaseo Parachain declaration
decl_test_parachains! {
pub struct CoretimePaseo {
genesis = genesis::genesis(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, get_account_id_from_seed, SAFE_XCM_VERSION,
};
use parachains_common::{AccountId, Balance};
use penpal_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation};

// Penpal
pub const PARA_ID_A: u32 = 2000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,25 @@

mod genesis;
pub use genesis::{genesis, PenpalAssetOwner, ED, PARA_ID_A, PARA_ID_B};
pub use penpal_runtime::xcm_config::{
CustomizableAssetFromSystemAssetHub, LocalReservableFromAssetHub, LocalTeleportableToAssetHub,
XcmConfig, ASSETS_PALLET_ID, RESERVABLE_ASSET_ID, TELEPORTABLE_ASSET_ID,
pub use penpal_runtime::{
self,
xcm_config::{
CustomizableAssetFromSystemAssetHub, LocalReservableFromAssetHub,
LocalTeleportableToAssetHub, RelayNetworkId as PenpalRelayNetworkId, XcmConfig,
ASSETS_PALLET_ID, RESERVABLE_ASSET_ID, TELEPORTABLE_ASSET_ID,
},
};

// Substrate
use frame_support::traits::OnInitialize;
use sp_core::Encode;

// Cumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain,
impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain, impls::Parachain,
impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain,
impl_xcm_helpers_for_parachain,
impls::{NetworkId, Parachain},
xcm_emulator::decl_test_parachains,
};

Expand All @@ -36,6 +43,10 @@ decl_test_parachains! {
genesis = genesis(PARA_ID_A),
on_init = {
penpal_runtime::AuraExt::on_initialize(1);
frame_support::assert_ok!(penpal_runtime::System::set_storage(
penpal_runtime::RuntimeOrigin::root(),
vec![(PenpalRelayNetworkId::key().to_vec(), NetworkId::Kusama.encode())],
));
},
runtime = penpal_runtime,
core = {
Expand All @@ -55,6 +66,10 @@ decl_test_parachains! {
genesis = genesis(PARA_ID_B),
on_init = {
penpal_runtime::AuraExt::on_initialize(1);
frame_support::assert_ok!(penpal_runtime::System::set_storage(
penpal_runtime::RuntimeOrigin::root(),
vec![(PenpalRelayNetworkId::key().to_vec(), NetworkId::Polkadot.encode())],
));
},
runtime = penpal_runtime,
core = {
Expand All @@ -75,9 +90,11 @@ decl_test_parachains! {
// Penpal implementation
impl_accounts_helpers_for_parachain!(PenpalA);
impl_accounts_helpers_for_parachain!(PenpalB);
impl_assert_events_helpers_for_parachain!(PenpalA);
impl_assert_events_helpers_for_parachain!(PenpalB);
impl_assets_helpers_for_parachain!(PenpalA);
impl_assets_helpers_for_parachain!(PenpalB);
impl_foreign_assets_helpers_for_parachain!(PenpalA, xcm::latest::Location);
impl_foreign_assets_helpers_for_parachain!(PenpalB, xcm::latest::Location);
impl_assert_events_helpers_for_parachain!(PenpalA);
impl_assert_events_helpers_for_parachain!(PenpalB);
impl_xcm_helpers_for_parachain!(PenpalA);
impl_xcm_helpers_for_parachain!(PenpalB);
1 change: 0 additions & 1 deletion integration-tests/emulated/helpers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub use xcm_emulator::Chain;

/// TODO: when bumping to polkadot-sdk v1.8.0,
/// remove this crate altogether and get the macros from `emulated-integration-tests-common`.
/// remove this crate altogether and get the macros from `emulated-integration-tests-common`.
/// TODO: backport this macros to paseo-sdk
#[macro_export]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ pub use sp_runtime::DispatchError;
pub use xcm::{
latest::ParentThen,
prelude::{AccountId32 as AccountId32Junction, *},
v3::{
v4::{
self, Error,
NetworkId::{Kusama as KusamaId, Polkadot as PaseoId},
},
};
pub use xcm_executor::traits::TransferType;

// Bridges
pub use bp_messages::LaneId;
Expand All @@ -40,7 +41,7 @@ pub use emulated_integration_tests_common::{
RelayChain as Relay, Test, TestArgs, TestContext, TestExt,
},
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
ASSETS_PALLET_ID, PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V4,
};
pub use paseo_system_emulated_network::{
asset_hub_paseo_emulated_chain::{
Expand All @@ -67,7 +68,6 @@ pub use paseo_system_emulated_network::{

pub const ASSET_ID: u32 = 1;
pub const ASSET_MIN_BALANCE: u128 = 1000;
pub const ASSETS_PALLET_ID: u8 = 50;

#[cfg(test)]
mod tests;
Loading

0 comments on commit e151502

Please sign in to comment.