difftreelog
feat(collator-selection) opal only
in: master
10 files changed
node/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());
primitives/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>*/;
runtime/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 = ();
+}
runtime/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;
runtime/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 = ();
}
runtime/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,
runtime/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()
+ }
}
}
runtime/opal/Cargo.tomldiffbeforeafterboth1################################################################################2# Package34cargo-features = ["workspace-inheritance"]56[package]7authors = ['Unique Network <support@uniquenetwork.io>']8build = 'build.rs'9description = 'Opal Runtime'10edition = '2021'11homepage = 'https://unique.network'12license = 'GPLv3'13name = 'opal-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', 'opal-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-foreign-assets/runtime-benchmarks',42 'pallet-unique/runtime-benchmarks',43 'pallet-inflation/runtime-benchmarks',44 'pallet-app-promotion/runtime-benchmarks',45 'pallet-unique-scheduler/runtime-benchmarks',46 'pallet-xcm/runtime-benchmarks',47 'sp-runtime/runtime-benchmarks',48 'xcm-builder/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-app-promotion/std',138 'pallet-common/std',139 'pallet-structure/std',140 'pallet-fungible/std',141 'pallet-refungible/std',142 'pallet-nonfungible/std',143 'pallet-proxy-rmrk-core/std',144 'pallet-proxy-rmrk-equip/std',145 'pallet-unique/std',146 'pallet-unique-scheduler/std',147 'pallet-charge-transaction/std',148 'up-data-structs/std',149 'sp-api/std',150 'sp-block-builder/std',151 "sp-consensus-aura/std",152 'sp-core/std',153 'sp-inherents/std',154 'sp-io/std',155 'sp-offchain/std',156 'sp-runtime/std',157 'sp-session/std',158 'sp-std/std',159 'sp-transaction-pool/std',160 'sp-version/std',161 'xcm/std',162 'xcm-builder/std',163 'xcm-executor/std',164 'up-common/std',165 'rmrk-rpc/std',166 'evm-coder/std',167 'up-sponsorship/std',168169 "orml-vesting/std",170 "orml-tokens/std",171 "orml-xtokens/std",172 "orml-traits/std",173 "pallet-foreign-assets/std",174]175limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']176opal-runtime = ['refungible', 'rmrk', 'app-promotion', 'foreign-assets']177178refungible = []179scheduler = []180rmrk = []181foreign-assets = []182app-promotion = []183184################################################################################185# Substrate Dependencies186187[dependencies.codec]188default-features = false189features = ['derive']190package = 'parity-scale-codec'191version = '3.1.2'192193[dependencies.frame-benchmarking]194default-features = false195git = "https://github.com/paritytech/substrate"196optional = true197branch = "polkadot-v0.9.30"198199[dependencies.frame-try-runtime]200default-features = false201git = "https://github.com/paritytech/substrate"202optional = true203branch = "polkadot-v0.9.30"204205[dependencies.frame-executive]206default-features = false207git = "https://github.com/paritytech/substrate"208branch = "polkadot-v0.9.30"209210[dependencies.frame-support]211default-features = false212git = "https://github.com/paritytech/substrate"213branch = "polkadot-v0.9.30"214215[dependencies.frame-system]216default-features = false217git = "https://github.com/paritytech/substrate"218branch = "polkadot-v0.9.30"219220[dependencies.frame-system-benchmarking]221default-features = false222git = "https://github.com/paritytech/substrate"223optional = true224branch = "polkadot-v0.9.30"225226[dependencies.frame-system-rpc-runtime-api]227default-features = false228git = "https://github.com/paritytech/substrate"229branch = "polkadot-v0.9.30"230231[dependencies.hex-literal]232optional = true233version = '0.3.3'234235[dependencies.serde]236default-features = false237features = ['derive']238optional = true239version = '1.0.130'240241[dependencies.pallet-aura]242default-features = false243git = "https://github.com/paritytech/substrate"244branch = "polkadot-v0.9.30"245246[dependencies.pallet-collator-selection]247default-features = false248git = 'https://github.com/paritytech/cumulus'249branch = 'polkadot-v0.9.30'250251[dependencies.pallet-authorship]252default-features = false253git = 'https://github.com/paritytech/substrate'254branch = 'polkadot-v0.9.30'255256[dependencies.pallet-session]257default-features = false258git = 'https://github.com/paritytech/substrate'259branch = 'polkadot-v0.9.30'260261[dependencies.pallet-balances]262default-features = false263git = "https://github.com/paritytech/substrate"264branch = "polkadot-v0.9.30"265266# Contracts specific packages267# [dependencies.pallet-contracts]268# git = 'https://github.com/paritytech/substrate'269# default-features = false270# branch = 'master'271# version = '4.0.0-dev'272273# [dependencies.pallet-contracts-primitives]274# git = 'https://github.com/paritytech/substrate'275# default-features = false276# branch = 'master'277# version = '4.0.0-dev'278279# [dependencies.pallet-contracts-rpc-runtime-api]280# git = 'https://github.com/paritytech/substrate'281# default-features = false282# branch = 'master'283# version = '4.0.0-dev'284285[dependencies.pallet-randomness-collective-flip]286default-features = false287git = "https://github.com/paritytech/substrate"288branch = "polkadot-v0.9.30"289290[dependencies.pallet-sudo]291default-features = false292git = "https://github.com/paritytech/substrate"293branch = "polkadot-v0.9.30"294295[dependencies.pallet-timestamp]296default-features = false297git = "https://github.com/paritytech/substrate"298branch = "polkadot-v0.9.30"299300[dependencies.pallet-transaction-payment]301default-features = false302git = "https://github.com/paritytech/substrate"303branch = "polkadot-v0.9.30"304305[dependencies.pallet-transaction-payment-rpc-runtime-api]306default-features = false307git = "https://github.com/paritytech/substrate"308branch = "polkadot-v0.9.30"309310[dependencies.pallet-treasury]311default-features = false312git = "https://github.com/paritytech/substrate"313branch = "polkadot-v0.9.30"314315[dependencies.sp-arithmetic]316default-features = false317git = "https://github.com/paritytech/substrate"318branch = "polkadot-v0.9.30"319320[dependencies.sp-api]321default-features = false322git = "https://github.com/paritytech/substrate"323branch = "polkadot-v0.9.30"324325[dependencies.sp-block-builder]326default-features = false327git = "https://github.com/paritytech/substrate"328branch = "polkadot-v0.9.30"329330[dependencies.sp-core]331default-features = false332git = "https://github.com/paritytech/substrate"333branch = "polkadot-v0.9.30"334335[dependencies.sp-consensus-aura]336default-features = false337git = "https://github.com/paritytech/substrate"338branch = "polkadot-v0.9.30"339340[dependencies.sp-inherents]341default-features = false342git = "https://github.com/paritytech/substrate"343branch = "polkadot-v0.9.30"344345[dependencies.sp-io]346default-features = false347git = "https://github.com/paritytech/substrate"348branch = "polkadot-v0.9.30"349350[dependencies.sp-offchain]351default-features = false352git = "https://github.com/paritytech/substrate"353branch = "polkadot-v0.9.30"354355[dependencies.sp-runtime]356default-features = false357git = "https://github.com/paritytech/substrate"358branch = "polkadot-v0.9.30"359360[dependencies.sp-session]361default-features = false362git = "https://github.com/paritytech/substrate"363branch = "polkadot-v0.9.30"364365[dependencies.sp-std]366default-features = false367git = "https://github.com/paritytech/substrate"368branch = "polkadot-v0.9.30"369370[dependencies.sp-transaction-pool]371default-features = false372git = "https://github.com/paritytech/substrate"373branch = "polkadot-v0.9.30"374375[dependencies.sp-version]376default-features = false377git = "https://github.com/paritytech/substrate"378branch = "polkadot-v0.9.30"379380[dependencies.smallvec]381version = '1.6.1'382383################################################################################384# Cumulus dependencies385386[dependencies.parachain-info]387default-features = false388git = "https://github.com/paritytech/cumulus"389branch = "polkadot-v0.9.30"390391[dependencies.cumulus-pallet-aura-ext]392git = "https://github.com/paritytech/cumulus"393branch = "polkadot-v0.9.30"394default-features = false395396[dependencies.cumulus-pallet-parachain-system]397git = "https://github.com/paritytech/cumulus"398branch = "polkadot-v0.9.30"399default-features = false400401[dependencies.cumulus-primitives-core]402git = "https://github.com/paritytech/cumulus"403branch = "polkadot-v0.9.30"404default-features = false405406[dependencies.cumulus-pallet-xcm]407git = "https://github.com/paritytech/cumulus"408branch = "polkadot-v0.9.30"409default-features = false410411[dependencies.cumulus-pallet-dmp-queue]412git = "https://github.com/paritytech/cumulus"413branch = "polkadot-v0.9.30"414default-features = false415416[dependencies.cumulus-pallet-xcmp-queue]417git = "https://github.com/paritytech/cumulus"418branch = "polkadot-v0.9.30"419default-features = false420421[dependencies.cumulus-primitives-utility]422git = "https://github.com/paritytech/cumulus"423branch = "polkadot-v0.9.30"424default-features = false425426[dependencies.cumulus-primitives-timestamp]427git = "https://github.com/paritytech/cumulus"428branch = "polkadot-v0.9.30"429default-features = false430431################################################################################432# Polkadot dependencies433434[dependencies.polkadot-parachain]435git = "https://github.com/paritytech/polkadot"436branch = "release-v0.9.30"437default-features = false438439[dependencies.xcm]440git = "https://github.com/paritytech/polkadot"441branch = "release-v0.9.30"442default-features = false443444[dependencies.xcm-builder]445git = "https://github.com/paritytech/polkadot"446branch = "release-v0.9.30"447default-features = false448449[dependencies.xcm-executor]450git = "https://github.com/paritytech/polkadot"451branch = "release-v0.9.30"452default-features = false453454[dependencies.pallet-xcm]455git = "https://github.com/paritytech/polkadot"456branch = "release-v0.9.30"457default-features = false458459################################################################################460# local dependencies461462[dependencies]463orml-vesting.workspace = true464orml-xtokens.workspace = true465orml-tokens.workspace = true466orml-traits.workspace = true467468log = { version = "0.4.16", default-features = false }469up-common = { path = "../../primitives/common", default-features = false }470scale-info = { version = "2.0.1", default-features = false, features = [471 "derive",472] }473derivative = "2.2.0"474pallet-unique = { path = '../../pallets/unique', default-features = false }475up-rpc = { path = "../../primitives/rpc", default-features = false }476app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false }477rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }478fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }479pallet-inflation = { path = '../../pallets/inflation', default-features = false }480pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }481up-data-structs = { path = '../../primitives/data-structs', default-features = false }482pallet-configuration = { default-features = false, path = "../../pallets/configuration" }483pallet-common = { default-features = false, path = "../../pallets/common" }484pallet-structure = { default-features = false, path = "../../pallets/structure" }485pallet-fungible = { default-features = false, path = "../../pallets/fungible" }486pallet-refungible = { default-features = false, path = "../../pallets/refungible" }487pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }488pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }489pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }490pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }491pallet-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" }492pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }493pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }494pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }495pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }496pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }497pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }498pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }499fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }500fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }501evm-coder = { default-features = false, path = '../../crates/evm-coder' }502up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.30' }503pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }504505################################################################################506# Other Dependencies507508impl-trait-for-tuples = "0.2.2"509510################################################################################511# Dev Dependencies512513[dev-dependencies.logtest]514version = "2.0.0"515516################################################################################517# Build Dependencies518519[build-dependencies.substrate-wasm-builder]520git = "https://github.com/paritytech/substrate"521branch = "polkadot-v0.9.30"runtime/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
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -178,6 +178,7 @@
scheduler = []
rmrk = []
foreign-assets = []
+collator-selection = []
################################################################################
# Substrate Dependencies