[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
@@ -75,7 +75,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur
cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false }
pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false }
parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false }
parachains-common = { path = "../../../common", default-features = false, features = ["rococo"] }
parachains-common = { path = "../../../common", default-features = false }
testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] }
[features]
default = ["std"]
@@ -131,6 +132,7 @@ std = [
"sp-transaction-pool/std",
"sp-version/std",
"substrate-wasm-builder",
"testnet-parachains-constants/std",
"xcm-builder/std",
"xcm-executor/std",
"xcm/std",
@@ -26,7 +26,7 @@ use pallet_contracts::{
};
use sp_runtime::Perbill;
pub use parachains_common::rococo::currency::deposit;
use testnet_parachains_constants::rococo::currency::deposit;
// Prints debug output of the `contracts` pallet to stdout if the node is
// started with `-lruntime::contracts=debug`.
@@ -57,13 +57,12 @@ use frame_support::{
use frame_system::limits::{BlockLength, BlockWeights};
pub use parachains_common as common;
use parachains_common::{
impls::DealWithFees,
message_queue::*,
rococo::{consensus::*, currency::*, fee::WeightToFee},
AccountId, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO,
MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
impls::DealWithFees, message_queue::*, AccountId, BlockNumber, Hash, Header, Nonce, Signature,
AVERAGE_ON_INITIALIZE_RATIO, MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO,
SLOT_DURATION,
};
pub use parachains_common::{AuraId, Balance};
use testnet_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee};
use xcm_config::CollatorSelectionUpdateOrigin;
#[cfg(any(feature = "std", test))]
@@ -17,7 +17,6 @@ use super::{
AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm,
Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, TransactionByteFee, WeightToFee, XcmpQueue,
};
use crate::common::rococo::currency::CENTS;
use cumulus_primitives_core::AggregateMessageOrigin;
use frame_support::{
parameter_types,
@@ -36,6 +35,7 @@ use parachains_common::{
use polkadot_parachain_primitives::primitives::Sibling;
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
use sp_runtime::traits::AccountIdConversion;
use testnet_parachains_constants::rococo::currency::CENTS;
use xcm::latest::prelude::*;
#[allow(deprecated)]
use xcm_builder::CurrencyAdapter;