[cumulus] parachains-common testnet constants cleaning (#3134)

The `parachains-common` contains a lots of constants and type
definitions which are used for `polkadot-sdk`'s testnet runtimes and
also for `polkadot-fellows`'s production [SP
runtimes](https://github.com/polkadot-fellows/runtimes/tree/main/system-parachains/constants).
This PR cleans `parachains-common` module to contain only common and
generic functionality.

Testnet-specific constants have been moved to the separate module
dedicated just for testnets:
`polkadot-sdk/cumulus/parachains/runtimes/constants/`


Part of: https://github.com/paritytech/polkadot-sdk/issues/3054

---------

Co-authored-by: georgepisaltu <george.pisaltu@parity.io>
This commit is contained in:
Branislav Kontur
2024-01-31 01:08:52 +01:00
committed by GitHub
parent 5b7f24fca1
commit 4450b61571
76 changed files with 246 additions and 219 deletions
@@ -16,11 +16,10 @@ workspace = true
sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false }
frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false }
# Polakadot
parachains-common = { path = "../../../../../../../parachains/common" }
# Cumulus
parachains-common = { path = "../../../../../../../parachains/common" }
cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false }
emulated-integration-tests-common = { path = "../../../../common", default-features = false }
asset-hub-rococo-runtime = { path = "../../../../../../runtimes/assets/asset-hub-rococo" }
rococo-emulated-chain = { path = "../../../relays/rococo" }
testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] }
@@ -23,7 +23,7 @@ use emulated_integration_tests_common::{
use parachains_common::Balance;
pub const PARA_ID: u32 = 1000;
pub const ED: Balance = parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT;
pub const ED: Balance = testnet_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = asset_hub_rococo_runtime::RuntimeGenesisConfig {
@@ -16,11 +16,10 @@ workspace = true
sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false }
frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false }
# Polakadot
parachains-common = { path = "../../../../../../../parachains/common" }
# Cumulus
parachains-common = { path = "../../../../../../../parachains/common" }
cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false }
emulated-integration-tests-common = { path = "../../../../common", default-features = false }
asset-hub-westend-runtime = { path = "../../../../../../runtimes/assets/asset-hub-westend" }
westend-emulated-chain = { path = "../../../relays/westend" }
testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] }
@@ -23,7 +23,7 @@ use emulated_integration_tests_common::{
use parachains_common::Balance;
pub const PARA_ID: u32 = 1000;
pub const ED: Balance = parachains_common::westend::currency::EXISTENTIAL_DEPOSIT;
pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = asset_hub_westend_runtime::RuntimeGenesisConfig {
@@ -16,10 +16,9 @@ workspace = true
sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false }
frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false }
# Polakadot
parachains-common = { path = "../../../../../../../parachains/common" }
# Cumulus
parachains-common = { path = "../../../../../../../parachains/common" }
emulated-integration-tests-common = { path = "../../../../common", default-features = false }
bridge-hub-rococo-runtime = { path = "../../../../../../runtimes/bridge-hubs/bridge-hub-rococo" }
bridge-hub-common = { path = "../../../../../../runtimes/bridge-hubs/common", default-features = false }
testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] }
@@ -24,7 +24,7 @@ use parachains_common::Balance;
pub const ASSETHUB_PARA_ID: u32 = 1000;
pub const PARA_ID: u32 = 1013;
pub const ED: Balance = parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT;
pub const ED: Balance = testnet_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = bridge_hub_rococo_runtime::RuntimeGenesisConfig {
@@ -16,10 +16,9 @@ workspace = true
sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false }
frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false }
# Polakadot
parachains-common = { path = "../../../../../../../parachains/common" }
# Cumulus
parachains-common = { path = "../../../../../../../parachains/common" }
emulated-integration-tests-common = { path = "../../../../common", default-features = false }
bridge-hub-westend-runtime = { path = "../../../../../../runtimes/bridge-hubs/bridge-hub-westend" }
bridge-hub-common = { path = "../../../../../../runtimes/bridge-hubs/common", default-features = false }
testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] }
@@ -23,7 +23,7 @@ use emulated_integration_tests_common::{
use parachains_common::Balance;
pub const PARA_ID: u32 = 1002;
pub const ED: Balance = parachains_common::westend::currency::EXISTENTIAL_DEPOSIT;
pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = bridge_hub_westend_runtime::RuntimeGenesisConfig {
@@ -16,10 +16,9 @@ workspace = true
sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false }
frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false }
# Polakadot
parachains-common = { path = "../../../../../../../parachains/common" }
# Cumulus
parachains-common = { path = "../../../../../../../parachains/common" }
cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false }
emulated-integration-tests-common = { path = "../../../../common", default-features = false }
collectives-westend-runtime = { path = "../../../../../../runtimes/collectives/collectives-westend" }
testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] }
@@ -23,7 +23,7 @@ use emulated_integration_tests_common::{
use parachains_common::Balance;
pub const PARA_ID: u32 = 1001;
pub const ED: Balance = parachains_common::westend::currency::EXISTENTIAL_DEPOSIT;
pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = collectives_westend_runtime::RuntimeGenesisConfig {
@@ -13,10 +13,9 @@ publish = false
sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false }
frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false }
# Polakadot
parachains-common = { path = "../../../../../../../parachains/common" }
# Cumulus
parachains-common = { path = "../../../../../../../parachains/common" }
cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false }
emulated-integration-tests-common = { path = "../../../../common", default-features = false }
people-rococo-runtime = { path = "../../../../../../runtimes/people/people-rococo" }
testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] }
@@ -22,7 +22,7 @@ use emulated_integration_tests_common::{build_genesis_storage, collators, SAFE_X
use parachains_common::Balance;
pub const PARA_ID: u32 = 1004;
pub const ED: Balance = parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT;
pub const ED: Balance = testnet_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = people_rococo_runtime::RuntimeGenesisConfig {
@@ -13,10 +13,9 @@ publish = false
sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false }
frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false }
# Polakadot
parachains-common = { path = "../../../../../../../parachains/common" }
# Cumulus
parachains-common = { path = "../../../../../../../parachains/common" }
cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false }
emulated-integration-tests-common = { path = "../../../../common", default-features = false }
people-westend-runtime = { path = "../../../../../../runtimes/people/people-westend" }
testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] }
@@ -22,7 +22,7 @@ use emulated_integration_tests_common::{build_genesis_storage, collators, SAFE_X
use parachains_common::Balance;
pub const PARA_ID: u32 = 1004;
pub const ED: Balance = parachains_common::westend::currency::EXISTENTIAL_DEPOSIT;
pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = people_westend_runtime::RuntimeGenesisConfig {
@@ -16,10 +16,8 @@ workspace = true
sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false }
frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false }
# Polakadot
parachains-common = { path = "../../../../../../../parachains/common" }
# Cumulus
parachains-common = { path = "../../../../../../../parachains/common" }
cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false }
emulated-integration-tests-common = { path = "../../../../common", default-features = false }
penpal-runtime = { path = "../../../../../../runtimes/testing/penpal" }