Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove testnets-common #2620

Merged
merged 8 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ members = [
"cumulus/parachains/runtimes/test-utils",
"cumulus/parachains/runtimes/testing/penpal",
"cumulus/parachains/runtimes/testing/rococo-parachain",
"cumulus/parachains/testnets-common",
"cumulus/polkadot-parachain",
"cumulus/primitives/aura",
"cumulus/primitives/core",
Expand Down
29 changes: 24 additions & 5 deletions cumulus/parachains/common/src/westend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.

/// Universally recognized accounts.
pub mod account {
use frame_support::PalletId;

/// Westend treasury pallet id, used to convert into AccountId - in Westend as a destination for
/// slashed funds.
pub const WESTEND_TREASURY_PALLET_ID: PalletId = PalletId(*b"py/trsry");
/// Alliance pallet ID - used as a temporary place to deposit a slashed imbalance before the
/// teleport to the Treasury.
pub const ALLIANCE_PALLET_ID: PalletId = PalletId(*b"py/allia");
/// Referenda pallet ID - used as a temporary place to deposit a slashed imbalance before the
/// teleport to the Treasury.
pub const REFERENDA_PALLET_ID: PalletId = PalletId(*b"py/refer");
/// Ambassador Referenda pallet ID - used as a temporary place to deposit a slashed imbalance
/// before the teleport to the Treasury.
pub const AMBASSADOR_REFERENDA_PALLET_ID: PalletId = PalletId(*b"py/amref");
}

pub mod currency {
use polkadot_core_primitives::Balance;
use westend_runtime_constants as constants;
Expand All @@ -21,6 +39,7 @@ pub mod currency {
pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10;

pub const UNITS: Balance = constants::currency::UNITS;
pub const DOLLARS: Balance = UNITS; // 1_000_000_000_000
pub const CENTS: Balance = constants::currency::CENTS;
pub const MILLICENTS: Balance = constants::currency::MILLICENTS;
pub const GRAND: Balance = constants::currency::GRAND;
Expand All @@ -44,7 +63,7 @@ pub mod fee {
use smallvec::smallvec;
pub use sp_runtime::Perbill;

/// The block saturation level. Fees will be updates based on this value.
/// The block saturation level. Fees will be updated based on this value.
pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);

/// Handles converting a weight scalar to a fee value, based on the scale and granularity of the
Expand Down Expand Up @@ -110,11 +129,11 @@ pub mod fee {

/// Consensus-related.
pub mod consensus {
/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included
/// into the relay chain.
/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included into the
/// relay chain.
pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;
/// How many parachain blocks are processed by the relay chain per parent. Limits the
/// number of blocks authored per slot.
/// How many parachain blocks are processed by the relay chain per parent. Limits the number of
/// blocks authored per slot.
pub const BLOCK_PROCESSING_VELOCITY: u32 = 1;
/// Relay chain slot duration, in milliseconds.
pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ pallet-collator-selection = { path = "../../../../pallets/collator-selection", d
pallet-collective-content = { path = "../../../pallets/collective-content", default-features = false }
parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false }
parachains-common = { path = "../../../common", default-features = false }
testnets-common = { path = "../../../testnets-common", default-features = false }

[build-dependencies]
substrate-wasm-builder = { path = "../../../../../substrate/utils/wasm-builder", optional = true }
Expand Down Expand Up @@ -118,7 +117,6 @@ runtime-benchmarks = [
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"testnets-common/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
]
Expand Down Expand Up @@ -216,7 +214,6 @@ std = [
"sp-transaction-pool/std",
"sp-version/std",
"substrate-wasm-builder",
"testnets-common/std",
"westend-runtime-constants/std",
"xcm-builder/std",
"xcm-executor/std",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,14 @@ use frame_system::{
};
pub use parachains_common as common;
use parachains_common::{
impls::DealWithFees, message_queue::*, AccountId, AuraId, Balance, BlockNumber, Hash, Header,
Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, MINUTES,
NORMAL_DISPATCH_RATIO, SLOT_DURATION,
impls::DealWithFees,
message_queue::*,
westend::{account::*, consensus::*, currency::*, fee::WeightToFee},
AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature,
AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO,
SLOT_DURATION,
};
use sp_runtime::RuntimeDebug;
use testnets_common::westend::{account::*, consensus::*, currency::*, fee::WeightToFee};
use xcm_config::{GovernanceLocation, XcmOriginToTransactDispatchOrigin};

#[cfg(any(feature = "std", test))]
Expand Down
44 changes: 0 additions & 44 deletions cumulus/parachains/testnets-common/Cargo.toml

This file was deleted.

30 changes: 0 additions & 30 deletions cumulus/parachains/testnets-common/src/lib.rs

This file was deleted.

119 changes: 0 additions & 119 deletions cumulus/parachains/testnets-common/src/rococo.rs

This file was deleted.

Loading