From 258a4b2b3b1c8b35a3e39a0f3de4ced808ed316d Mon Sep 17 00:00:00 2001 From: CocDap <48429826+CocDap@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:26:37 +0700 Subject: [PATCH] chore: replace rococo to paseo name (#333) * chore: replace rococo to paseo name * fix test case after change to paseo --- crates/pop-parachains/src/build.rs | 2 +- crates/pop-parachains/src/up/mod.rs | 58 +++++++++---------- crates/pop-parachains/src/up/parachains.rs | 2 +- crates/pop-parachains/src/up/relay.rs | 2 +- .../templates/base/chain_spec.templ | 4 +- .../templates/base/network.templ | 2 +- crates/pop-parachains/tests/parachain.rs | 30 +--------- ...coco+coretime.toml => paseo+coretime.toml} | 6 +- tests/networks/pop.toml | 4 +- tests/networks/rococo.toml | 12 ---- tests/networks/template.toml | 2 +- 11 files changed, 44 insertions(+), 80 deletions(-) rename tests/networks/{rococo+coretime.toml => paseo+coretime.toml} (62%) delete mode 100644 tests/networks/rococo.toml diff --git a/crates/pop-parachains/src/build.rs b/crates/pop-parachains/src/build.rs index 346bbaca..27a2acd9 100644 --- a/crates/pop-parachains/src/build.rs +++ b/crates/pop-parachains/src/build.rs @@ -381,7 +381,7 @@ mod tests { config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[parachains]] id = 4385 diff --git a/crates/pop-parachains/src/up/mod.rs b/crates/pop-parachains/src/up/mod.rs index c74d04c4..036ae889 100644 --- a/crates/pop-parachains/src/up/mod.rs +++ b/crates/pop-parachains/src/up/mod.rs @@ -680,7 +680,7 @@ mod tests { config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" "# )?; let version = "v1.12.0"; @@ -760,7 +760,7 @@ chain = "paseo-local" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" default_command = "./bin-v1.6.0/polkadot" "# )?; @@ -799,7 +799,7 @@ default_command = "./bin-v1.6.0/polkadot" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[relaychain.nodes]] name = "alice" @@ -842,7 +842,7 @@ command = "polkadot" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[relaychain.nodes]] name = "alice" @@ -873,7 +873,7 @@ command = "polkadot-v1.12.0" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" default_command = "polkadot" [[relaychain.nodes]] @@ -900,11 +900,11 @@ command = "polkadot-v1.12.0" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[parachains]] id = 1000 -chain = "asset-hub-rococo-local" +chain = "asset-hub-paseo-local" "# )?; let system_parachain_version = "v1.12.0"; @@ -992,7 +992,7 @@ chain = "asset-hub-paseo-local" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[parachains]] id = 4385 @@ -1034,7 +1034,7 @@ default_command = "pop-node" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[parachains]] id = 4385 @@ -1076,7 +1076,7 @@ default_command = "pop-node" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[parachains]] id = 2000 @@ -1113,7 +1113,7 @@ default_command = "./target/release/parachain-template-node" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[parachains]] id = 2000 @@ -1153,7 +1153,7 @@ command = "./target/release/parachain-template-node" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[parachains]] id = 2000 @@ -1195,7 +1195,7 @@ default_command = "moonbeam" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[parachains]] "# @@ -1218,7 +1218,7 @@ chain = "rococo-local" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[parachains]] id = 404 @@ -1243,11 +1243,11 @@ default_command = "missing-binary" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[parachains]] id = 1000 -chain = "asset-hub-rococo-local" +chain = "asset-hub-paseo-local" [[parachains]] id = 2000 @@ -1269,7 +1269,7 @@ default_command = "pop-node" None, ) .await?; - assert_eq!(zombienet.binaries().count(), 4); + assert_eq!(zombienet.binaries().count(), 6); Ok(()) } @@ -1313,7 +1313,7 @@ chain = "asset-hub-paseo-local" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" "# )?; @@ -1344,7 +1344,7 @@ chain = "rococo-local" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" "# )?; File::create(cache.join("polkadot"))?; @@ -1381,7 +1381,7 @@ chain = "rococo-local" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" "# )?; let version = "v1.12.0"; @@ -1417,7 +1417,7 @@ chain = "rococo-local" config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[relaychain.nodes]] name = "alice" @@ -1480,7 +1480,7 @@ validator = true config.as_file(), r#" [relaychain] - chain = "rococo-local" + chain = "paseo-local" default_command = "polkadot" [[relaychain.nodes]] name = "alice" @@ -1488,7 +1488,7 @@ validator = true )?; let network_config = NetworkConfiguration::from(config.path())?; let relay_chain = network_config.relay_chain()?; - assert_eq!("rococo-local", relay_chain["chain"].as_str().unwrap()); + assert_eq!("paseo-local", relay_chain["chain"].as_str().unwrap()); assert_eq!( "polkadot", NetworkConfiguration::default_command(relay_chain).unwrap().as_str().unwrap() @@ -1506,7 +1506,7 @@ validator = true config.as_file(), r#" [relaychain] - chain = "rococo-local" + chain = "paseo-local" [[parachains]] id = 2000 default_command = "node" @@ -1530,7 +1530,7 @@ validator = true config.as_file(), r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[relaychain.nodes]] name = "alice" @@ -1538,7 +1538,7 @@ command = "polkadot" [[parachains]] id = 1000 -chain = "asset-hub-rococo-local" +chain = "asset-hub-paseo-local" [[parachains.collators]] name = "asset-hub" @@ -1585,7 +1585,7 @@ command = "./target/release/parachain-template-node" manifest: None, }, workers: ["polkadot-execute-worker", ""], - chain: "rococo-local".to_string(), + chain: "paseo-local".to_string(), chain_spec_generator: None, }, &[ @@ -1641,7 +1641,7 @@ command = "./target/release/parachain-template-node" format!( r#" [relaychain] -chain = "rococo-local" +chain = "paseo-local" default_command = "{0}" [[relaychain.nodes]] @@ -1650,7 +1650,7 @@ command = "{0}" [[parachains]] id = 1000 -chain = "asset-hub-rococo-local" +chain = "asset-hub-paseo-local" default_command = "{1}" [[parachains.collators]] diff --git a/crates/pop-parachains/src/up/parachains.rs b/crates/pop-parachains/src/up/parachains.rs index 0cd1d004..06eda16e 100644 --- a/crates/pop-parachains/src/up/parachains.rs +++ b/crates/pop-parachains/src/up/parachains.rs @@ -160,7 +160,7 @@ mod tests { None, None, "v1.12.0", - Some("asset-hub-rococo-local"), + Some("asset-hub-paseo-local"), tempdir()?.path() ) .await? diff --git a/crates/pop-parachains/src/up/relay.rs b/crates/pop-parachains/src/up/relay.rs index aaaa2d0d..662e639f 100644 --- a/crates/pop-parachains/src/up/relay.rs +++ b/crates/pop-parachains/src/up/relay.rs @@ -114,7 +114,7 @@ pub(super) async fn from( source: TryInto::try_into(&relay, tag, latest)?, cache: cache.to_path_buf(), }; - let chain = chain.unwrap_or("rococo-local"); + let chain = chain.unwrap_or("paseo-local"); return Ok(super::RelayChain { binary, workers: relay.workers(), diff --git a/crates/pop-parachains/templates/base/chain_spec.templ b/crates/pop-parachains/templates/base/chain_spec.templ index 7049ee55..b4d6df39 100644 --- a/crates/pop-parachains/templates/base/chain_spec.templ +++ b/crates/pop-parachains/templates/base/chain_spec.templ @@ -72,7 +72,7 @@ pub fn development_config() -> ChainSpec { ChainSpec::builder( runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), Extensions { - relay_chain: "rococo-local".into(), + relay_chain: "paseo-local".into(), // You MUST set this to the correct network! para_id: 2000, }, @@ -123,7 +123,7 @@ pub fn local_testnet_config() -> ChainSpec { ChainSpec::builder( runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), Extensions { - relay_chain: "rococo-local".into(), + relay_chain: "paseo-local".into(), // You MUST set this to the correct network! para_id: 2000, }, diff --git a/crates/pop-parachains/templates/base/network.templ b/crates/pop-parachains/templates/base/network.templ index 02a01cac..f66860d3 100644 --- a/crates/pop-parachains/templates/base/network.templ +++ b/crates/pop-parachains/templates/base/network.templ @@ -1,5 +1,5 @@ [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[relaychain.nodes]] name = "alice" diff --git a/crates/pop-parachains/tests/parachain.rs b/crates/pop-parachains/tests/parachain.rs index 751912e1..1b03c294 100644 --- a/crates/pop-parachains/tests/parachain.rs +++ b/crates/pop-parachains/tests/parachain.rs @@ -102,37 +102,13 @@ async fn launch_polkadot_and_system_parachain() -> Result<()> { } #[tokio::test] -async fn launch_rococo() -> Result<()> { +async fn launch_paseo_and_system_parachain() -> Result<()> { let temp_dir = tempfile::tempdir()?; let cache = temp_dir.path().to_path_buf(); let mut zombienet = Zombienet::new( &cache, - "../../tests/networks/rococo.toml", - Some(BINARY_VERSION), - None, - None, - None, - None, - ) - .await?; - - for binary in zombienet.binaries().filter(|b| !b.exists()) { - binary.source(true, &(), true).await?; - } - - zombienet.spawn().await?; - Ok(()) -} - -#[tokio::test] -async fn launch_rococo_and_system_parachain() -> Result<()> { - let temp_dir = tempfile::tempdir()?; - let cache = temp_dir.path().to_path_buf(); - - let mut zombienet = Zombienet::new( - &cache, - "../../tests/networks/rococo+coretime.toml", + "../../tests/networks/paseo+coretime.toml", Some(BINARY_VERSION), None, Some(BINARY_VERSION), @@ -150,7 +126,7 @@ async fn launch_rococo_and_system_parachain() -> Result<()> { } #[tokio::test] -async fn launch_rococo_and_two_parachains() -> Result<()> { +async fn launch_paseo_and_two_parachains() -> Result<()> { let temp_dir = tempfile::tempdir()?; let cache = temp_dir.path().to_path_buf(); diff --git a/tests/networks/rococo+coretime.toml b/tests/networks/paseo+coretime.toml similarity index 62% rename from tests/networks/rococo+coretime.toml rename to tests/networks/paseo+coretime.toml index ffa9c65e..f7cbf5f5 100644 --- a/tests/networks/rococo+coretime.toml +++ b/tests/networks/paseo+coretime.toml @@ -1,7 +1,7 @@ -# pop up parachain -f ./tests/networks/rococo+coretime.toml +# pop up parachain -f ./tests/networks/paseo+coretime.toml [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[relaychain.nodes]] name = "alice" @@ -13,7 +13,7 @@ validator = true [[parachains]] id = 1005 -chain = "coretime-rococo-local" +chain = "coretime-paseo-local" [[parachains.collators]] name = "coretime-01" \ No newline at end of file diff --git a/tests/networks/pop.toml b/tests/networks/pop.toml index 8dd1b563..9ad7c871 100644 --- a/tests/networks/pop.toml +++ b/tests/networks/pop.toml @@ -1,7 +1,7 @@ # pop up parachain -f ./tests/networks/pop.toml [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[relaychain.nodes]] name = "alice" @@ -13,7 +13,7 @@ validator = true [[parachains]] id = 1000 -chain = "asset-hub-rococo-local" +chain = "asset-hub-paseo-local" [[parachains.collators]] name = "asset-hub" diff --git a/tests/networks/rococo.toml b/tests/networks/rococo.toml deleted file mode 100644 index 040190a1..00000000 --- a/tests/networks/rococo.toml +++ /dev/null @@ -1,12 +0,0 @@ -# pop up parachain -f ./tests/networks/rococo.toml - -[relaychain] -chain = "rococo-local" - -[[relaychain.nodes]] -name = "alice" -validator = true - -[[relaychain.nodes]] -name = "bob" -validator = true \ No newline at end of file diff --git a/tests/networks/template.toml b/tests/networks/template.toml index bfced0c4..87d1f0c8 100644 --- a/tests/networks/template.toml +++ b/tests/networks/template.toml @@ -1,7 +1,7 @@ # pop up parachain -f ./tests/networks/template.toml [relaychain] -chain = "rococo-local" +chain = "paseo-local" [[relaychain.nodes]] name = "alice"