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

Removes production configs for derive_impl and updates system config #4689

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
18 changes: 16 additions & 2 deletions cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use sp_version::RuntimeVersion;
use codec::{Decode, Encode, MaxEncodedLen};
use cumulus_primitives_core::ParaId;
use frame_support::{
construct_runtime, derive_impl,
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_state, get_preset},
ord_parameter_types, parameter_types,
Expand Down Expand Up @@ -157,7 +157,6 @@ parameter_types! {
}

// Configure FRAME pallets to include in runtime.
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
type BlockWeights = RuntimeBlockWeights;
type BlockLength = RuntimeBlockLength;
Expand All @@ -173,6 +172,21 @@ impl frame_system::Config for Runtime {
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
type PalletInfo = PalletInfo;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
type Hashing = sp_runtime::traits::BlakeTwo256;
type Lookup = sp_runtime::traits::AccountIdLookup<Self::AccountId, ()>;
type OnNewAccount = ();
type OnKilledAccount = ();
type BaseCallFilter = frame_support::traits::Everything;
}

impl pallet_timestamp::Config for Runtime {
Expand Down
18 changes: 16 additions & 2 deletions cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use frame_support::{
construct_runtime, derive_impl,
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_state, get_preset},
ord_parameter_types, parameter_types,
Expand Down Expand Up @@ -159,7 +159,6 @@ parameter_types! {
}

// Configure FRAME pallets to include in runtime.
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
type BlockWeights = RuntimeBlockWeights;
type BlockLength = RuntimeBlockLength;
Expand All @@ -175,6 +174,21 @@ impl frame_system::Config for Runtime {
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
type PalletInfo = PalletInfo;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
type Hashing = sp_runtime::traits::BlakeTwo256;
type Lookup = sp_runtime::traits::AccountIdLookup<Self::AccountId, ()>;
type OnNewAccount = ();
type OnKilledAccount = ();
type BaseCallFilter = frame_support::traits::Everything;
}

impl pallet_timestamp::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ use sp_version::RuntimeVersion;

use cumulus_primitives_core::ParaId;
use frame_support::{
construct_runtime, derive_impl,
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_state, get_preset},
parameter_types,
Expand Down Expand Up @@ -249,8 +249,6 @@ parameter_types! {
}

// Configure FRAME pallets to include in runtime.

#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
Expand Down Expand Up @@ -279,6 +277,21 @@ impl frame_system::Config for Runtime {
/// The action to take on a Runtime Upgrade
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
type PalletInfo = PalletInfo;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
type Hashing = sp_runtime::traits::BlakeTwo256;
type Lookup = sp_runtime::traits::AccountIdLookup<Self::AccountId, ()>;
type OnNewAccount = ();
type OnKilledAccount = ();
type BaseCallFilter = frame_support::traits::Everything;
}

impl pallet_timestamp::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ use bridge_hub_common::{
AggregateMessageOrigin,
};
use frame_support::{
construct_runtime, derive_impl,
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_state, get_preset},
parameter_types,
Expand Down Expand Up @@ -223,8 +223,6 @@ parameter_types! {
}

// Configure FRAME pallets to include in runtime.

#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
Expand Down Expand Up @@ -253,6 +251,21 @@ impl frame_system::Config for Runtime {
/// The action to take on a Runtime Upgrade
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
type PalletInfo = PalletInfo;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
type Hashing = sp_runtime::traits::BlakeTwo256;
type Lookup = sp_runtime::traits::AccountIdLookup<Self::AccountId, ()>;
type OnNewAccount = ();
type OnKilledAccount = ();
type BaseCallFilter = frame_support::traits::Everything;
}

impl pallet_timestamp::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ use sp_version::RuntimeVersion;
use codec::{Decode, Encode, MaxEncodedLen};
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use frame_support::{
construct_runtime, derive_impl,
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_state, get_preset},
parameter_types,
Expand Down Expand Up @@ -162,7 +162,6 @@ parameter_types! {
}

// Configure FRAME pallets to include in runtime.
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
type BlockWeights = RuntimeBlockWeights;
type BlockLength = RuntimeBlockLength;
Expand All @@ -179,6 +178,20 @@ impl frame_system::Config for Runtime {
type SS58Prefix = ConstU16<0>;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeTask = RuntimeTask;
type PalletInfo = PalletInfo;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
type Hashing = sp_runtime::traits::BlakeTwo256;
type Lookup = sp_runtime::traits::AccountIdLookup<Self::AccountId, ()>;
type OnNewAccount = ();
type OnKilledAccount = ();
type BaseCallFilter = frame_support::traits::Everything;
}

impl pallet_timestamp::Config for Runtime {
Expand Down
18 changes: 16 additions & 2 deletions cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use sp_version::NativeVersion;
use sp_version::RuntimeVersion;

use frame_support::{
construct_runtime, derive_impl,
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_state, get_preset},
parameter_types,
Expand Down Expand Up @@ -175,7 +175,6 @@ parameter_types! {
}

// Configure FRAME pallets to include in runtime.
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
type BlockWeights = RuntimeBlockWeights;
type BlockLength = RuntimeBlockLength;
Expand All @@ -191,6 +190,21 @@ impl frame_system::Config for Runtime {
type SS58Prefix = ConstU16<42>;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = ConstU32<16>;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
type PalletInfo = PalletInfo;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
type Hashing = sp_runtime::traits::BlakeTwo256;
type Lookup = sp_runtime::traits::AccountIdLookup<Self::AccountId, ()>;
type OnNewAccount = ();
type OnKilledAccount = ();
type BaseCallFilter = frame_support::traits::Everything;
}

impl pallet_timestamp::Config for Runtime {
Expand Down
18 changes: 16 additions & 2 deletions cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub mod xcm_config;
use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use frame_support::{
construct_runtime, derive_impl,
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_state, get_preset},
parameter_types,
Expand Down Expand Up @@ -177,7 +177,6 @@ parameter_types! {
}

// Configure FRAME pallets to include in runtime.
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
Expand Down Expand Up @@ -205,6 +204,21 @@ impl frame_system::Config for Runtime {
/// The action to take on a Runtime Upgrade
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = ConstU32<16>;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
type PalletInfo = PalletInfo;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
type Hashing = sp_runtime::traits::BlakeTwo256;
type Lookup = sp_runtime::traits::AccountIdLookup<Self::AccountId, ()>;
type OnNewAccount = ();
type OnKilledAccount = ();
type BaseCallFilter = frame_support::traits::Everything;
}

impl pallet_timestamp::Config for Runtime {
Expand Down
18 changes: 16 additions & 2 deletions cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub mod xcm_config;
use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use frame_support::{
construct_runtime, derive_impl,
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_state, get_preset},
parameter_types,
Expand Down Expand Up @@ -176,7 +176,6 @@ parameter_types! {
}

// Configure FRAME pallets to include in runtime.
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
Expand Down Expand Up @@ -204,6 +203,21 @@ impl frame_system::Config for Runtime {
/// The action to take on a Runtime Upgrade
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = ConstU32<16>;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
type PalletInfo = PalletInfo;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
type Hashing = sp_runtime::traits::BlakeTwo256;
type Lookup = sp_runtime::traits::AccountIdLookup<Self::AccountId, ()>;
type OnNewAccount = ();
type OnKilledAccount = ();
type BaseCallFilter = frame_support::traits::Everything;
}

impl pallet_timestamp::Config for Runtime {
Expand Down
21 changes: 19 additions & 2 deletions cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ use sp_version::RuntimeVersion;

use cumulus_primitives_core::AggregateMessageOrigin;
pub use frame_support::{
construct_runtime, derive_impl,
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_state, get_preset},
parameter_types,
Expand Down Expand Up @@ -146,7 +146,6 @@ parameter_types! {
pub const SS58Prefix: u8 = 42;
}

#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
type AccountId = AccountId;
type Nonce = Nonce;
Expand All @@ -159,6 +158,24 @@ impl frame_system::Config for Runtime {
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
type PalletInfo = PalletInfo;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
type Hashing = sp_runtime::traits::BlakeTwo256;
type Lookup = sp_runtime::traits::AccountIdLookup<Self::AccountId, ()>;
type OnNewAccount = ();
type OnKilledAccount = ();
type BaseCallFilter = frame_support::traits::Everything;
type DbWeight = ();
type AccountData = frame_system::AccountInfo<Self::Nonce, ()>;
type SystemWeightInfo = ();
}

parameter_types! {
Expand Down
17 changes: 15 additions & 2 deletions cumulus/parachains/runtimes/people/people-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub mod xcm_config;
use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use frame_support::{
construct_runtime, derive_impl,
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_state, get_preset},
parameter_types,
Expand Down Expand Up @@ -166,7 +166,6 @@ parameter_types! {
pub const SS58Prefix: u8 = 42;
}

#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
type BaseCallFilter = Everything;
type BlockWeights = RuntimeBlockWeights;
Expand All @@ -183,6 +182,20 @@ impl frame_system::Config for Runtime {
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = ConstU32<16>;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type RuntimeTask = RuntimeTask;
type PalletInfo = PalletInfo;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
type Hashing = sp_runtime::traits::BlakeTwo256;
type Lookup = sp_runtime::traits::AccountIdLookup<Self::AccountId, ()>;
type OnNewAccount = ();
type OnKilledAccount = ();
}

impl pallet_timestamp::Config for Runtime {
Expand Down
Loading
Loading