mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Rename Statemint to Asset Hub (#2633)
* change dir names * cargo toml updates * fix crate imports for build * change chain spec names and PR review rule * update cli to accept asset-hub * find/replace benchmark commands * integration tests * bridges docs * more integration tests * AuraId * other statemint tidying * rename statemint mod * chain spec mod * rename e2e test dirs * one more Runtime::Statemine * benchmark westmint * rename chain spec name and id * rename chain spec files * more tidying in scripts/docs/tests * rename old dir if exists * Force people to manually do the move. (Safer as there could be additional considerations with their setup) * review touchups * more renaming * Update polkadot-parachain/src/command.rs Co-authored-by: Bastian Köcher <git@kchr.de> * better error message * do not break on-chain spec_name * log info message that path has been renamed * better penpal docs --------- Co-authored-by: gilescope <gilescope@gmail.com> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use grandpa::AuthorityId as GrandpaId;
|
||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||
pub use parachains_common::{AccountId, AuraId, Balance, BlockNumber, StatemintAuraId};
|
||||
pub use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance, BlockNumber};
|
||||
use polkadot_primitives::{AssignmentId, ValidatorId};
|
||||
pub use polkadot_runtime_parachains::configuration::HostConfiguration;
|
||||
use polkadot_service::chain_spec::get_authority_keys_from_seed_no_beefy;
|
||||
@@ -71,15 +71,15 @@ pub mod accounts {
|
||||
pub mod collators {
|
||||
use super::*;
|
||||
|
||||
pub fn invulnerables_statemint() -> Vec<(AccountId, StatemintAuraId)> {
|
||||
pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> {
|
||||
vec![
|
||||
(
|
||||
get_account_id_from_seed::<sr25519::Public>("Alice"),
|
||||
get_from_seed::<StatemintAuraId>("Alice"),
|
||||
get_from_seed::<AssetHubPolkadotAuraId>("Alice"),
|
||||
),
|
||||
(
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob"),
|
||||
get_from_seed::<StatemintAuraId>("Bob"),
|
||||
get_from_seed::<AssetHubPolkadotAuraId>("Bob"),
|
||||
),
|
||||
]
|
||||
}
|
||||
@@ -305,29 +305,31 @@ pub mod kusama {
|
||||
}
|
||||
}
|
||||
|
||||
// Statemint
|
||||
pub mod statemint {
|
||||
// Asset Hub Polkadot
|
||||
pub mod asset_hub_polkadot {
|
||||
use super::*;
|
||||
pub const PARA_ID: u32 = 1000;
|
||||
pub const ED: Balance = statemint_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
|
||||
pub const ED: Balance = asset_hub_polkadot_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = statemint_runtime::GenesisConfig {
|
||||
system: statemint_runtime::SystemConfig {
|
||||
code: statemint_runtime::WASM_BINARY
|
||||
let genesis_config = asset_hub_polkadot_runtime::GenesisConfig {
|
||||
system: asset_hub_polkadot_runtime::SystemConfig {
|
||||
code: asset_hub_polkadot_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not build, please build it!")
|
||||
.to_vec(),
|
||||
},
|
||||
balances: statemint_runtime::BalancesConfig {
|
||||
balances: asset_hub_polkadot_runtime::BalancesConfig {
|
||||
balances: accounts::init_balances()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|k| (k, ED * 4096))
|
||||
.collect(),
|
||||
},
|
||||
parachain_info: statemint_runtime::ParachainInfoConfig { parachain_id: PARA_ID.into() },
|
||||
collator_selection: statemint_runtime::CollatorSelectionConfig {
|
||||
invulnerables: collators::invulnerables_statemint()
|
||||
parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig {
|
||||
parachain_id: PARA_ID.into(),
|
||||
},
|
||||
collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig {
|
||||
invulnerables: collators::invulnerables_asset_hub_polkadot()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|(acc, _)| acc)
|
||||
@@ -335,14 +337,14 @@ pub mod statemint {
|
||||
candidacy_bond: ED * 16,
|
||||
..Default::default()
|
||||
},
|
||||
session: statemint_runtime::SessionConfig {
|
||||
keys: collators::invulnerables_statemint()
|
||||
session: asset_hub_polkadot_runtime::SessionConfig {
|
||||
keys: collators::invulnerables_asset_hub_polkadot()
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
statemint_runtime::SessionKeys { aura }, // session keys
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
asset_hub_polkadot_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
@@ -350,7 +352,7 @@ pub mod statemint {
|
||||
aura: Default::default(),
|
||||
aura_ext: Default::default(),
|
||||
parachain_system: Default::default(),
|
||||
polkadot_xcm: statemint_runtime::PolkadotXcmConfig {
|
||||
polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
},
|
||||
};
|
||||
@@ -359,28 +361,30 @@ pub mod statemint {
|
||||
}
|
||||
}
|
||||
|
||||
// Statemint
|
||||
pub mod statemine {
|
||||
// Asset Hub Kusama
|
||||
pub mod asset_hub_kusama {
|
||||
use super::*;
|
||||
pub const PARA_ID: u32 = 1000;
|
||||
pub const ED: Balance = statemine_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
|
||||
pub const ED: Balance = asset_hub_kusama_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = statemine_runtime::GenesisConfig {
|
||||
system: statemine_runtime::SystemConfig {
|
||||
code: statemine_runtime::WASM_BINARY
|
||||
let genesis_config = asset_hub_kusama_runtime::GenesisConfig {
|
||||
system: asset_hub_kusama_runtime::SystemConfig {
|
||||
code: asset_hub_kusama_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not build, please build it!")
|
||||
.to_vec(),
|
||||
},
|
||||
balances: statemine_runtime::BalancesConfig {
|
||||
balances: asset_hub_kusama_runtime::BalancesConfig {
|
||||
balances: accounts::init_balances()
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|k| (k, ED * 4096))
|
||||
.collect(),
|
||||
},
|
||||
parachain_info: statemine_runtime::ParachainInfoConfig { parachain_id: PARA_ID.into() },
|
||||
collator_selection: statemine_runtime::CollatorSelectionConfig {
|
||||
parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig {
|
||||
parachain_id: PARA_ID.into(),
|
||||
},
|
||||
collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig {
|
||||
invulnerables: collators::invulnerables()
|
||||
.iter()
|
||||
.cloned()
|
||||
@@ -389,14 +393,14 @@ pub mod statemine {
|
||||
candidacy_bond: ED * 16,
|
||||
..Default::default()
|
||||
},
|
||||
session: statemine_runtime::SessionConfig {
|
||||
session: asset_hub_kusama_runtime::SessionConfig {
|
||||
keys: collators::invulnerables()
|
||||
.into_iter()
|
||||
.map(|(acc, aura)| {
|
||||
(
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
statemine_runtime::SessionKeys { aura }, // session keys
|
||||
acc.clone(), // account id
|
||||
acc, // validator id
|
||||
asset_hub_kusama_runtime::SessionKeys { aura }, // session keys
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
@@ -404,7 +408,7 @@ pub mod statemine {
|
||||
aura: Default::default(),
|
||||
aura_ext: Default::default(),
|
||||
parachain_system: Default::default(),
|
||||
polkadot_xcm: statemine_runtime::PolkadotXcmConfig {
|
||||
polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig {
|
||||
safe_xcm_version: Some(SAFE_XCM_VERSION),
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user