Remove system parachains Polkadot and Kusama runtimes (#1737)

Since the Polkadot and Kusama runtimes are no longer in the repo, the
relevant systems parachains runtimes also need to be removed. More
context [here](https://github.com/paritytech/polkadot-sdk/issues/603)
and [here](https://github.com/paritytech/polkadot-sdk/pull/1731).

Removes the following:
- `asset-hub-kusama` and `asset-hub-polkadot`
- `bridge-hub-kusama` and `bridge-hub-polkadot`
- `collectives-polkadot`
- `glutton-kusama`

Partially solves #603 and adds to #1731.
This commit is contained in:
Dónal Murray
2023-11-29 11:07:07 +00:00
committed by GitHub
parent 39d6c95c0d
commit 63ac2471aa
212 changed files with 25 additions and 43083 deletions
+9 -49
View File
@@ -144,27 +144,11 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
"seedling" => Box::new(chain_spec::seedling::get_seedling_chain_spec()),
// -- Asset Hub Polkadot
"asset-hub-polkadot-dev" | "statemint-dev" =>
Box::new(chain_spec::asset_hubs::asset_hub_polkadot_development_config()),
"asset-hub-polkadot-local" | "statemint-local" =>
Box::new(chain_spec::asset_hubs::asset_hub_polkadot_local_config()),
// the chain spec as used for generating the upgrade genesis values
"asset-hub-polkadot-genesis" | "statemint-genesis" =>
Box::new(chain_spec::asset_hubs::asset_hub_polkadot_config()),
// the shell-based chain spec as used for syncing
"asset-hub-polkadot" | "statemint" => Box::new(GenericChainSpec::from_json_bytes(
&include_bytes!("../chain-specs/asset-hub-polkadot.json")[..],
)?),
// -- Asset Hub Kusama
"asset-hub-kusama-dev" | "statemine-dev" =>
Box::new(chain_spec::asset_hubs::asset_hub_kusama_development_config()),
"asset-hub-kusama-local" | "statemine-local" =>
Box::new(chain_spec::asset_hubs::asset_hub_kusama_local_config()),
// the chain spec as used for generating the upgrade genesis values
"asset-hub-kusama-genesis" | "statemine-genesis" =>
Box::new(chain_spec::asset_hubs::asset_hub_kusama_config()),
// the shell-based chain spec as used for syncing
"asset-hub-kusama" | "statemine" => Box::new(GenericChainSpec::from_json_bytes(
&include_bytes!("../chain-specs/asset-hub-kusama.json")[..],
)?),
@@ -195,13 +179,11 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
)?),
// -- Polkadot Collectives
"collectives-polkadot-dev" =>
Box::new(chain_spec::collectives::collectives_polkadot_development_config()),
"collectives-polkadot-local" =>
Box::new(chain_spec::collectives::collectives_polkadot_local_config()),
"collectives-polkadot" => Box::new(GenericChainSpec::from_json_bytes(
&include_bytes!("../chain-specs/collectives-polkadot.json")[..],
)?),
// -- Westend Collectives
"collectives-westend-dev" =>
Box::new(chain_spec::collectives::collectives_westend_development_config()),
"collectives-westend-local" =>
@@ -229,14 +211,14 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
.expect("invalid value")
.load_config()?,
// -- Penpall
"penpal-kusama" => Box::new(chain_spec::penpal::get_penpal_chain_spec(
// -- Penpal
"penpal-rococo" => Box::new(chain_spec::penpal::get_penpal_chain_spec(
para_id.expect("Must specify parachain id"),
"kusama-local",
"rococo-local",
)),
"penpal-polkadot" => Box::new(chain_spec::penpal::get_penpal_chain_spec(
"penpal-westend" => Box::new(chain_spec::penpal::get_penpal_chain_spec(
para_id.expect("Must specify parachain id"),
"polkadot-local",
"westend-local",
)),
// -- Glutton Westend
@@ -251,18 +233,6 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
para_id.expect("Must specify parachain id"),
)),
// -- Glutton
"glutton-kusama-dev" => Box::new(chain_spec::glutton::glutton_development_config(
para_id.expect("Must specify parachain id"),
)),
"glutton-kusama-local" => Box::new(chain_spec::glutton::glutton_local_config(
para_id.expect("Must specify parachain id"),
)),
// the chain spec as used for generating the upgrade genesis values
"glutton-kusama-genesis" => Box::new(chain_spec::glutton::glutton_config(
para_id.expect("Must specify parachain id"),
)),
// -- Fallback (generic chainspec)
"" => {
log::warn!("No ChainSpec.id specified, so using default one, based on rococo-parachain runtime");
@@ -760,18 +730,14 @@ pub fn run() -> Result<()> {
.map(|r| r.0)
.map_err(Into::into),
Runtime::BridgeHub(bridge_hub_runtime_type) => match bridge_hub_runtime_type {
chain_spec::bridge_hubs::BridgeHubRuntimeType::Polkadot |
chain_spec::bridge_hubs::BridgeHubRuntimeType::PolkadotLocal |
chain_spec::bridge_hubs::BridgeHubRuntimeType::PolkadotDevelopment =>
chain_spec::bridge_hubs::BridgeHubRuntimeType::Polkadot =>
crate::service::start_generic_aura_node::<
RuntimeApi,
AuraId,
>(config, polkadot_config, collator_options, id, hwbench)
.await
.map(|r| r.0),
chain_spec::bridge_hubs::BridgeHubRuntimeType::Kusama |
chain_spec::bridge_hubs::BridgeHubRuntimeType::KusamaLocal |
chain_spec::bridge_hubs::BridgeHubRuntimeType::KusamaDevelopment =>
chain_spec::bridge_hubs::BridgeHubRuntimeType::Kusama =>
crate::service::start_generic_aura_node::<
RuntimeApi,
AuraId,
@@ -1052,12 +1018,6 @@ mod tests {
);
assert_eq!(Runtime::Default, path.runtime());
let path = store_configuration(
&temp_dir,
Box::new(crate::chain_spec::asset_hubs::asset_hub_kusama_local_config()),
);
assert_eq!(Runtime::AssetHubKusama, path.runtime());
let path = store_configuration(
&temp_dir,
Box::new(crate::chain_spec::contracts::contracts_rococo_local_config()),