mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
[testnet] Remove Wococo stuff from BridgeHubRococo/AssetHubRococo (#2300)
Rococo<>Wococo bridge is replaced by Rococo<Westend bridge, so this PR removes unneeded code. - [x] update bridges subtree after https://github.com/paritytech/parity-bridges-common/pull/2692 --------- Co-authored-by: command-bot <> Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
This commit is contained in:
@@ -32,7 +32,6 @@ pub type AssetHubWestendChainSpec =
|
||||
sc_service::GenericChainSpec<asset_hub_westend_runtime::RuntimeGenesisConfig, Extensions>;
|
||||
pub type AssetHubRococoChainSpec =
|
||||
sc_service::GenericChainSpec<asset_hub_rococo_runtime::RuntimeGenesisConfig, Extensions>;
|
||||
pub type AssetHubWococoChainSpec = AssetHubRococoChainSpec;
|
||||
|
||||
const ASSET_HUB_POLKADOT_ED: AssetHubBalance =
|
||||
parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT;
|
||||
@@ -433,6 +432,7 @@ pub fn asset_hub_westend_development_config() -> AssetHubWestendChainSpec {
|
||||
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
|
||||
],
|
||||
parachains_common::westend::currency::UNITS * 1_000_000,
|
||||
1000.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
@@ -478,6 +478,7 @@ pub fn asset_hub_westend_local_config() -> AssetHubWestendChainSpec {
|
||||
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
|
||||
],
|
||||
parachains_common::westend::currency::UNITS * 1_000_000,
|
||||
1000.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
@@ -522,6 +523,7 @@ pub fn asset_hub_westend_config() -> AssetHubWestendChainSpec {
|
||||
),
|
||||
],
|
||||
Vec::new(),
|
||||
ASSET_HUB_WESTEND_ED * 4096,
|
||||
1000.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
@@ -531,6 +533,7 @@ pub fn asset_hub_westend_config() -> AssetHubWestendChainSpec {
|
||||
fn asset_hub_westend_genesis(
|
||||
invulnerables: Vec<(AccountId, AuraId)>,
|
||||
endowed_accounts: Vec<AccountId>,
|
||||
endowment: AssetHubBalance,
|
||||
id: ParaId,
|
||||
) -> serde_json::Value {
|
||||
serde_json::json!({
|
||||
@@ -538,7 +541,7 @@ fn asset_hub_westend_genesis(
|
||||
"balances": endowed_accounts
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|k| (k, ASSET_HUB_WESTEND_ED * 4096))
|
||||
.map(|k| (k, endowment))
|
||||
.collect::<Vec<_>>(),
|
||||
},
|
||||
"parachainInfo": {
|
||||
@@ -579,19 +582,6 @@ pub fn asset_hub_rococo_development_config() -> AssetHubRococoChainSpec {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn asset_hub_wococo_development_config() -> AssetHubWococoChainSpec {
|
||||
let mut properties = sc_chain_spec::Properties::new();
|
||||
properties.insert("ss58Format".into(), 42.into());
|
||||
properties.insert("tokenSymbol".into(), "WOC".into());
|
||||
properties.insert("tokenDecimals".into(), 12.into());
|
||||
asset_hub_rococo_like_development_config(
|
||||
properties,
|
||||
"Wococo Asset Hub Development",
|
||||
"asset-hub-wococo-dev",
|
||||
1000,
|
||||
)
|
||||
}
|
||||
|
||||
fn asset_hub_rococo_like_development_config(
|
||||
properties: sc_chain_spec::Properties,
|
||||
name: &str,
|
||||
@@ -617,6 +607,7 @@ fn asset_hub_rococo_like_development_config(
|
||||
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
|
||||
],
|
||||
parachains_common::rococo::currency::UNITS * 1_000_000,
|
||||
para_id.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
@@ -636,19 +627,6 @@ pub fn asset_hub_rococo_local_config() -> AssetHubRococoChainSpec {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn asset_hub_wococo_local_config() -> AssetHubWococoChainSpec {
|
||||
let mut properties = sc_chain_spec::Properties::new();
|
||||
properties.insert("ss58Format".into(), 42.into());
|
||||
properties.insert("tokenSymbol".into(), "WOC".into());
|
||||
properties.insert("tokenDecimals".into(), 12.into());
|
||||
asset_hub_rococo_like_local_config(
|
||||
properties,
|
||||
"Wococo Asset Hub Local",
|
||||
"asset-hub-wococo-local",
|
||||
1000,
|
||||
)
|
||||
}
|
||||
|
||||
fn asset_hub_rococo_like_local_config(
|
||||
properties: sc_chain_spec::Properties,
|
||||
name: &str,
|
||||
@@ -688,6 +666,7 @@ fn asset_hub_rococo_like_local_config(
|
||||
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
|
||||
],
|
||||
parachains_common::rococo::currency::UNITS * 1_000_000,
|
||||
para_id.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
@@ -735,54 +714,7 @@ pub fn asset_hub_rococo_genesis_config() -> AssetHubRococoChainSpec {
|
||||
),
|
||||
],
|
||||
Vec::new(),
|
||||
para_id.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
.build()
|
||||
}
|
||||
|
||||
pub fn asset_hub_wococo_genesis_config() -> AssetHubWococoChainSpec {
|
||||
let mut properties = sc_chain_spec::Properties::new();
|
||||
properties.insert("ss58Format".into(), 42.into());
|
||||
properties.insert("tokenSymbol".into(), "WOC".into());
|
||||
properties.insert("tokenDecimals".into(), 12.into());
|
||||
let para_id = 1000;
|
||||
AssetHubRococoChainSpec::builder(
|
||||
asset_hub_rococo_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
|
||||
Extensions { relay_chain: "wococo".into(), para_id },
|
||||
)
|
||||
.with_name("Wococo Asset Hub")
|
||||
.with_id("asset-hub-wococo")
|
||||
.with_chain_type(ChainType::Live)
|
||||
.with_genesis_config_patch(asset_hub_rococo_genesis(
|
||||
// initial collators.
|
||||
vec![
|
||||
// 5C8RGkS8t5K93fB2hkgKbvSYs5iG6AknJMuQmbBDeazon9Lj
|
||||
(
|
||||
hex!("02d526f43cf27e94f478f9db785dc86052a77c695e7c855211839d3fde3ce534").into(),
|
||||
hex!("02d526f43cf27e94f478f9db785dc86052a77c695e7c855211839d3fde3ce534")
|
||||
.unchecked_into(),
|
||||
),
|
||||
// 5GePeDZQeBagXH7kH5QPKnQKi39Z5hoYFB5FmUtEvc4yxKej
|
||||
(
|
||||
hex!("caa1f623ca183296c4521b56cc29c484ca017830f8cb538f30f2d4664d631814").into(),
|
||||
hex!("caa1f623ca183296c4521b56cc29c484ca017830f8cb538f30f2d4664d631814")
|
||||
.unchecked_into(),
|
||||
),
|
||||
// 5CfnTTb9NMJDNKDntA83mHKoedZ7wjDC8ypLCTDd4NwUx3zv
|
||||
(
|
||||
hex!("1ac112d635db2bd34e79ae2b99486cf7c0b71a928668e4feb3dc4633d368f965").into(),
|
||||
hex!("1ac112d635db2bd34e79ae2b99486cf7c0b71a928668e4feb3dc4633d368f965")
|
||||
.unchecked_into(),
|
||||
),
|
||||
// 5EqheiwiG22gvGpN7cvrbeaQzhg7rzsYYVkYK4yj5vRrTQRQ
|
||||
(
|
||||
hex!("7ac9d11be07334cd27e9eb849f5fc7677a10ad36b6ab38b377d3c8b2c0b08b66").into(),
|
||||
hex!("7ac9d11be07334cd27e9eb849f5fc7677a10ad36b6ab38b377d3c8b2c0b08b66")
|
||||
.unchecked_into(),
|
||||
),
|
||||
],
|
||||
Vec::new(),
|
||||
ASSET_HUB_ROCOCO_ED * 524_288,
|
||||
para_id.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
@@ -792,6 +724,7 @@ pub fn asset_hub_wococo_genesis_config() -> AssetHubWococoChainSpec {
|
||||
fn asset_hub_rococo_genesis(
|
||||
invulnerables: Vec<(AccountId, AuraId)>,
|
||||
endowed_accounts: Vec<AccountId>,
|
||||
endowment: AssetHubBalance,
|
||||
id: ParaId,
|
||||
) -> serde_json::Value {
|
||||
serde_json::json!({
|
||||
@@ -799,7 +732,7 @@ fn asset_hub_rococo_genesis(
|
||||
balances: endowed_accounts
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|k| (k, ASSET_HUB_ROCOCO_ED * 524_288))
|
||||
.map(|k| (k, endowment))
|
||||
.collect(),
|
||||
},
|
||||
"parachainInfo": asset_hub_rococo_runtime::ParachainInfoConfig {
|
||||
|
||||
@@ -29,9 +29,6 @@ pub enum BridgeHubRuntimeType {
|
||||
// used by benchmarks
|
||||
RococoDevelopment,
|
||||
|
||||
Wococo,
|
||||
WococoLocal,
|
||||
|
||||
Kusama,
|
||||
KusamaLocal,
|
||||
// used by benchmarks
|
||||
@@ -66,8 +63,6 @@ impl FromStr for BridgeHubRuntimeType {
|
||||
rococo::BRIDGE_HUB_ROCOCO => Ok(BridgeHubRuntimeType::Rococo),
|
||||
rococo::BRIDGE_HUB_ROCOCO_LOCAL => Ok(BridgeHubRuntimeType::RococoLocal),
|
||||
rococo::BRIDGE_HUB_ROCOCO_DEVELOPMENT => Ok(BridgeHubRuntimeType::RococoDevelopment),
|
||||
wococo::BRIDGE_HUB_WOCOCO => Ok(BridgeHubRuntimeType::Wococo),
|
||||
wococo::BRIDGE_HUB_WOCOCO_LOCAL => Ok(BridgeHubRuntimeType::WococoLocal),
|
||||
_ => Err(format!("Value '{}' is not configured yet", value)),
|
||||
}
|
||||
}
|
||||
@@ -94,8 +89,6 @@ impl BridgeHubRuntimeType {
|
||||
BridgeHubRuntimeType::RococoLocal |
|
||||
BridgeHubRuntimeType::RococoDevelopment =>
|
||||
Ok(Box::new(rococo::BridgeHubChainSpec::from_json_file(path)?)),
|
||||
BridgeHubRuntimeType::Wococo | BridgeHubRuntimeType::WococoLocal =>
|
||||
Ok(Box::new(wococo::BridgeHubChainSpec::from_json_file(path)?)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,17 +164,6 @@ impl BridgeHubRuntimeType {
|
||||
Some("Bob".to_string()),
|
||||
|_| (),
|
||||
))),
|
||||
BridgeHubRuntimeType::Wococo =>
|
||||
Ok(Box::new(wococo::BridgeHubChainSpec::from_json_bytes(
|
||||
&include_bytes!("../../chain-specs/bridge-hub-wococo.json")[..],
|
||||
)?)),
|
||||
BridgeHubRuntimeType::WococoLocal => Ok(Box::new(wococo::local_config(
|
||||
wococo::BRIDGE_HUB_WOCOCO_LOCAL,
|
||||
"Wococo BridgeHub Local",
|
||||
"wococo-local",
|
||||
ParaId::new(1014),
|
||||
Some("Bob".to_string()),
|
||||
))),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -309,22 +291,9 @@ pub mod rococo {
|
||||
"polkadotXcm": {
|
||||
"safeXcmVersion": Some(SAFE_XCM_VERSION),
|
||||
},
|
||||
|
||||
"bridgeWococoGrandpa": {
|
||||
"owner": bridges_pallet_owner.clone(),
|
||||
},
|
||||
"bridgeWestendGrandpa": {
|
||||
"owner": bridges_pallet_owner.clone(),
|
||||
},
|
||||
"bridgeRococoGrandpa": {
|
||||
"owner": bridges_pallet_owner.clone(),
|
||||
},
|
||||
"bridgeRococoMessages": {
|
||||
"owner": bridges_pallet_owner.clone(),
|
||||
},
|
||||
"bridgeWococoMessages": {
|
||||
"owner": bridges_pallet_owner.clone(),
|
||||
},
|
||||
"bridgeWestendMessages": {
|
||||
"owner": bridges_pallet_owner.clone(),
|
||||
},
|
||||
@@ -332,37 +301,6 @@ pub mod rococo {
|
||||
}
|
||||
}
|
||||
|
||||
/// Sub-module for Wococo setup (reuses stuff from Rococo)
|
||||
pub mod wococo {
|
||||
use super::ParaId;
|
||||
use crate::chain_spec::bridge_hubs::rococo;
|
||||
|
||||
pub(crate) const BRIDGE_HUB_WOCOCO: &str = "bridge-hub-wococo";
|
||||
pub(crate) const BRIDGE_HUB_WOCOCO_LOCAL: &str = "bridge-hub-wococo-local";
|
||||
|
||||
pub type BridgeHubChainSpec = rococo::BridgeHubChainSpec;
|
||||
pub type RuntimeApi = rococo::RuntimeApi;
|
||||
|
||||
pub fn local_config(
|
||||
id: &str,
|
||||
chain_name: &str,
|
||||
relay_chain: &str,
|
||||
para_id: ParaId,
|
||||
bridges_pallet_owner_seed: Option<String>,
|
||||
) -> BridgeHubChainSpec {
|
||||
rococo::local_config(
|
||||
id,
|
||||
chain_name,
|
||||
relay_chain,
|
||||
para_id,
|
||||
bridges_pallet_owner_seed,
|
||||
|properties| {
|
||||
properties.insert("tokenSymbol".into(), "WOOK".into());
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// Sub-module for Kusama setup
|
||||
pub mod kusama {
|
||||
use super::{BridgeHubBalance, ParaId};
|
||||
|
||||
@@ -43,7 +43,6 @@ enum Runtime {
|
||||
AssetHubPolkadot,
|
||||
AssetHubKusama,
|
||||
AssetHubRococo,
|
||||
AssetHubWococo,
|
||||
AssetHubWestend,
|
||||
Penpal(ParaId),
|
||||
ContractsRococo,
|
||||
@@ -95,8 +94,6 @@ fn runtime(id: &str) -> Runtime {
|
||||
Runtime::AssetHubKusama
|
||||
} else if id.starts_with("asset-hub-rococo") {
|
||||
Runtime::AssetHubRococo
|
||||
} else if id.starts_with("asset-hub-wococo") {
|
||||
Runtime::AssetHubWococo
|
||||
} else if id.starts_with("asset-hub-westend") | id.starts_with("westmint") {
|
||||
Runtime::AssetHubWestend
|
||||
} else if id.starts_with("penpal") {
|
||||
@@ -186,19 +183,6 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
|
||||
&include_bytes!("../chain-specs/asset-hub-rococo.json")[..],
|
||||
)?),
|
||||
|
||||
// -- Asset Hub Wococo
|
||||
"asset-hub-wococo-dev" =>
|
||||
Box::new(chain_spec::asset_hubs::asset_hub_wococo_development_config()),
|
||||
"asset-hub-wococo-local" =>
|
||||
Box::new(chain_spec::asset_hubs::asset_hub_wococo_local_config()),
|
||||
// the chain spec as used for generating the upgrade genesis values
|
||||
"asset-hub-wococo-genesis" =>
|
||||
Box::new(chain_spec::asset_hubs::asset_hub_wococo_genesis_config()),
|
||||
"asset-hub-wococo" =>
|
||||
Box::new(chain_spec::asset_hubs::AssetHubWococoChainSpec::from_json_bytes(
|
||||
&include_bytes!("../chain-specs/asset-hub-wococo.json")[..],
|
||||
)?),
|
||||
|
||||
// -- Asset Hub Westend
|
||||
"asset-hub-westend-dev" | "westmint-dev" =>
|
||||
Box::new(chain_spec::asset_hubs::asset_hub_westend_development_config()),
|
||||
@@ -302,8 +286,6 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
|
||||
Box::new(chain_spec::asset_hubs::AssetHubKusamaChainSpec::from_json_file(path)?),
|
||||
Runtime::AssetHubRococo =>
|
||||
Box::new(chain_spec::asset_hubs::AssetHubRococoChainSpec::from_json_file(path)?),
|
||||
Runtime::AssetHubWococo =>
|
||||
Box::new(chain_spec::asset_hubs::AssetHubWococoChainSpec::from_json_file(path)?),
|
||||
Runtime::AssetHubWestend => Box::new(
|
||||
chain_spec::asset_hubs::AssetHubWestendChainSpec::from_json_file(path)?,
|
||||
),
|
||||
@@ -464,7 +446,7 @@ macro_rules! construct_partials {
|
||||
)?;
|
||||
$code
|
||||
},
|
||||
Runtime::AssetHubRococo | Runtime::AssetHubWococo => {
|
||||
Runtime::AssetHubRococo => {
|
||||
let $partials = new_partial::<asset_hub_rococo_runtime::RuntimeApi, _>(
|
||||
&$config,
|
||||
crate::service::aura_build_import_queue::<_, AuraId>,
|
||||
@@ -522,14 +504,6 @@ macro_rules! construct_partials {
|
||||
)?;
|
||||
$code
|
||||
},
|
||||
chain_spec::bridge_hubs::BridgeHubRuntimeType::Wococo |
|
||||
chain_spec::bridge_hubs::BridgeHubRuntimeType::WococoLocal => {
|
||||
let $partials = new_partial::<chain_spec::bridge_hubs::wococo::RuntimeApi, _>(
|
||||
&$config,
|
||||
crate::service::aura_build_import_queue::<_, AuraId>,
|
||||
)?;
|
||||
$code
|
||||
},
|
||||
},
|
||||
Runtime::CollectivesPolkadot => {
|
||||
let $partials = new_partial::<collectives_polkadot_runtime::RuntimeApi, _>(
|
||||
@@ -605,7 +579,7 @@ macro_rules! construct_async_run {
|
||||
{ $( $code )* }.map(|v| (v, task_manager))
|
||||
})
|
||||
},
|
||||
Runtime::AssetHubRococo | Runtime::AssetHubWococo => {
|
||||
Runtime::AssetHubRococo => {
|
||||
runner.async_run(|$config| {
|
||||
let $components = new_partial::<asset_hub_rococo_runtime::RuntimeApi, _>(
|
||||
&$config,
|
||||
@@ -739,18 +713,6 @@ macro_rules! construct_async_run {
|
||||
{ $( $code )* }.map(|v| (v, task_manager))
|
||||
})
|
||||
},
|
||||
chain_spec::bridge_hubs::BridgeHubRuntimeType::Wococo |
|
||||
chain_spec::bridge_hubs::BridgeHubRuntimeType::WococoLocal => {
|
||||
runner.async_run(|$config| {
|
||||
let $components = new_partial::<chain_spec::bridge_hubs::wococo::RuntimeApi, _>(
|
||||
&$config,
|
||||
crate::service::aura_build_import_queue::<_, AuraId>,
|
||||
)?;
|
||||
|
||||
let task_manager = $components.task_manager;
|
||||
{ $( $code )* }.map(|v| (v, task_manager))
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
Runtime::Penpal(_) | Runtime::Default => {
|
||||
@@ -978,7 +940,7 @@ pub fn run() -> Result<()> {
|
||||
.await
|
||||
.map(|r| r.0)
|
||||
.map_err(Into::into),
|
||||
Runtime::AssetHubRococo | Runtime::AssetHubWococo => crate::service::start_asset_hub_node::<
|
||||
Runtime::AssetHubRococo => crate::service::start_asset_hub_node::<
|
||||
asset_hub_rococo_runtime::RuntimeApi,
|
||||
AuraId,
|
||||
>(config, polkadot_config, collator_options, id, hwbench)
|
||||
@@ -1077,14 +1039,6 @@ chain_spec::bridge_hubs::BridgeHubRuntimeType::Polkadot |
|
||||
>(config, polkadot_config, collator_options, id, hwbench)
|
||||
.await
|
||||
.map(|r| r.0),
|
||||
chain_spec::bridge_hubs::BridgeHubRuntimeType::Wococo |
|
||||
chain_spec::bridge_hubs::BridgeHubRuntimeType::WococoLocal =>
|
||||
crate::service::start_generic_aura_node::<
|
||||
chain_spec::bridge_hubs::wococo::RuntimeApi,
|
||||
AuraId,
|
||||
>(config, polkadot_config, collator_options, id, hwbench)
|
||||
.await
|
||||
.map(|r| r.0),
|
||||
}
|
||||
.map_err(Into::into),
|
||||
Runtime::Penpal(_) | Runtime::Default =>
|
||||
|
||||
Reference in New Issue
Block a user