From e7ca6ad55a210ee6d4261fa42ada037eaf7860eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Molina?= Date: Wed, 14 Feb 2024 14:18:51 +0100 Subject: [PATCH] adapt trappist to run on westend live --- Cargo.lock | 2 +- Cargo.toml | 2 +- node/src/chain_spec/trappist.rs | 2 +- node/src/command.rs | 4 ++-- runtime/trappist/src/lib.rs | 4 ++-- runtime/trappist/src/xcm_config.rs | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 573232ed..65be0176 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8941,7 +8941,6 @@ dependencies = [ "polkadot-runtime-parachains", "polkadot-statement-distribution", "rococo-runtime", - "rococo-runtime-constants", "sc-authority-discovery", "sc-basic-authorship", "sc-block-builder", @@ -8995,6 +8994,7 @@ dependencies = [ "thiserror", "tracing-gum", "westend-runtime", + "westend-runtime-constants", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 62e573cf..af8c93e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -166,7 +166,7 @@ parachain-info = { package = "staging-parachain-info", version = "0.4.0", defaul cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" } # Polkadot -polkadot-cli = { version = "4.0.0", features = ["rococo-native"] } +polkadot-cli = { version = "4.0.0", features = ["westend-native"] } polkadot-primitives = "4.0.0" polkadot-service = "4.0.0" polkadot-runtime-parachains = { version = "4.0.0", default-features = false } diff --git a/node/src/chain_spec/trappist.rs b/node/src/chain_spec/trappist.rs index f9aab398..932e121f 100644 --- a/node/src/chain_spec/trappist.rs +++ b/node/src/chain_spec/trappist.rs @@ -265,7 +265,7 @@ pub fn trappist_live_config() -> ChainSpec { None, None, Some(properties), - Extensions { relay_chain: "rococo".into(), para_id: TRAPPIST_PARA_ID }, + Extensions { relay_chain: "westend".into(), para_id: TRAPPIST_PARA_ID }, ) } diff --git a/node/src/command.rs b/node/src/command.rs index f164d1ab..1d30e0bf 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -172,9 +172,9 @@ fn load_spec(id: &str) -> std::result::Result, String> { "dev" | "trappist-dev" => Box::new(chain_spec::trappist::development_config()), #[cfg(feature = "trappist-runtime")] "trappist-local" => Box::new(chain_spec::trappist::trappist_local_testnet_config()), - // Live chain spec for Rococo - Trappist + // Live chain spec for Westend - Trappist #[cfg(feature = "trappist-runtime")] - "" | "trappist-rococo" => Box::new(chain_spec::trappist::trappist_live_config()), + "" | "trappist-westend" => Box::new(chain_spec::trappist::trappist_live_config()), #[cfg(feature = "stout-runtime")] "stout-dev" => unimplemented!("stout-dev chain spec is not available yet"), #[cfg(feature = "stout-runtime")] diff --git a/runtime/trappist/src/lib.rs b/runtime/trappist/src/lib.rs index 94281bee..c9932096 100644 --- a/runtime/trappist/src/lib.rs +++ b/runtime/trappist/src/lib.rs @@ -162,8 +162,8 @@ impl_opaque_keys! { #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("trappist-rococo"), - impl_name: create_runtime_str!("trappist-rococo"), + spec_name: create_runtime_str!("trappist-westend"), + impl_name: create_runtime_str!("trappist-westend"), authoring_version: 1, spec_version: 13100, impl_version: 0, diff --git a/runtime/trappist/src/xcm_config.rs b/runtime/trappist/src/xcm_config.rs index 090da9a9..b660dcae 100644 --- a/runtime/trappist/src/xcm_config.rs +++ b/runtime/trappist/src/xcm_config.rs @@ -59,7 +59,7 @@ use super::{ parameter_types! { pub const RelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: NetworkId = NetworkId::Rococo; + pub const RelayNetwork: NetworkId = NetworkId::Westend; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub SelfReserve: MultiLocation = MultiLocation::here(); @@ -72,7 +72,7 @@ parameter_types! { pub const ExecutiveBody: BodyId = BodyId::Executive; pub const MaxAssetsIntoHolding: u32 = 64; pub UniversalLocation: InteriorMultiLocation = ( - GlobalConsensus(NetworkId::Rococo), + GlobalConsensus(NetworkId::Westend), Parachain(ParachainInfo::parachain_id().into()), ).into(); }