git.delta.rocks / unique-network / refs/commits / a931d82a9899

difftreelog

feat(collator-selection) opal only

Fahrrader2022-10-28parent: #3858e94.patch.diff
in: master

10 files changed

modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -24,7 +24,7 @@
 use serde_json::map::Map;
 
 use up_common::types::opaque::*;
-use up_common::constants::EXISTENTIAL_DEPOSIT;
+use up_common::constants::CANDIDACY_BOND;
 
 #[cfg(feature = "unique-runtime")]
 pub use unique_runtime as default_runtime;
@@ -151,6 +151,7 @@
 	AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
 }
 
+#[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
 macro_rules! testnet_genesis {
 	(
 		$runtime:path,
@@ -191,7 +192,7 @@
 					.cloned()
 					.map(|(acc, _)| acc)
 					.collect(),
-				candidacy_bond: EXISTENTIAL_DEPOSIT * 16,
+				candidacy_bond: CANDIDACY_BOND,
 				..Default::default()
 			},
 			session: SessionConfig {
@@ -207,9 +208,6 @@
 					.collect(),
 			},
 			aura: Default::default(),
-			/*aura: AuraConfig {
-				authorities: $initial_authorities,
-			},*/
 			aura_ext: Default::default(),
 			evm: EVMConfig {
 				accounts: BTreeMap::new(),
@@ -219,6 +217,56 @@
 	}};
 }
 
+#[cfg(any(feature = "unique-runtime", feature = "quartz-runtime"))]
+macro_rules! testnet_genesis {
+	(
+		$runtime:path,
+		$root_key:expr,
+		$initial_invulnerables:expr,
+		$endowed_accounts:expr,
+		$id:expr
+	) => {{
+		use $runtime::*;
+
+		GenesisConfig {
+			system: SystemConfig {
+				code: WASM_BINARY
+					.expect("WASM binary was not build, please build it!")
+					.to_vec(),
+			},
+			balances: BalancesConfig {
+				balances: $endowed_accounts
+					.iter()
+					.cloned()
+					// 1e13 UNQ
+					.map(|k| (k, 1 << 100))
+					.collect(),
+			},
+			treasury: Default::default(),
+			tokens: TokensConfig { balances: vec![] },
+			sudo: SudoConfig {
+				key: Some($root_key),
+			},
+			vesting: VestingConfig { vesting: vec![] },
+			parachain_info: ParachainInfoConfig {
+				parachain_id: $id.into(),
+			},
+			parachain_system: Default::default(),
+			aura: AuraConfig {
+				authorities: $initial_invulnerables
+					.into_iter()
+					.map(|(_, aura)| aura)
+					.collect(),
+			},
+			aura_ext: Default::default(),
+			evm: EVMConfig {
+				accounts: BTreeMap::new(),
+			},
+			ethereum: EthereumConfig {},
+		}
+	}};
+}
+
 pub fn development_config() -> DefaultChainSpec {
 	let mut properties = Map::new();
 	properties.insert("tokenSymbol".into(), default_runtime::TOKEN_SYMBOL.into());
modifiedprimitives/common/src/constants.rsdiffbeforeafterboth
--- a/primitives/common/src/constants.rs
+++ b/primitives/common/src/constants.rs
@@ -41,7 +41,10 @@
 pub const CENTIUNIQUE: Balance = 10 * MILLIUNIQUE;
 pub const UNIQUE: Balance = 100 * CENTIUNIQUE;
 
+/// Minimum balance required to create or keep an account open.
 pub const EXISTENTIAL_DEPOSIT: u128 = 0;
+/// Amount of Balance reserved for candidate registration.
+pub const CANDIDACY_BOND: u128 = EXISTENTIAL_DEPOSIT;
 
 // Targeting 0.1 UNQ per transfer
 pub const WEIGHT_TO_FEE_COEFF: u32 = /*<weight2fee>*/207_163_598/*</weight2fee>*/;
addedruntime/common/config/pallets/collator_selection.rsdiffbeforeafterboth
--- /dev/null
+++ b/runtime/common/config/pallets/collator_selection.rs
@@ -0,0 +1,78 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+use frame_support::{parameter_types, PalletId};
+use frame_system::EnsureRoot;
+use crate::{
+	AccountId, BlockNumber, Runtime, RuntimeEvent, Balances, Aura, Session, SessionKeys,
+	CollatorSelection,
+};
+use up_common::constants::*;
+
+parameter_types! {
+	pub const SessionPeriod: BlockNumber = HOURS;
+	pub const SessionOffset: BlockNumber = 0;
+}
+
+impl pallet_session::Config for Runtime {
+	type RuntimeEvent = RuntimeEvent;
+	type ValidatorId = <Self as frame_system::Config>::AccountId;
+	// we don't have stash and controller, thus we don't need the convert as well.
+	type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
+	type ShouldEndSession = pallet_session::PeriodicSessions<SessionPeriod, SessionOffset>;
+	type NextSessionRotation = pallet_session::PeriodicSessions<SessionPeriod, SessionOffset>;
+	type SessionManager = CollatorSelection;
+	// Essentially just Aura, but lets be pedantic.
+	type SessionHandler = <SessionKeys as sp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
+	type Keys = SessionKeys;
+	type WeightInfo = pallet_session::weights::SubstrateWeight<Self>; // ();
+}
+
+parameter_types! {
+	pub const UncleGenerations: u32 = 0;
+}
+
+impl pallet_authorship::Config for Runtime {
+	type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
+	type UncleGenerations = UncleGenerations;
+	type FilterUncle = ();
+	type EventHandler = CollatorSelection;
+}
+
+parameter_types! {
+	pub const PotId: PalletId = PalletId(*b"PotStake");
+	pub const MaxCandidates: u32 = 1000;
+	pub const MinCandidates: u32 = 5;
+	pub const MaxInvulnerables: u32 = 100;
+}
+
+impl pallet_collator_selection::Config for Runtime {
+	type RuntimeEvent = RuntimeEvent;
+	type Currency = Balances;
+	// We allow root only to execute privileged collator selection operations.
+	type UpdateOrigin = EnsureRoot<AccountId>;
+	type PotId = PotId;
+	type MaxCandidates = MaxCandidates;
+	type MinCandidates = MinCandidates;
+	type MaxInvulnerables = MaxInvulnerables;
+	// todo:collator kick threshold should be in storage and configured only by root -- or rather UpdateOrigin
+	// Should be a multiple of session or things will get inconsistent.
+	type KickThreshold = SessionPeriod;
+	type ValidatorId = <Self as frame_system::Config>::AccountId;
+	type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
+	type ValidatorRegistration = Session;
+	type WeightInfo = ();
+}
modifiedruntime/common/config/pallets/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -46,6 +46,9 @@
 #[cfg(feature = "app-promotion")]
 pub mod app_promotion;
 
+#[cfg(feature = "collator-selection")]
+pub mod collator_selection;
+
 parameter_types! {
 	pub TreasuryAccountId: AccountId = TreasuryModuleId::get().into_account_truncating();
 	pub const CollectionCreationPrice: Balance = 2 * UNIQUE;
modifiedruntime/common/config/substrate.rsdiffbeforeafterboth
--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -34,7 +34,7 @@
 };
 use crate::{
 	runtime_common::DealWithFees, Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, PalletInfo,
-	System, Balances, Treasury, SS58Prefix, Aura, Session, SessionKeys, CollatorSelection, Version,
+	System, Balances, Treasury, SS58Prefix, Version,
 };
 use up_common::{types::*, constants::*};
 
@@ -215,58 +215,4 @@
 	type AuthorityId = AuraId;
 	type DisabledValidators = ();
 	type MaxAuthorities = MaxAuthorities;
-}
-
-parameter_types! {
-	pub const SessionPeriod: BlockNumber = HOURS;
-	pub const SessionOffset: BlockNumber = 0;
-}
-
-impl pallet_session::Config for Runtime {
-	type RuntimeEvent = RuntimeEvent;
-	type ValidatorId = <Self as frame_system::Config>::AccountId;
-	// we don't have stash and controller, thus we don't need the convert as well.
-	type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
-	type ShouldEndSession = pallet_session::PeriodicSessions<SessionPeriod, SessionOffset>;
-	type NextSessionRotation = pallet_session::PeriodicSessions<SessionPeriod, SessionOffset>;
-	type SessionManager = CollatorSelection;
-	// Essentially just Aura, but lets be pedantic.
-	type SessionHandler = <SessionKeys as sp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
-	type Keys = SessionKeys;
-	type WeightInfo = pallet_session::weights::SubstrateWeight<Self>; // ();
-}
-
-parameter_types! {
-	pub const UncleGenerations: u32 = 0;
-}
-
-impl pallet_authorship::Config for Runtime {
-	type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
-	type UncleGenerations = UncleGenerations;
-	type FilterUncle = ();
-	type EventHandler = CollatorSelection;
-}
-
-parameter_types! {
-	pub const PotId: PalletId = PalletId(*b"PotStake");
-	pub const MaxCandidates: u32 = 1000;
-	pub const MinCandidates: u32 = 5;
-	pub const MaxInvulnerables: u32 = 100;
-}
-
-impl pallet_collator_selection::Config for Runtime {
-	type RuntimeEvent = RuntimeEvent;
-	type Currency = Balances;
-	// We allow root only to execute privileged collator selection operations.
-	type UpdateOrigin = EnsureRoot<AccountId>;
-	type PotId = PotId;
-	type MaxCandidates = MaxCandidates;
-	type MinCandidates = MinCandidates;
-	type MaxInvulnerables = MaxInvulnerables;
-	// Should be a multiple of session or things will get inconsistent.
-	type KickThreshold = SessionPeriod;
-	type ValidatorId = <Self as frame_system::Config>::AccountId;
-	type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
-	type ValidatorRegistration = Session;
-	type WeightInfo = ();
 }
modifiedruntime/common/construct_runtime/mod.rsdiffbeforeafterboth
--- a/runtime/common/construct_runtime/mod.rs
+++ b/runtime/common/construct_runtime/mod.rs
@@ -32,9 +32,15 @@
                 ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,
                 ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,
 
+                #[runtimes(opal)]
                 Authorship: pallet_authorship::{Pallet, Call, Storage} = 22,
+
+                #[runtimes(opal)]
                 CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 23,
+
+                #[runtimes(opal)]
                 Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 24,
+
                 Aura: pallet_aura::{Pallet, Config<T>} = 25,
                 AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 26,
 
modifiedruntime/common/mod.rsdiffbeforeafterboth
--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -180,154 +180,166 @@
 pub struct AuraToCollatorSelection;
 impl frame_support::traits::OnRuntimeUpgrade for AuraToCollatorSelection {
 	fn on_runtime_upgrade() -> Weight {
-		use frame_support::{BoundedVec, storage::migration};
-		use sp_runtime::{
-			traits::{OpaqueKeys, Saturating},
-			RuntimeAppPublic,
-		};
-		use pallet_session::SessionManager;
-		use up_common::constants::EXISTENTIAL_DEPOSIT;
-		use crate::config::substrate::MaxInvulnerables;
-
-		let mut weight = <Runtime as frame_system::Config>::DbWeight::get().reads(1);
+		#[cfg(feature = "collator-selection")]
+		{
+			use frame_support::{BoundedVec, storage::migration};
+			use sp_runtime::{
+				traits::{OpaqueKeys, Saturating},
+				RuntimeAppPublic,
+			};
+			use pallet_session::SessionManager;
+			use up_common::constants::CANDIDACY_BOND;
+			use crate::config::pallets::collator_selection::MaxInvulnerables;
 
-		let version =
-			migration::get_storage_value::<()>(b"AuraToCollatorSelection", b"StorageVersion", &[]);
-
-		let should_upgrade = match version {
-			None => true,
-			Some(_) => false,
-		};
+			let mut weight = <Runtime as frame_system::Config>::DbWeight::get().reads(1);
 
-		if should_upgrade {
-			log::info!(
-				target: "runtime::aura_to_collator_selection",
-				"Running migration of Aura authorities to Collator Selection invulnerables"
+			let version = migration::get_storage_value::<()>(
+				b"AuraToCollatorSelection",
+				b"StorageVersion",
+				&[],
 			);
 
-			let invulnerables = pallet_aura::Pallet::<Runtime>::authorities()
-				.iter()
-				.cloned()
-				.filter_map(|authority_id| {
-					weight.saturating_accrue(<Runtime as frame_system::Config>::DbWeight::get().reads_writes(1, 1));
-					let vec = authority_id.clone().to_raw_vec();
-					let slice = vec.as_slice();
-					let array: Option<[u8; 32]> = match slice.try_into() {
-						Ok(a) => Some(a),
-						Err(_) => {
-							log::error!("Failed to convert an Aura authority to a Collator Selection invulnerable: {:?}", authority_id);
-							None
-						},
-					};
-					array.map(|a| (AccountId::from(a), authority_id))
-				})
-				.collect::<Vec<_>>();
+			let should_upgrade = match version {
+				None => true,
+				Some(_) => false,
+			};
+
+			if should_upgrade {
+				log::info!(
+					target: "runtime::aura_to_collator_selection",
+					"Running migration of Aura authorities to Collator Selection invulnerables"
+				);
 
-			let bounded_invulnerables = BoundedVec::<_, MaxInvulnerables>::try_from(
-				invulnerables
+				let invulnerables = pallet_aura::Pallet::<Runtime>::authorities()
 					.iter()
 					.cloned()
-					.map(|(acc, _)| acc)
-					.collect::<Vec<_>>(),
-			)
-			.expect("Existing collators/invulnerables are more than MaxInvulnerables");
+					.filter_map(|authority_id| {
+						weight.saturating_accrue(<Runtime as frame_system::Config>::DbWeight::get().reads_writes(1, 1));
+						let vec = authority_id.clone().to_raw_vec();
+						let slice = vec.as_slice();
+						let array: Option<[u8; 32]> = match slice.try_into() {
+							Ok(a) => Some(a),
+							Err(_) => {
+								log::error!("Failed to convert an Aura authority to a Collator Selection invulnerable: {:?}", authority_id);
+								None
+							},
+						};
+						array.map(|a| (AccountId::from(a), authority_id))
+					})
+					.collect::<Vec<_>>();
 
-			<pallet_collator_selection::Invulnerables<Runtime>>::put(bounded_invulnerables);
-			<pallet_collator_selection::DesiredCandidates<Runtime>>::put(0);
-			<pallet_collator_selection::CandidacyBond<Runtime>>::put(EXISTENTIAL_DEPOSIT * 16);
+				let bounded_invulnerables = BoundedVec::<_, MaxInvulnerables>::try_from(
+					invulnerables
+						.iter()
+						.cloned()
+						.map(|(acc, _)| acc)
+						.collect::<Vec<_>>(),
+				)
+				.expect("Existing collators/invulnerables are more than MaxInvulnerables");
+
+				<pallet_collator_selection::Invulnerables<Runtime>>::put(bounded_invulnerables);
+				<pallet_collator_selection::DesiredCandidates<Runtime>>::put(0);
+				<pallet_collator_selection::CandidacyBond<Runtime>>::put(CANDIDACY_BOND);
 
-			let keys = invulnerables
-				.into_iter()
-				.map(|(acc, aura)| {
-					(
-						acc.clone(),                        // account id
-						acc,                                // validator id
-						SessionKeys { aura: aura.clone() }, // session keys
-					)
-				})
-				.collect::<Vec<_>>();
+				let keys = invulnerables
+					.into_iter()
+					.map(|(acc, aura)| {
+						(
+							acc.clone(),                        // account id
+							acc,                                // validator id
+							SessionKeys { aura: aura.clone() }, // session keys
+						)
+					})
+					.collect::<Vec<_>>();
 
-			for (account, val, keys) in keys.iter().cloned() {
-				for id in <Runtime as pallet_session::Config>::Keys::key_ids() {
-					<pallet_session::KeyOwner<Runtime>>::insert((*id, keys.get_raw(*id)), &val)
-				}
-				<pallet_session::NextKeys<Runtime>>::insert(&val, &keys);
-				// todo exercise caution, the following is taken from genesis
-				if frame_system::Pallet::<Runtime>::inc_consumers_without_limit(&account).is_err() {
-					log::warn!(
-						"We have entered an error with incrementing consumers without limit during the migration"
-					);
-					// This will leak a provider reference, however it only happens once (at
-					// genesis) so it's really not a big deal and we assume that the user wants to
-					// do this since it's the only way a non-endowed account can contain a session
-					// key.
-					frame_system::Pallet::<Runtime>::inc_providers(&account);
+				for (account, val, keys) in keys.iter().cloned() {
+					for id in <Runtime as pallet_session::Config>::Keys::key_ids() {
+						<pallet_session::KeyOwner<Runtime>>::insert((*id, keys.get_raw(*id)), &val)
+					}
+					<pallet_session::NextKeys<Runtime>>::insert(&val, &keys);
+					// todo exercise caution, the following is taken from genesis
+					if frame_system::Pallet::<Runtime>::inc_consumers_without_limit(&account)
+						.is_err()
+					{
+						log::warn!(
+							"We have entered an error with incrementing consumers without limit during the migration"
+						);
+						// This will leak a provider reference, however it only happens once (at
+						// genesis) so it's really not a big deal and we assume that the user wants to
+						// do this since it's the only way a non-endowed account can contain a session
+						// key.
+						frame_system::Pallet::<Runtime>::inc_providers(&account);
+					}
 				}
-			}
 
-			let initial_validators_0 =
-				<Runtime as pallet_session::Config>::SessionManager::new_session(0).unwrap_or_else(
-					|| {
-						frame_support::print(
-							"No initial validator provided by `SessionManager`, use \
-						session config keys to generate initial validator set.",
-						);
-						keys.iter().map(|x| x.1.clone()).collect()
-					},
-				);
-			/*assert!(
-				!initial_validators_0.is_empty(),
-				"Empty validator set for session 0 in (pseudo) genesis block!"
-			);*/
+				let initial_validators_0 =
+					<Runtime as pallet_session::Config>::SessionManager::new_session(0)
+						.unwrap_or_else(|| {
+							frame_support::print(
+								"No initial validator provided by `SessionManager`, use \
+							session config keys to generate initial validator set.",
+							);
+							keys.iter().map(|x| x.1.clone()).collect()
+						});
+				/*assert!(
+					!initial_validators_0.is_empty(),
+					"Empty validator set for session 0 in (pseudo) genesis block!"
+				);*/
 
-			let initial_validators_1 =
-				<Runtime as pallet_session::Config>::SessionManager::new_session(1)
-					.unwrap_or_else(|| initial_validators_0.clone());
-			/*assert!(
-				!initial_validators_1.is_empty(),
-				"Empty validator set for session 1 in (pseudo) genesis block!"
-			);*/
+				let initial_validators_1 =
+					<Runtime as pallet_session::Config>::SessionManager::new_session(1)
+						.unwrap_or_else(|| initial_validators_0.clone());
+				/*assert!(
+					!initial_validators_1.is_empty(),
+					"Empty validator set for session 1 in (pseudo) genesis block!"
+				);*/
 
-			let queued_keys: Vec<_> = initial_validators_1
-				.iter()
-				.cloned()
-				.map(|v| {
-					(
-						v.clone(),
-						<pallet_session::NextKeys<Runtime>>::get(&v)
-							.expect("Validator in session 1 missing keys!"),
-					)
-				})
-				.collect();
+				let queued_keys: Vec<_> = initial_validators_1
+					.iter()
+					.cloned()
+					.map(|v| {
+						(
+							v.clone(),
+							<pallet_session::NextKeys<Runtime>>::get(&v)
+								.expect("Validator in session 1 missing keys!"),
+						)
+					})
+					.collect();
 
-			// Tell everyone about the genesis session keys -- Aura must've already initialized it
-			//<Runtime as pallet_session::Config>::SessionHandler::on_genesis_session::<<Runtime as pallet_session::Config>::Keys>(&queued_keys);
+				// Tell everyone about the genesis session keys -- Aura must've already initialized it
+				//<Runtime as pallet_session::Config>::SessionHandler::on_genesis_session::<<Runtime as pallet_session::Config>::Keys>(&queued_keys);
+
+				<pallet_session::Validators<Runtime>>::put(initial_validators_0);
+				<pallet_session::QueuedKeys<Runtime>>::put(queued_keys);
 
-			<pallet_session::Validators<Runtime>>::put(initial_validators_0);
-			<pallet_session::QueuedKeys<Runtime>>::put(queued_keys);
+				<Runtime as pallet_session::Config>::SessionManager::start_session(0);
 
-			<Runtime as pallet_session::Config>::SessionManager::start_session(0);
+				log::info!(
+					target: "runtime::aura_to_collator_selection",
+					"Migration of Aura authorities to Collator Selection invulnerables is complete."
+				);
 
-			log::info!(
-				target: "runtime::aura_to_collator_selection",
-				"Migration of Aura authorities to Collator Selection invulnerables is complete."
-			);
+				migration::put_storage_value::<()>(
+					b"AuraToCollatorSelection",
+					b"StorageVersion",
+					&[],
+					(),
+				);
 
-			migration::put_storage_value::<()>(
-				b"AuraToCollatorSelection",
-				b"StorageVersion",
-				&[],
-				(),
-			);
+				weight += <Runtime as frame_system::Config>::DbWeight::get().writes(1)
+			} else {
+				log::info!(
+					target: "runtime::aura_to_collator_selection",
+					"The storage migration has already been flagged as complete. No migration needs to be done.",
+				);
+			}
 
-			weight += <Runtime as frame_system::Config>::DbWeight::get().writes(1)
-		} else {
-			log::info!(
-				target: "runtime::aura_to_collator_selection",
-				"The storage migration has already been flagged as complete. No migration needs to be done.",
-			);
+			weight
 		}
 
-		weight
+		#[cfg(not(feature = "collator-selection"))]
+		{
+			Weight::zero()
+		}
 	}
 }
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -173,13 +173,14 @@
     "pallet-foreign-assets/std",
 ]
 limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
-opal-runtime = ['refungible', 'rmrk', 'app-promotion', 'foreign-assets']
+opal-runtime = ['refungible', 'rmrk', 'app-promotion', 'foreign-assets', 'collator-selection']
 
 refungible = []
 scheduler = []
 rmrk = []
 foreign-assets = []
 app-promotion = []
+collator-selection = []
 
 ################################################################################
 # Substrate Dependencies
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -177,6 +177,7 @@
 scheduler = []
 rmrk = []
 foreign-assets = []
+collator-selection = []
 
 ################################################################################
 # Substrate Dependencies
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
before · runtime/unique/Cargo.toml
1################################################################################2# Package34cargo-features = ["workspace-inheritance"]56[package]7authors = ['Unique Network <support@uniquenetwork.io>']8build = 'build.rs'9description = 'Unique Runtime'10edition = '2021'11homepage = 'https://unique.network'12license = 'GPLv3'13name = 'unique-runtime'14repository = 'https://github.com/UniqueNetwork/unique-chain'15version = '0.9.30'1617[package.metadata.docs.rs]18targets = ['x86_64-unknown-linux-gnu']1920[features]21default = ['std', 'unique-runtime']22runtime-benchmarks = [23    'hex-literal',24    'frame-benchmarking',25    'frame-support/runtime-benchmarks',26    'frame-system-benchmarking',27    'frame-system/runtime-benchmarks',28    'pallet-ethereum/runtime-benchmarks',29    'pallet-evm-migration/runtime-benchmarks',30    'pallet-evm-coder-substrate/runtime-benchmarks',31    'pallet-balances/runtime-benchmarks',32	"pallet-collator-selection/runtime-benchmarks",33    'pallet-timestamp/runtime-benchmarks',34    'pallet-common/runtime-benchmarks',35    'pallet-structure/runtime-benchmarks',36    'pallet-fungible/runtime-benchmarks',37    'pallet-refungible/runtime-benchmarks',38    'pallet-nonfungible/runtime-benchmarks',39    'pallet-proxy-rmrk-core/runtime-benchmarks',40    'pallet-proxy-rmrk-equip/runtime-benchmarks',41    'pallet-unique/runtime-benchmarks',42    'pallet-foreign-assets/runtime-benchmarks',43    'pallet-inflation/runtime-benchmarks',44    'pallet-unique-scheduler/runtime-benchmarks',45    'pallet-xcm/runtime-benchmarks',46    'sp-runtime/runtime-benchmarks',47    'xcm-builder/runtime-benchmarks',48    'up-data-structs/runtime-benchmarks',49]50try-runtime = [51    'frame-try-runtime',52    'frame-executive/try-runtime',53    'frame-support/try-runtime',54    'frame-system/try-runtime',55    'cumulus-pallet-parachain-system/try-runtime',56    'parachain-info/try-runtime',57    'pallet-aura/try-runtime',58    'cumulus-pallet-aura-ext/try-runtime',59    'pallet-balances/try-runtime',60    'pallet-randomness-collective-flip/try-runtime',61    'pallet-timestamp/try-runtime',62    'pallet-transaction-payment/try-runtime',63    'pallet-treasury/try-runtime',64    'pallet-sudo/try-runtime',65    'orml-vesting/try-runtime',66    'orml-xtokens/try-runtime',67    'orml-tokens/try-runtime',68    'cumulus-pallet-xcmp-queue/try-runtime',69    'pallet-xcm/try-runtime',70    'cumulus-pallet-xcm/try-runtime',71    'cumulus-pallet-dmp-queue/try-runtime',72    'pallet-inflation/try-runtime',73    'pallet-unique/try-runtime',74    'pallet-unique-scheduler/try-runtime',75    'pallet-configuration/try-runtime',76    'pallet-charge-transaction/try-runtime',77    'pallet-common/try-runtime',78    'pallet-fungible/try-runtime',79    'pallet-refungible/try-runtime',80    'pallet-nonfungible/try-runtime',81    'pallet-structure/try-runtime',82    'pallet-proxy-rmrk-core/try-runtime',83    'pallet-proxy-rmrk-equip/try-runtime',84    'pallet-app-promotion/try-runtime',85    'pallet-foreign-assets/try-runtime',86    'pallet-evm/try-runtime',87    'pallet-ethereum/try-runtime',88    'pallet-evm-coder-substrate/try-runtime',89    'pallet-evm-contract-helpers/try-runtime',90    'pallet-evm-transaction-payment/try-runtime',91    'pallet-evm-migration/try-runtime',92]93std = [94    'codec/std',95    'cumulus-pallet-aura-ext/std',96    'cumulus-pallet-parachain-system/std',97    'cumulus-pallet-xcm/std',98    'cumulus-pallet-xcmp-queue/std',99    'cumulus-primitives-core/std',100    'cumulus-primitives-utility/std',101    'frame-try-runtime/std',102    'frame-executive/std',103    'frame-support/std',104    'frame-system/std',105    'frame-system-rpc-runtime-api/std',106    'pallet-aura/std',107    'pallet-balances/std',108    # 'pallet-contracts/std',109    # 'pallet-contracts-primitives/std',110    # 'pallet-contracts-rpc-runtime-api/std',111    # 'pallet-contract-helpers/std',112	"pallet-authorship/std",113	'pallet-collator-selection/std',114	"pallet-session/std",115    'pallet-randomness-collective-flip/std',116    'pallet-sudo/std',117    'pallet-timestamp/std',118    'pallet-transaction-payment/std',119    'pallet-transaction-payment-rpc-runtime-api/std',120    'pallet-treasury/std',121    'pallet-evm/std',122    'pallet-evm-migration/std',123    'pallet-evm-contract-helpers/std',124    'pallet-evm-transaction-payment/std',125    'pallet-evm-coder-substrate/std',126    'pallet-ethereum/std',127    'pallet-base-fee/std',128    'fp-rpc/std',129    'up-rpc/std',130    'app-promotion-rpc/std',131    'fp-evm-mapping/std',132    'fp-self-contained/std',133    'parachain-info/std',134    'serde',135    'pallet-inflation/std',136    'pallet-configuration/std',137    'pallet-common/std',138    'pallet-structure/std',139    'pallet-fungible/std',140    'pallet-refungible/std',141    'pallet-nonfungible/std',142    'pallet-proxy-rmrk-core/std',143    'pallet-proxy-rmrk-equip/std',144    'pallet-unique/std',145    'pallet-unique-scheduler/std',146    'pallet-charge-transaction/std',147    'up-data-structs/std',148    'sp-api/std',149    'sp-block-builder/std',150    "sp-consensus-aura/std",151    'sp-core/std',152    'sp-inherents/std',153    'sp-io/std',154    'sp-offchain/std',155    'sp-runtime/std',156    'sp-session/std',157    'sp-std/std',158    'sp-transaction-pool/std',159    'sp-version/std',160    'xcm/std',161    'xcm-builder/std',162    'xcm-executor/std',163    'up-common/std',164    'rmrk-rpc/std',165    'evm-coder/std',166    'up-sponsorship/std',167168    "orml-vesting/std",169    "orml-tokens/std",170    "orml-xtokens/std",171    "orml-traits/std",172    "pallet-foreign-assets/std",173]174limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']175unique-runtime = []176177refungible = []178scheduler = []179rmrk = []180foreign-assets = []181182################################################################################183# Substrate Dependencies184185[dependencies.codec]186default-features = false187features = ['derive']188package = 'parity-scale-codec'189version = '3.1.2'190191[dependencies.frame-benchmarking]192default-features = false193git = "https://github.com/paritytech/substrate"194optional = true195branch = "polkadot-v0.9.30"196197[dependencies.frame-try-runtime]198default-features = false199git = "https://github.com/paritytech/substrate"200optional = true201branch = "polkadot-v0.9.30"202203[dependencies.frame-executive]204default-features = false205git = "https://github.com/paritytech/substrate"206branch = "polkadot-v0.9.30"207208[dependencies.frame-support]209default-features = false210git = "https://github.com/paritytech/substrate"211branch = "polkadot-v0.9.30"212213[dependencies.frame-system]214default-features = false215git = "https://github.com/paritytech/substrate"216branch = "polkadot-v0.9.30"217218[dependencies.frame-system-benchmarking]219default-features = false220git = "https://github.com/paritytech/substrate"221optional = true222branch = "polkadot-v0.9.30"223224[dependencies.frame-system-rpc-runtime-api]225default-features = false226git = "https://github.com/paritytech/substrate"227branch = "polkadot-v0.9.30"228229[dependencies.hex-literal]230optional = true231version = '0.3.3'232233[dependencies.serde]234default-features = false235features = ['derive']236optional = true237version = '1.0.130'238239[dependencies.pallet-aura]240default-features = false241git = "https://github.com/paritytech/substrate"242branch = "polkadot-v0.9.30"243244[dependencies.pallet-collator-selection]245default-features = false246git = 'https://github.com/paritytech/cumulus'247branch = 'polkadot-v0.9.30'248249[dependencies.pallet-authorship]250default-features = false251git = 'https://github.com/paritytech/substrate'252branch = 'polkadot-v0.9.30'253254[dependencies.pallet-session]255default-features = false256git = 'https://github.com/paritytech/substrate'257branch = 'polkadot-v0.9.30'258259[dependencies.pallet-balances]260default-features = false261git = "https://github.com/paritytech/substrate"262branch = "polkadot-v0.9.30"263264# Contracts specific packages265# [dependencies.pallet-contracts]266# git = 'https://github.com/paritytech/substrate'267# default-features = false268# branch = 'master'269# version = '4.0.0-dev'270271# [dependencies.pallet-contracts-primitives]272# git = 'https://github.com/paritytech/substrate'273# default-features = false274# branch = 'master'275# version = '4.0.0-dev'276277# [dependencies.pallet-contracts-rpc-runtime-api]278# git = 'https://github.com/paritytech/substrate'279# default-features = false280# branch = 'master'281# version = '4.0.0-dev'282283[dependencies.pallet-randomness-collective-flip]284default-features = false285git = "https://github.com/paritytech/substrate"286branch = "polkadot-v0.9.30"287288[dependencies.pallet-sudo]289default-features = false290git = "https://github.com/paritytech/substrate"291branch = "polkadot-v0.9.30"292293[dependencies.pallet-timestamp]294default-features = false295git = "https://github.com/paritytech/substrate"296branch = "polkadot-v0.9.30"297298[dependencies.pallet-transaction-payment]299default-features = false300git = "https://github.com/paritytech/substrate"301branch = "polkadot-v0.9.30"302303[dependencies.pallet-transaction-payment-rpc-runtime-api]304default-features = false305git = "https://github.com/paritytech/substrate"306branch = "polkadot-v0.9.30"307308[dependencies.pallet-treasury]309default-features = false310git = "https://github.com/paritytech/substrate"311branch = "polkadot-v0.9.30"312313[dependencies.sp-arithmetic]314default-features = false315git = "https://github.com/paritytech/substrate"316branch = "polkadot-v0.9.30"317318[dependencies.sp-api]319default-features = false320git = "https://github.com/paritytech/substrate"321branch = "polkadot-v0.9.30"322323[dependencies.sp-block-builder]324default-features = false325git = "https://github.com/paritytech/substrate"326branch = "polkadot-v0.9.30"327328[dependencies.sp-core]329default-features = false330git = "https://github.com/paritytech/substrate"331branch = "polkadot-v0.9.30"332333[dependencies.sp-consensus-aura]334default-features = false335git = "https://github.com/paritytech/substrate"336branch = "polkadot-v0.9.30"337338[dependencies.sp-inherents]339default-features = false340git = "https://github.com/paritytech/substrate"341branch = "polkadot-v0.9.30"342343[dependencies.sp-io]344default-features = false345git = "https://github.com/paritytech/substrate"346branch = "polkadot-v0.9.30"347348[dependencies.sp-offchain]349default-features = false350git = "https://github.com/paritytech/substrate"351branch = "polkadot-v0.9.30"352353[dependencies.sp-runtime]354default-features = false355git = "https://github.com/paritytech/substrate"356branch = "polkadot-v0.9.30"357358[dependencies.sp-session]359default-features = false360git = "https://github.com/paritytech/substrate"361branch = "polkadot-v0.9.30"362363[dependencies.sp-std]364default-features = false365git = "https://github.com/paritytech/substrate"366branch = "polkadot-v0.9.30"367368[dependencies.sp-transaction-pool]369default-features = false370git = "https://github.com/paritytech/substrate"371branch = "polkadot-v0.9.30"372373[dependencies.sp-version]374default-features = false375git = "https://github.com/paritytech/substrate"376branch = "polkadot-v0.9.30"377378[dependencies.smallvec]379version = '1.6.1'380381################################################################################382# Cumulus dependencies383384[dependencies.parachain-info]385default-features = false386git = "https://github.com/paritytech/cumulus"387branch = "polkadot-v0.9.30"388389[dependencies.cumulus-pallet-aura-ext]390git = "https://github.com/paritytech/cumulus"391branch = "polkadot-v0.9.30"392default-features = false393394[dependencies.cumulus-pallet-parachain-system]395git = "https://github.com/paritytech/cumulus"396branch = "polkadot-v0.9.30"397default-features = false398399[dependencies.cumulus-primitives-core]400git = "https://github.com/paritytech/cumulus"401branch = "polkadot-v0.9.30"402default-features = false403404[dependencies.cumulus-pallet-xcm]405git = "https://github.com/paritytech/cumulus"406branch = "polkadot-v0.9.30"407default-features = false408409[dependencies.cumulus-pallet-dmp-queue]410git = "https://github.com/paritytech/cumulus"411branch = "polkadot-v0.9.30"412default-features = false413414[dependencies.cumulus-pallet-xcmp-queue]415git = "https://github.com/paritytech/cumulus"416branch = "polkadot-v0.9.30"417default-features = false418419[dependencies.cumulus-primitives-utility]420git = "https://github.com/paritytech/cumulus"421branch = "polkadot-v0.9.30"422default-features = false423424[dependencies.cumulus-primitives-timestamp]425git = "https://github.com/paritytech/cumulus"426branch = "polkadot-v0.9.30"427default-features = false428429################################################################################430# Polkadot dependencies431432[dependencies.polkadot-parachain]433git = "https://github.com/paritytech/polkadot"434branch = "release-v0.9.30"435default-features = false436437[dependencies.xcm]438git = "https://github.com/paritytech/polkadot"439branch = "release-v0.9.30"440default-features = false441442[dependencies.xcm-builder]443git = "https://github.com/paritytech/polkadot"444branch = "release-v0.9.30"445default-features = false446447[dependencies.xcm-executor]448git = "https://github.com/paritytech/polkadot"449branch = "release-v0.9.30"450default-features = false451452[dependencies.pallet-xcm]453git = "https://github.com/paritytech/polkadot"454branch = "release-v0.9.30"455default-features = false456457################################################################################458# local dependencies459460[dependencies]461orml-vesting.workspace = true462orml-xtokens.workspace = true463orml-tokens.workspace = true464orml-traits.workspace = true465466log = { version = "0.4.16", default-features = false }467up-common = { path = "../../primitives/common", default-features = false }468scale-info = { version = "2.0.1", default-features = false, features = [469    "derive",470] }471derivative = "2.2.0"472pallet-unique = { path = '../../pallets/unique', default-features = false }473up-rpc = { path = "../../primitives/rpc", default-features = false }474app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false }475rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }476pallet-inflation = { path = '../../pallets/inflation', default-features = false }477pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }478up-data-structs = { path = '../../primitives/data-structs', default-features = false }479pallet-configuration = { default-features = false, path = "../../pallets/configuration" }480pallet-common = { default-features = false, path = "../../pallets/common" }481pallet-structure = { default-features = false, path = "../../pallets/structure" }482pallet-fungible = { default-features = false, path = "../../pallets/fungible" }483pallet-refungible = { default-features = false, path = "../../pallets/refungible" }484pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }485pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }486pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }487pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }488# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }489pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.30", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }490pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }491pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }492pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }493pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }494pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }495pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }496pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }497fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }498fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }499fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }500evm-coder = { default-features = false, path = '../../crates/evm-coder' }501up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.30' }502pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }503504################################################################################505# Other Dependencies506507impl-trait-for-tuples = "0.2.2"508509################################################################################510# Dev Dependencies511512[dev-dependencies.logtest]513version = "2.0.0"514515################################################################################516# Build Dependencies517518[build-dependencies.substrate-wasm-builder]519git = "https://github.com/paritytech/substrate"520branch = "polkadot-v0.9.30"