Companion for Soft deprecate GenesisConfig (#2636)

* update genesis config

* rebase and fix errors

---------

Co-authored-by: parity-processbot <>
Co-authored-by: joepetrowski <joe@parity.io>
This commit is contained in:
Juan
2023-06-16 13:05:45 +02:00
committed by GitHub
parent 185d376446
commit d77a8826d1
14 changed files with 62 additions and 60 deletions
@@ -25,11 +25,11 @@ use sp_core::{crypto::UncheckedInto, sr25519};
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type AssetHubPolkadotChainSpec =
sc_service::GenericChainSpec<asset_hub_polkadot_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<asset_hub_polkadot_runtime::RuntimeGenesisConfig, Extensions>;
pub type AssetHubKusamaChainSpec =
sc_service::GenericChainSpec<asset_hub_kusama_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<asset_hub_kusama_runtime::RuntimeGenesisConfig, Extensions>;
pub type AssetHubWestendChainSpec =
sc_service::GenericChainSpec<asset_hub_westend_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<asset_hub_westend_runtime::RuntimeGenesisConfig, Extensions>;
const ASSET_HUB_POLKADOT_ED: AssetHubBalance =
asset_hub_polkadot_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
@@ -213,8 +213,8 @@ fn asset_hub_polkadot_genesis(
invulnerables: Vec<(AccountId, AssetHubPolkadotAuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> asset_hub_polkadot_runtime::GenesisConfig {
asset_hub_polkadot_runtime::GenesisConfig {
) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig {
asset_hub_polkadot_runtime::RuntimeGenesisConfig {
system: asset_hub_polkadot_runtime::SystemConfig {
code: asset_hub_polkadot_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -402,8 +402,8 @@ fn asset_hub_kusama_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> asset_hub_kusama_runtime::GenesisConfig {
asset_hub_kusama_runtime::GenesisConfig {
) -> asset_hub_kusama_runtime::RuntimeGenesisConfig {
asset_hub_kusama_runtime::RuntimeGenesisConfig {
system: asset_hub_kusama_runtime::SystemConfig {
code: asset_hub_kusama_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -586,8 +586,8 @@ fn asset_hub_westend_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> asset_hub_westend_runtime::GenesisConfig {
asset_hub_westend_runtime::GenesisConfig {
) -> asset_hub_westend_runtime::RuntimeGenesisConfig {
asset_hub_westend_runtime::RuntimeGenesisConfig {
system: asset_hub_westend_runtime::SystemConfig {
code: asset_hub_westend_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -217,7 +217,7 @@ pub mod rococo {
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type BridgeHubChainSpec =
sc_service::GenericChainSpec<bridge_hub_rococo_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<bridge_hub_rococo_runtime::RuntimeGenesisConfig, Extensions>;
pub type RuntimeApi = bridge_hub_rococo_runtime::RuntimeApi;
@@ -289,8 +289,8 @@ pub mod rococo {
endowed_accounts: Vec<AccountId>,
id: ParaId,
bridges_pallet_owner: Option<AccountId>,
) -> bridge_hub_rococo_runtime::GenesisConfig {
bridge_hub_rococo_runtime::GenesisConfig {
) -> bridge_hub_rococo_runtime::RuntimeGenesisConfig {
bridge_hub_rococo_runtime::RuntimeGenesisConfig {
system: bridge_hub_rococo_runtime::SystemConfig {
code: bridge_hub_rococo_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -392,7 +392,7 @@ pub mod kusama {
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type BridgeHubChainSpec =
sc_service::GenericChainSpec<bridge_hub_kusama_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<bridge_hub_kusama_runtime::RuntimeGenesisConfig, Extensions>;
pub type RuntimeApi = bridge_hub_kusama_runtime::RuntimeApi;
pub fn local_config(
@@ -455,8 +455,8 @@ pub mod kusama {
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> bridge_hub_kusama_runtime::GenesisConfig {
bridge_hub_kusama_runtime::GenesisConfig {
) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig {
bridge_hub_kusama_runtime::RuntimeGenesisConfig {
system: bridge_hub_kusama_runtime::SystemConfig {
code: bridge_hub_kusama_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -524,7 +524,7 @@ pub mod polkadot {
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type BridgeHubChainSpec =
sc_service::GenericChainSpec<bridge_hub_polkadot_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<bridge_hub_polkadot_runtime::RuntimeGenesisConfig, Extensions>;
pub type RuntimeApi = bridge_hub_polkadot_runtime::RuntimeApi;
pub fn local_config(
@@ -587,8 +587,8 @@ pub mod polkadot {
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> bridge_hub_polkadot_runtime::GenesisConfig {
bridge_hub_polkadot_runtime::GenesisConfig {
) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig {
bridge_hub_polkadot_runtime::RuntimeGenesisConfig {
system: bridge_hub_polkadot_runtime::SystemConfig {
code: bridge_hub_polkadot_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -23,7 +23,7 @@ use sc_service::ChainType;
use sp_core::sr25519;
pub type CollectivesPolkadotChainSpec =
sc_service::GenericChainSpec<collectives_polkadot_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<collectives_polkadot_runtime::RuntimeGenesisConfig, Extensions>;
const COLLECTIVES_POLKADOT_ED: CollectivesBalance =
collectives_polkadot_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
@@ -132,8 +132,8 @@ fn collectives_polkadot_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> collectives_polkadot_runtime::GenesisConfig {
collectives_polkadot_runtime::GenesisConfig {
) -> collectives_polkadot_runtime::RuntimeGenesisConfig {
collectives_polkadot_runtime::RuntimeGenesisConfig {
system: collectives_polkadot_runtime::SystemConfig {
code: collectives_polkadot_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -24,7 +24,7 @@ use sc_service::ChainType;
use sp_core::{crypto::UncheckedInto, sr25519};
pub type ContractsRococoChainSpec =
sc_service::GenericChainSpec<contracts_rococo_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<contracts_rococo_runtime::RuntimeGenesisConfig, Extensions>;
/// No relay chain suffix because the id is the same over all relay chains.
const CONTRACTS_PARACHAIN_ID: u32 = 1002;
@@ -234,8 +234,8 @@ fn contracts_rococo_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> contracts_rococo_runtime::GenesisConfig {
contracts_rococo_runtime::GenesisConfig {
) -> contracts_rococo_runtime::RuntimeGenesisConfig {
contracts_rococo_runtime::RuntimeGenesisConfig {
system: contracts_rococo_runtime::SystemConfig {
code: contracts_rococo_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -21,7 +21,7 @@ use sp_core::sr25519;
/// Specialized `ChainSpec` for the Glutton parachain runtime.
pub type GluttonChainSpec =
sc_service::GenericChainSpec<glutton_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<glutton_runtime::RuntimeGenesisConfig, Extensions>;
pub fn glutton_development_config(para_id: ParaId) -> GluttonChainSpec {
GluttonChainSpec::from_genesis(
@@ -78,8 +78,8 @@ pub fn glutton_config(para_id: ParaId) -> GluttonChainSpec {
)
}
fn glutton_genesis(parachain_id: ParaId) -> glutton_runtime::GenesisConfig {
glutton_runtime::GenesisConfig {
fn glutton_genesis(parachain_id: ParaId) -> glutton_runtime::RuntimeGenesisConfig {
glutton_runtime::RuntimeGenesisConfig {
system: glutton_runtime::SystemConfig {
code: glutton_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -22,7 +22,8 @@ use parachains_common::{AccountId, AuraId};
use sc_service::ChainType;
use sp_core::sr25519;
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type PenpalChainSpec = sc_service::GenericChainSpec<penpal_runtime::GenesisConfig, Extensions>;
pub type PenpalChainSpec =
sc_service::GenericChainSpec<penpal_runtime::RuntimeGenesisConfig, Extensions>;
pub fn get_penpal_chain_spec(id: ParaId, relay_chain: &str) -> PenpalChainSpec {
// Give your base currency a unit name and decimal places
@@ -83,8 +84,8 @@ fn penpal_testnet_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> penpal_runtime::GenesisConfig {
penpal_runtime::GenesisConfig {
) -> penpal_runtime::RuntimeGenesisConfig {
penpal_runtime::RuntimeGenesisConfig {
system: penpal_runtime::SystemConfig {
code: penpal_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -26,7 +26,7 @@ use sc_chain_spec::ChainType;
use sp_core::{crypto::UncheckedInto, sr25519};
pub type RococoParachainChainSpec =
sc_service::GenericChainSpec<rococo_parachain_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<rococo_parachain_runtime::RuntimeGenesisConfig, Extensions>;
pub fn rococo_parachain_local_config() -> RococoParachainChainSpec {
RococoParachainChainSpec::from_genesis(
@@ -99,8 +99,8 @@ pub(crate) fn testnet_genesis(
initial_authorities: Vec<AuraId>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> rococo_parachain_runtime::GenesisConfig {
rococo_parachain_runtime::GenesisConfig {
) -> rococo_parachain_runtime::RuntimeGenesisConfig {
rococo_parachain_runtime::RuntimeGenesisConfig {
system: rococo_parachain_runtime::SystemConfig {
code: rococo_parachain_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -22,7 +22,7 @@ use sp_core::sr25519;
/// Specialized `ChainSpec` for the seedling parachain runtime.
pub type SeedlingChainSpec =
sc_service::GenericChainSpec<seedling_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<seedling_runtime::RuntimeGenesisConfig, Extensions>;
pub fn get_seedling_chain_spec() -> SeedlingChainSpec {
SeedlingChainSpec::from_genesis(
@@ -47,8 +47,8 @@ pub fn get_seedling_chain_spec() -> SeedlingChainSpec {
fn seedling_testnet_genesis(
root_key: AccountId,
parachain_id: ParaId,
) -> seedling_runtime::GenesisConfig {
seedling_runtime::GenesisConfig {
) -> seedling_runtime::RuntimeGenesisConfig {
seedling_runtime::RuntimeGenesisConfig {
system: seedling_runtime::SystemConfig {
code: seedling_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
@@ -19,7 +19,8 @@ use cumulus_primitives_core::ParaId;
use sc_service::ChainType;
/// Specialized `ChainSpec` for the shell parachain runtime.
pub type ShellChainSpec = sc_service::GenericChainSpec<shell_runtime::GenesisConfig, Extensions>;
pub type ShellChainSpec =
sc_service::GenericChainSpec<shell_runtime::RuntimeGenesisConfig, Extensions>;
pub fn get_shell_chain_spec() -> ShellChainSpec {
ShellChainSpec::from_genesis(
@@ -36,8 +37,8 @@ pub fn get_shell_chain_spec() -> ShellChainSpec {
)
}
fn shell_testnet_genesis(parachain_id: ParaId) -> shell_runtime::GenesisConfig {
shell_runtime::GenesisConfig {
fn shell_testnet_genesis(parachain_id: ParaId) -> shell_runtime::RuntimeGenesisConfig {
shell_runtime::RuntimeGenesisConfig {
system: shell_runtime::SystemConfig {
code: shell_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
+1 -1
View File
@@ -1244,7 +1244,7 @@ mod tests {
}
pub type DummyChainSpec<E> =
sc_service::GenericChainSpec<rococo_parachain_runtime::GenesisConfig, E>;
sc_service::GenericChainSpec<rococo_parachain_runtime::RuntimeGenesisConfig, E>;
pub fn create_default_with_extensions<E: Extension>(
id: &str,