difftreelog
feat(configuration) benchmarks
in: master
15 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5846,6 +5846,7 @@
version = "0.1.2"
dependencies = [
"fp-evm",
+ "frame-benchmarking",
"frame-support",
"frame-system",
"parity-scale-codec 3.2.1",
Makefilediffbeforeafterboth--- a/Makefile
+++ b/Makefile
@@ -89,6 +89,10 @@
bench-evm-migration:
make _bench PALLET=evm-migration
+.PHONY: bench-configuration
+bench-configuration:
+ make _bench PALLET=configuration
+
.PHONY: bench-common
bench-common:
make _bench PALLET=common
@@ -143,4 +147,4 @@
.PHONY: bench
# Disabled: bench-scheduler, bench-rmrk-core, bench-rmrk-equip
-bench: bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-foreign-assets bench-collator-selection bench-identity
+bench: bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-configuration bench-foreign-assets bench-collator-selection bench-identity
pallets/collator-selection/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/collator-selection/src/benchmarking.rs
+++ b/pallets/collator-selection/src/benchmarking.rs
@@ -52,9 +52,6 @@
};
use sp_std::prelude::*;
-/*pub type BalanceOf<T> =
-<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance;*/
-
const SEED: u32 = 0;
// TODO: remove if this is given in substrate commit.
@@ -116,14 +113,24 @@
validators.into_iter().map(|(who, _)| who).collect()
}
+fn register_invulnerables<T: Config + configuration::Config>(count: u32) {
+ let candidates = (0..count)
+ .map(|c| account("candidate", c, SEED))
+ .collect::<Vec<_>>();
+
+ for who in candidates {
+ <CollatorSelection<T>>::add_invulnerable(T::UpdateOrigin::successful_origin(), who).unwrap();
+ }
+}
+
fn register_candidates<T: Config + configuration::Config>(count: u32) {
let candidates = (0..count)
.map(|c| account("candidate", c, SEED))
.collect::<Vec<_>>();
- assert!(
+ /*assert!(
<LicenseBond<T>>::get() > 0u32.into(),
"Bond cannot be zero!"
- );
+ );*/
for who in candidates {
T::Currency::make_free_balance_be(&who, <LicenseBond<T>>::get() * 2u32.into());
@@ -132,16 +139,45 @@
}
}
+fn get_licenses<T: Config + configuration::Config>(count: u32) {
+ let candidates = (0..count)
+ .map(|c| account("candidate", c, SEED))
+ .collect::<Vec<_>>();
+ /*assert!(
+ <LicenseBond<T>>::get() > 0u32.into(),
+ "Bond cannot be zero!"
+ );*/
+
+ for who in candidates {
+ T::Currency::make_free_balance_be(&who, <LicenseBond<T>>::get() * 2u32.into());
+ <CollatorSelection<T>>::get_license(RawOrigin::Signed(who.clone()).into()).unwrap();
+ }
+}
+
benchmarks! {
where_clause { where T: pallet_authorship::Config + session::Config + configuration::Config }
add_invulnerable {
- let b in 1 .. T::MaxCollators::get();
- let new_invulnerable = register_validators::<T>(b)[0].clone();
- let origin = T::UpdateOrigin::successful_origin();
+ let b in 1 .. T::MaxCollators::get() - 3;
+ register_validators::<T>(b);
+ register_invulnerables::<T>(b);
+
+ // log::info!("{} {}", <Invulnerables<T>>::get().len(), b);
+
+ let new_invulnerable: T::AccountId = whitelisted_caller();
+ let bond: BalanceOf<T> = T::Currency::minimum_balance() * 2u32.into();
+ T::Currency::make_free_balance_be(&new_invulnerable, bond.clone());
+
+ <session::Pallet<T>>::set_keys(
+ RawOrigin::Signed(new_invulnerable.clone()).into(),
+ keys::<T>(b + 1),
+ Vec::new()
+ ).unwrap();
+
+ let root_origin = T::UpdateOrigin::successful_origin();
}: {
assert_ok!(
- <CollatorSelection<T>>::add_invulnerable(origin, new_invulnerable.clone())
+ <CollatorSelection<T>>::add_invulnerable(root_origin, new_invulnerable.clone())
);
}
verify {
@@ -150,52 +186,28 @@
remove_invulnerable {
let b in 1 .. T::MaxCollators::get();
- let new_invulnerable = register_validators::<T>(b)[0].clone();
- let origin = T::UpdateOrigin::successful_origin();
- assert_ok!(
- <CollatorSelection<T>>::add_invulnerable(origin.clone(), new_invulnerable.clone())
- );
- }: {
- assert_ok!(
- <CollatorSelection<T>>::remove_invulnerable(origin, new_invulnerable.clone())
- );
- }
- verify {
- assert_last_event::<T>(Event::InvulnerableRemoved{invulnerable: new_invulnerable}.into());
- }
+ register_validators::<T>(b);
+ register_invulnerables::<T>(b);
- /*set_desired_collators {
- let max: u32 = 999;
- let origin = T::UpdateOrigin::successful_origin();
+ let root_origin = T::UpdateOrigin::successful_origin();
+ let leaving = <Invulnerables<T>>::get().last().unwrap().clone();
+ whitelist!(leaving);
}: {
assert_ok!(
- <CollatorSelection<T>>::set_desired_collators(origin, max.clone())
+ <CollatorSelection<T>>::remove_invulnerable(root_origin, leaving.clone())
);
}
verify {
- assert_last_event::<T>(Event::NewDesiredCollators{desired_collators: max}.into());
+ assert_last_event::<T>(Event::InvulnerableRemoved{invulnerable: leaving}.into());
}
- set_license_bond {
- let bond_amount: BalanceOf<T> = T::Currency::minimum_balance() * 10u32.into();
- let origin = T::UpdateOrigin::successful_origin();
- }: {
- assert_ok!(
- <CollatorSelection<T>>::set_license_bond(origin, bond_amount.clone())
- );
- }
- verify {
- assert_last_event::<T>(Event::NewLicenseBond{bond_amount}.into());
- }*/
-
get_license {
let c in 1 .. T::MaxCollators::get();
<LicenseBond<T>>::put(T::Currency::minimum_balance());
- <DesiredCollators<T>>::put(c + 1);
register_validators::<T>(c);
- register_candidates::<T>(c);
+ get_licenses::<T>(c);
let caller: T::AccountId = whitelisted_caller();
let bond: BalanceOf<T> = T::Currency::minimum_balance() * 2u32.into();
@@ -215,10 +227,10 @@
// worst case is when we have all the max-candidate slots filled except one, and we fill that
// one.
onboard {
- let c in 1 .. T::MaxCollators::get();
+ let c in 1 .. 5;
<LicenseBond<T>>::put(T::Currency::minimum_balance());
- <DesiredCollators<T>>::put(c + 1);
+ <DesiredCollators<T>>::put(c + 2);
register_validators::<T>(c);
register_candidates::<T>(c);
@@ -247,7 +259,7 @@
offboard {
let c in 1 .. T::MaxCollators::get();
<LicenseBond<T>>::put(T::Currency::minimum_balance());
- <DesiredCollators<T>>::put(c);
+ <DesiredCollators<T>>::put(c + 2);
register_validators::<T>(c);
register_candidates::<T>(c);
pallets/collator-selection/src/lib.rsdiffbeforeafterboth--- a/pallets/collator-selection/src/lib.rs
+++ b/pallets/collator-selection/src/lib.rs
@@ -285,7 +285,7 @@
impl<T: Config> Pallet<T> {
/// Add a collator to the list of invulnerable (fixed) collators.
#[pallet::call_index(0)]
- #[pallet::weight(T::WeightInfo::add_invulnerable(T::MaxCollators::get()))]
+ #[pallet::weight(<T as Config>::WeightInfo::add_invulnerable(T::MaxCollators::get()))]
pub fn add_invulnerable(
origin: OriginFor<T>,
new: T::AccountId,
@@ -315,7 +315,7 @@
/// Remove a collator from the list of invulnerable (fixed) collators.
#[pallet::call_index(1)]
- #[pallet::weight(T::WeightInfo::remove_invulnerable(T::MaxCollators::get()))]
+ #[pallet::weight(<T as Config>::WeightInfo::remove_invulnerable(T::MaxCollators::get()))]
pub fn remove_invulnerable(
origin: OriginFor<T>,
who: T::AccountId,
@@ -344,7 +344,7 @@
///
/// This call is not available to `Invulnerable` collators.
#[pallet::call_index(2)]
- #[pallet::weight(T::WeightInfo::get_license(T::MaxCollators::get()))]
+ #[pallet::weight(<T as Config>::WeightInfo::get_license(T::MaxCollators::get()))]
pub fn get_license(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
// register_as_candidate
let who = ensure_signed(origin)?;
@@ -377,7 +377,7 @@
///
/// This call is not available to `Invulnerable` collators.
#[pallet::call_index(3)]
- #[pallet::weight(T::WeightInfo::onboard(T::MaxCollators::get()))]
+ #[pallet::weight(<T as Config>::WeightInfo::onboard(T::MaxCollators::get()))]
pub fn onboard(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
// register_as_candidate
let who = ensure_signed(origin)?;
@@ -417,33 +417,36 @@
})?;
Self::deposit_event(Event::CandidateAdded { account_id: who });
- Ok(Some(T::WeightInfo::onboard(current_count as u32)).into())
+ Ok(Some(<T as Config>::WeightInfo::onboard(current_count as u32)).into())
}
/// Deregister `origin` as a collator candidate. Note that the collator can only leave on
/// session change. The license to `onboard` later at any other time will remain.
#[pallet::call_index(4)]
- #[pallet::weight(T::WeightInfo::offboard(T::MaxCollators::get()))]
+ #[pallet::weight(<T as Config>::WeightInfo::offboard(T::MaxCollators::get()))]
pub fn offboard(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
// leave_intent
let who = ensure_signed(origin)?;
let current_count = Self::try_remove_candidate(&who)?;
- Ok(Some(T::WeightInfo::offboard(current_count as u32)).into())
+ Ok(Some(<T as Config>::WeightInfo::offboard(current_count as u32)).into())
}
/// Forfeit `origin`'s own license. The `LicenseBond` will be unreserved immediately.
///
/// This call is not available to `Invulnerable` collators.
#[pallet::call_index(5)]
- #[pallet::weight(T::WeightInfo::release_license(T::MaxCollators::get()))]
+ #[pallet::weight(<T as Config>::WeightInfo::release_license(T::MaxCollators::get()))]
pub fn release_license(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
// leave_intent
let who = ensure_signed(origin)?;
let current_count = Self::try_remove_candidate_and_release_license(&who, false, true)?;
- Ok(Some(T::WeightInfo::release_license(current_count as u32)).into())
+ Ok(Some(<T as Config>::WeightInfo::release_license(
+ current_count as u32,
+ ))
+ .into())
}
/// Force deregister `origin` as a collator candidate as a governing authority, and revoke its license.
@@ -452,7 +455,7 @@
///
/// This call is, of course, not applicable to `Invulnerable` collators.
#[pallet::call_index(6)]
- #[pallet::weight(T::WeightInfo::force_release_license(T::MaxCollators::get()))]
+ #[pallet::weight(<T as Config>::WeightInfo::force_release_license(T::MaxCollators::get()))]
pub fn force_release_license(
origin: OriginFor<T>,
who: T::AccountId,
@@ -462,7 +465,10 @@
let current_count = Self::try_remove_candidate_and_release_license(&who, false, true)?;
- Ok(Some(T::WeightInfo::force_release_license(current_count as u32)).into())
+ Ok(Some(<T as Config>::WeightInfo::force_release_license(
+ current_count as u32,
+ ))
+ .into())
}
}
@@ -599,7 +605,7 @@
<LastAuthoredBlock<T>>::insert(author, frame_system::Pallet::<T>::block_number());
frame_system::Pallet::<T>::register_extra_weight_unchecked(
- T::WeightInfo::note_author(),
+ <T as Config>::WeightInfo::note_author(),
DispatchClass::Mandatory,
);
}
@@ -625,7 +631,10 @@
let result = Self::assemble_collators(active_candidates);
frame_system::Pallet::<T>::register_extra_weight_unchecked(
- T::WeightInfo::new_session(candidates_len_before as u32, removed as u32),
+ <T as Config>::WeightInfo::new_session(
+ candidates_len_before as u32,
+ removed as u32,
+ ),
DispatchClass::Mandatory,
);
Some(result)
pallets/collator-selection/src/mock.rsdiffbeforeafterboth--- a/pallets/collator-selection/src/mock.rs
+++ b/pallets/collator-selection/src/mock.rs
@@ -225,6 +225,7 @@
type MaxXcmAllowedLocations = MaxXcmAllowedLocations;
type AppPromotionDailyRate = AppPromotionDailyRate;
type DayRelayBlocks = DayRelayBlocks;
+ type WeightInfo = ();
}
ord_parameter_types! {
pallets/configuration/Cargo.tomldiffbeforeafterboth--- a/pallets/configuration/Cargo.toml
+++ b/pallets/configuration/Cargo.toml
@@ -12,6 +12,7 @@
] }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
+frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" }
@@ -22,10 +23,12 @@
[features]
default = ["std"]
+runtime-benchmarks = ["frame-benchmarking"]
std = [
"parity-scale-codec/std",
"frame-support/std",
"frame-system/std",
+ "frame-benchmarking/std",
"sp-runtime/std",
"sp-std/std",
"sp-core/std",
pallets/configuration/src/benchmarking.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/configuration/src/benchmarking.rs
@@ -0,0 +1,100 @@
+// 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/>.
+
+//! Benchmarking setup for pallet-configuration
+
+use super::*;
+use frame_benchmarking::benchmarks;
+use frame_system::{EventRecord, RawOrigin};
+use frame_support::{assert_ok, BoundedVec, traits::Currency};
+use xcm::v1::MultiLocation;
+
+fn assert_last_event<T: Config>(generic_event: <T as Config>::RuntimeEvent) {
+ let events = frame_system::Pallet::<T>::events();
+ let system_event: <T as frame_system::Config>::RuntimeEvent = generic_event.into();
+ // compare to the last event record
+ let EventRecord { event, .. } = &events[events.len() - 1];
+ assert_eq!(event, &system_event);
+}
+
+benchmarks! {
+ where_clause { where T: Config }
+
+ set_weight_to_fee_coefficient_override {
+ let coeff: u64 = 999;
+ }: {
+ assert_ok!(
+ <Pallet<T>>::set_weight_to_fee_coefficient_override(RawOrigin::Root.into(), Some(coeff))
+ );
+ }
+
+ set_min_gas_price_override {
+ let coeff: u64 = 999;
+ }: {
+ assert_ok!(
+ <Pallet<T>>::set_min_gas_price_override(RawOrigin::Root.into(), Some(coeff))
+ );
+ }
+
+ set_xcm_allowed_locations {
+ let locations: BoundedVec<MultiLocation, T::MaxXcmAllowedLocations> = Default::default();
+ }: {
+ assert_ok!(
+ <Pallet<T>>::set_xcm_allowed_locations(RawOrigin::Root.into(), Some(locations))
+ );
+ }
+
+ set_app_promotion_configuration_override {
+ let configuration: AppPromotionConfiguration<T::BlockNumber> = Default::default();
+ }: {
+ assert_ok!(
+ <Pallet<T>>::set_app_promotion_configuration_override(RawOrigin::Root.into(), configuration)
+ );
+ }
+
+ set_collator_selection_desired_collators {
+ let max: u32 = 999;
+ }: {
+ assert_ok!(
+ <Pallet<T>>::set_collator_selection_desired_collators(RawOrigin::Root.into(), Some(max.clone()))
+ );
+ }
+ verify {
+ assert_last_event::<T>(Event::NewDesiredCollators{desired_collators: Some(max)}.into());
+ }
+
+ set_collator_selection_license_bond {
+ let bond_cost: Option<BalanceOf<T>> = Some(T::Currency::minimum_balance() * 10u32.into());
+ }: {
+ assert_ok!(
+ <Pallet<T>>::set_collator_selection_license_bond(RawOrigin::Root.into(), bond_cost.clone())
+ );
+ }
+ verify {
+ assert_last_event::<T>(Event::NewCollatorLicenseBond{bond_cost}.into());
+ }
+
+ set_collator_selection_kick_threshold {
+ let threshold: Option<T::BlockNumber> = Some(900u32.into());
+ }: {
+ assert_ok!(
+ <Pallet<T>>::set_collator_selection_kick_threshold(RawOrigin::Root.into(), threshold.clone())
+ );
+ }
+ verify {
+ assert_last_event::<T>(Event::NewCollatorKickThreshold{length_in_blocks: threshold}.into());
+ }
+}
pallets/configuration/src/lib.rsdiffbeforeafterboth--- a/pallets/configuration/src/lib.rs
+++ b/pallets/configuration/src/lib.rs
@@ -34,6 +34,10 @@
pub use pallet::*;
use sp_core::U256;
+#[cfg(feature = "runtime-benchmarks")]
+mod benchmarking;
+pub mod weights;
+
#[pallet]
mod pallet {
use super::*;
@@ -45,6 +49,7 @@
use frame_system::{pallet_prelude::OriginFor, ensure_root, Config as SystemConfig};
use xcm::v1::MultiLocation;
+ pub use crate::weights::WeightInfo;
pub type BalanceOf<T> =
<<T as Config>::Currency as Currency<<T as SystemConfig>::AccountId>>::Balance;
@@ -74,6 +79,9 @@
type DefaultCollatorSelectionLicenseBond: Get<BalanceOf<Self>>;
#[pallet::constant]
type DefaultCollatorSelectionKickThreshold: Get<Self::BlockNumber>;
+
+ /// The weight information of this pallet.
+ type WeightInfo: WeightInfo;
}
#[pallet::event]
@@ -140,7 +148,7 @@
#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::call_index(0)]
- #[pallet::weight(T::DbWeight::get().writes(1))]
+ #[pallet::weight(T::WeightInfo::set_weight_to_fee_coefficient_override())]
pub fn set_weight_to_fee_coefficient_override(
origin: OriginFor<T>,
coeff: Option<u64>,
@@ -155,7 +163,7 @@
}
#[pallet::call_index(1)]
- #[pallet::weight(T::DbWeight::get().writes(1))]
+ #[pallet::weight(T::WeightInfo::set_min_gas_price_override())]
pub fn set_min_gas_price_override(
origin: OriginFor<T>,
coeff: Option<u64>,
@@ -170,7 +178,7 @@
}
#[pallet::call_index(2)]
- #[pallet::weight(T::DbWeight::get().writes(1))]
+ #[pallet::weight(T::WeightInfo::set_xcm_allowed_locations())]
pub fn set_xcm_allowed_locations(
origin: OriginFor<T>,
locations: Option<BoundedVec<MultiLocation, T::MaxXcmAllowedLocations>>,
@@ -181,7 +189,7 @@
}
#[pallet::call_index(3)]
- #[pallet::weight(T::DbWeight::get().writes(1))]
+ #[pallet::weight(T::WeightInfo::set_app_promotion_configuration_override())]
pub fn set_app_promotion_configuration_override(
origin: OriginFor<T>,
mut configuration: AppPromotionConfiguration<T::BlockNumber>,
@@ -202,7 +210,7 @@
}
#[pallet::call_index(4)]
- #[pallet::weight(T::DbWeight::get().writes(1))]
+ #[pallet::weight(T::WeightInfo::set_collator_selection_desired_collators())]
pub fn set_collator_selection_desired_collators(
origin: OriginFor<T>,
max: Option<u32>,
@@ -224,7 +232,7 @@
}
#[pallet::call_index(5)]
- #[pallet::weight(T::DbWeight::get().writes(1))]
+ #[pallet::weight(T::WeightInfo::set_collator_selection_license_bond())]
pub fn set_collator_selection_license_bond(
origin: OriginFor<T>,
amount: Option<BalanceOf<T>>,
@@ -240,7 +248,7 @@
}
#[pallet::call_index(6)]
- #[pallet::weight(T::DbWeight::get().writes(1))]
+ #[pallet::weight(T::WeightInfo::set_collator_selection_kick_threshold())]
pub fn set_collator_selection_kick_threshold(
origin: OriginFor<T>,
threshold: Option<T::BlockNumber>,
pallets/configuration/src/weights.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/configuration/src/weights.rs
@@ -0,0 +1,123 @@
+// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs
+
+//! Autogenerated weights for pallet_configuration
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2022-12-28, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
+
+// Executed Command:
+// target/release/unique-collator
+// benchmark
+// pallet
+// --pallet
+// pallet-configuration
+// --wasm-execution
+// compiled
+// --extrinsic
+// *
+// --template
+// .maintain/frame-weight-template.hbs
+// --steps=50
+// --repeat=80
+// --heap-pages=4096
+// --output=./pallets/configuration/src/weights.rs
+
+#![cfg_attr(rustfmt, rustfmt_skip)]
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+#![allow(missing_docs)]
+#![allow(clippy::unnecessary_cast)]
+
+use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
+use sp_std::marker::PhantomData;
+
+/// Weight functions needed for pallet_configuration.
+pub trait WeightInfo {
+ fn set_weight_to_fee_coefficient_override() -> Weight;
+ fn set_min_gas_price_override() -> Weight;
+ fn set_xcm_allowed_locations() -> Weight;
+ fn set_app_promotion_configuration_override() -> Weight;
+ fn set_collator_selection_desired_collators() -> Weight;
+ fn set_collator_selection_license_bond() -> Weight;
+ fn set_collator_selection_kick_threshold() -> Weight;
+}
+
+/// Weights for pallet_configuration using the Substrate node and recommended hardware.
+pub struct SubstrateWeight<T>(PhantomData<T>);
+impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
+ // Storage: Configuration WeightToFeeCoefficientOverride (r:0 w:1)
+ fn set_weight_to_fee_coefficient_override() -> Weight {
+ Weight::from_ref_time(5_691_000 as u64)
+ .saturating_add(T::DbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration MinGasPriceOverride (r:0 w:1)
+ fn set_min_gas_price_override() -> Weight {
+ Weight::from_ref_time(5_521_000 as u64)
+ .saturating_add(T::DbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration XcmAllowedLocationsOverride (r:0 w:1)
+ fn set_xcm_allowed_locations() -> Weight {
+ Weight::from_ref_time(6_091_000 as u64)
+ .saturating_add(T::DbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration AppPromomotionConfigurationOverride (r:0 w:1)
+ fn set_app_promotion_configuration_override() -> Weight {
+ Weight::from_ref_time(6_241_000 as u64)
+ .saturating_add(T::DbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration CollatorSelectionDesiredCollatorsOverride (r:0 w:1)
+ fn set_collator_selection_desired_collators() -> Weight {
+ Weight::from_ref_time(25_298_000 as u64)
+ .saturating_add(T::DbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration CollatorSelectionLicenseBondOverride (r:0 w:1)
+ fn set_collator_selection_license_bond() -> Weight {
+ Weight::from_ref_time(18_675_000 as u64)
+ .saturating_add(T::DbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration CollatorSelectionKickThresholdOverride (r:0 w:1)
+ fn set_collator_selection_kick_threshold() -> Weight {
+ Weight::from_ref_time(18_044_000 as u64)
+ .saturating_add(T::DbWeight::get().writes(1 as u64))
+ }
+}
+
+// For backwards compatibility and tests
+impl WeightInfo for () {
+ // Storage: Configuration WeightToFeeCoefficientOverride (r:0 w:1)
+ fn set_weight_to_fee_coefficient_override() -> Weight {
+ Weight::from_ref_time(5_691_000 as u64)
+ .saturating_add(RocksDbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration MinGasPriceOverride (r:0 w:1)
+ fn set_min_gas_price_override() -> Weight {
+ Weight::from_ref_time(5_521_000 as u64)
+ .saturating_add(RocksDbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration XcmAllowedLocationsOverride (r:0 w:1)
+ fn set_xcm_allowed_locations() -> Weight {
+ Weight::from_ref_time(6_091_000 as u64)
+ .saturating_add(RocksDbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration AppPromomotionConfigurationOverride (r:0 w:1)
+ fn set_app_promotion_configuration_override() -> Weight {
+ Weight::from_ref_time(6_241_000 as u64)
+ .saturating_add(RocksDbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration CollatorSelectionDesiredCollatorsOverride (r:0 w:1)
+ fn set_collator_selection_desired_collators() -> Weight {
+ Weight::from_ref_time(25_298_000 as u64)
+ .saturating_add(RocksDbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration CollatorSelectionLicenseBondOverride (r:0 w:1)
+ fn set_collator_selection_license_bond() -> Weight {
+ Weight::from_ref_time(18_675_000 as u64)
+ .saturating_add(RocksDbWeight::get().writes(1 as u64))
+ }
+ // Storage: Configuration CollatorSelectionKickThresholdOverride (r:0 w:1)
+ fn set_collator_selection_kick_threshold() -> Weight {
+ Weight::from_ref_time(18_044_000 as u64)
+ .saturating_add(RocksDbWeight::get().writes(1 as u64))
+ }
+}
runtime/common/config/pallets/mod.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -121,6 +121,7 @@
type MaxXcmAllowedLocations = ConstU32<16>;
type AppPromotionDailyRate = AppPromotionDailyRate;
type DayRelayBlocks = DayRelayBlocks;
+ type WeightInfo = pallet_configuration::weights::SubstrateWeight<Self>;
}
impl pallet_maintenance::Config for Runtime {
runtime/common/construct_runtime/mod.rsdiffbeforeafterboth--- a/runtime/common/construct_runtime/mod.rs
+++ b/runtime/common/construct_runtime/mod.rs
@@ -32,17 +32,17 @@
ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,
- Aura: pallet_aura::{Pallet, Config<T>} = 22,
- AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 23,
+ #[runtimes(opal)]
+ Authorship: pallet_authorship::{Pallet, Call, Storage} = 22,
#[runtimes(opal)]
- Authorship: pallet_authorship::{Pallet, Call, Storage} = 24,
+ CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 23,
#[runtimes(opal)]
- CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 25,
+ Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 24,
- #[runtimes(opal)]
- Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 26,
+ Aura: pallet_aura::{Pallet, Config<T>} = 25,
+ AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 26,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,
runtime/common/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -686,6 +686,7 @@
list_benchmark!(list, extra, pallet_unique, Unique);
list_benchmark!(list, extra, pallet_structure, Structure);
list_benchmark!(list, extra, pallet_inflation, Inflation);
+ list_benchmark!(list, extra, pallet_configuration, Configuration);
#[cfg(feature = "app-promotion")]
list_benchmark!(list, extra, pallet_app_promotion, AppPromotion);
@@ -755,6 +756,7 @@
add_benchmark!(params, batches, pallet_unique, Unique);
add_benchmark!(params, batches, pallet_structure, Structure);
add_benchmark!(params, batches, pallet_inflation, Inflation);
+ add_benchmark!(params, batches, pallet_configuration, Configuration);
#[cfg(feature = "app-promotion")]
add_benchmark!(params, batches, pallet_app_promotion, AppPromotion);
runtime/opal/Cargo.tomldiffbeforeafterboth1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version.workspace = true1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'opal-runtime']20runtime-benchmarks = [21 'hex-literal',22 'frame-benchmarking',23 'frame-support/runtime-benchmarks',24 'frame-system-benchmarking',25 'frame-system/runtime-benchmarks',26 'pallet-ethereum/runtime-benchmarks',27 'pallet-evm-migration/runtime-benchmarks',28 'pallet-evm-coder-substrate/runtime-benchmarks',29 'pallet-balances/runtime-benchmarks',30 'pallet-timestamp/runtime-benchmarks',31 'pallet-common/runtime-benchmarks',32 'pallet-structure/runtime-benchmarks',33 'pallet-fungible/runtime-benchmarks',34 'pallet-refungible/runtime-benchmarks',35 'pallet-nonfungible/runtime-benchmarks',36 'pallet-proxy-rmrk-core/runtime-benchmarks',37 'pallet-proxy-rmrk-equip/runtime-benchmarks',38 'pallet-foreign-assets/runtime-benchmarks',39 'pallet-unique/runtime-benchmarks',40 'pallet-inflation/runtime-benchmarks',41 'pallet-app-promotion/runtime-benchmarks',42 'pallet-collator-selection/runtime-benchmarks',43 'pallet-identity/runtime-benchmarks',44 'pallet-unique-scheduler-v2/runtime-benchmarks',45 'pallet-xcm/runtime-benchmarks',46 'sp-runtime/runtime-benchmarks',47 'xcm-builder/runtime-benchmarks',48 'pallet-maintenance/runtime-benchmarks',49 'cumulus-pallet-parachain-system/runtime-benchmarks'50]51try-runtime = [52 'frame-try-runtime',53 'frame-try-runtime?/try-runtime',54 'frame-executive/try-runtime',55 'frame-support/try-runtime',56 'frame-system/try-runtime',57 'cumulus-pallet-parachain-system/try-runtime',58 'parachain-info/try-runtime',59 'pallet-aura/try-runtime',60 'cumulus-pallet-aura-ext/try-runtime',61 'pallet-balances/try-runtime',62 'pallet-randomness-collective-flip/try-runtime',63 'pallet-timestamp/try-runtime',64 'pallet-transaction-payment/try-runtime',65 'pallet-treasury/try-runtime',66 'pallet-sudo/try-runtime',67 'orml-vesting/try-runtime',68 'orml-xtokens/try-runtime',69 'orml-tokens/try-runtime',70 'cumulus-pallet-xcmp-queue/try-runtime',71 'pallet-xcm/try-runtime',72 'cumulus-pallet-xcm/try-runtime',73 'cumulus-pallet-dmp-queue/try-runtime',74 "pallet-authorship/try-runtime",75 "pallet-collator-selection/try-runtime",76 "pallet-session/try-runtime",77 "pallet-identity/try-runtime",78 'pallet-inflation/try-runtime',79 'pallet-unique/try-runtime',80 'pallet-configuration/try-runtime',81 'pallet-charge-transaction/try-runtime',82 'pallet-common/try-runtime',83 'pallet-fungible/try-runtime',84 'pallet-refungible/try-runtime',85 'pallet-nonfungible/try-runtime',86 'pallet-structure/try-runtime',87 'pallet-proxy-rmrk-core/try-runtime',88 'pallet-proxy-rmrk-equip/try-runtime',89 'pallet-app-promotion/try-runtime',90 'pallet-foreign-assets/try-runtime',91 'pallet-ethereum/try-runtime',92 'pallet-evm/try-runtime',93 'pallet-evm-coder-substrate/try-runtime',94 'pallet-evm-contract-helpers/try-runtime',95 'pallet-evm-transaction-payment/try-runtime',96 'pallet-evm-migration/try-runtime',97 'pallet-base-fee/try-runtime',98 'pallet-unique-scheduler-v2/try-runtime',99 'pallet-maintenance/try-runtime',100 'pallet-test-utils?/try-runtime',101 'fp-self-contained/try-runtime',102]103std = [104 'codec/std',105 'cumulus-pallet-aura-ext/std',106 'cumulus-pallet-parachain-system/std',107 'cumulus-pallet-xcm/std',108 'cumulus-pallet-xcmp-queue/std',109 'cumulus-primitives-core/std',110 'cumulus-primitives-utility/std',111 'frame-try-runtime/std',112 'frame-executive/std',113 'frame-support/std',114 'frame-system/std',115 'frame-system-rpc-runtime-api/std',116 'pallet-aura/std',117 'pallet-balances/std',118 # 'pallet-contracts/std',119 # 'pallet-contracts-primitives/std',120 # 'pallet-contracts-rpc-runtime-api/std',121 # 'pallet-contract-helpers/std',122 "pallet-authorship/std",123 'pallet-collator-selection/std',124 "pallet-session/std",125 'pallet-identity/std',126 'pallet-randomness-collective-flip/std',127 'pallet-sudo/std',128 'pallet-timestamp/std',129 'pallet-transaction-payment/std',130 'pallet-transaction-payment-rpc-runtime-api/std',131 'pallet-treasury/std',132 'pallet-evm/std',133 'pallet-evm-migration/std',134 'pallet-evm-contract-helpers/std',135 'pallet-evm-transaction-payment/std',136 'pallet-evm-coder-substrate/std',137 'pallet-ethereum/std',138 'pallet-base-fee/std',139 'fp-rpc/std',140 'up-rpc/std',141 'up-pov-estimate-rpc/std',142 'app-promotion-rpc/std',143 'fp-evm-mapping/std',144 'fp-self-contained/std',145 'parachain-info/std',146 'serde',147 'pallet-inflation/std',148 'pallet-configuration/std',149 'pallet-app-promotion/std',150 'pallet-common/std',151 'pallet-structure/std',152 'pallet-fungible/std',153 'pallet-refungible/std',154 'pallet-nonfungible/std',155 'pallet-proxy-rmrk-core/std',156 'pallet-proxy-rmrk-equip/std',157 'pallet-unique/std',158 'pallet-unique-scheduler-v2/std',159 'pallet-charge-transaction/std',160 'up-data-structs/std',161 'sp-api/std',162 'sp-block-builder/std',163 "sp-consensus-aura/std",164 'sp-core/std',165 'sp-inherents/std',166 'sp-io/std',167 'sp-offchain/std',168 'sp-runtime/std',169 'sp-session/std',170 'sp-std/std',171 'sp-transaction-pool/std',172 'sp-version/std',173 'xcm/std',174 'xcm-builder/std',175 'xcm-executor/std',176 'up-common/std',177 'rmrk-rpc/std',178 'evm-coder/std',179 'up-sponsorship/std',180181 "orml-vesting/std",182 "orml-tokens/std",183 "orml-xtokens/std",184 "orml-traits/std",185 "pallet-foreign-assets/std",186187 'pallet-maintenance/std',188 'pallet-test-utils?/std',189]190limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']191opal-runtime = [192 'refungible',193 'rmrk',194 'app-promotion',195 'collator-selection',196 'foreign-assets',197 'pallet-test-utils',198]199become-sapphire = []200pov-estimate = []201202refungible = []203scheduler = []204rmrk = []205foreign-assets = []206app-promotion = []207collator-selection = []208209################################################################################210# Substrate Dependencies211212[dependencies.codec]213default-features = false214features = ['derive']215package = 'parity-scale-codec'216version = '3.1.2'217218[dependencies.frame-benchmarking]219default-features = false220git = "https://github.com/paritytech/substrate"221optional = true222branch = "polkadot-v0.9.36"223224[dependencies.frame-try-runtime]225default-features = false226git = "https://github.com/paritytech/substrate"227optional = true228branch = "polkadot-v0.9.36"229230[dependencies.frame-executive]231default-features = false232git = "https://github.com/paritytech/substrate"233branch = "polkadot-v0.9.36"234235[dependencies.frame-support]236default-features = false237git = "https://github.com/paritytech/substrate"238branch = "polkadot-v0.9.36"239240[dependencies.frame-system]241default-features = false242git = "https://github.com/paritytech/substrate"243branch = "polkadot-v0.9.36"244245[dependencies.frame-system-benchmarking]246default-features = false247git = "https://github.com/paritytech/substrate"248optional = true249branch = "polkadot-v0.9.36"250251[dependencies.frame-system-rpc-runtime-api]252default-features = false253git = "https://github.com/paritytech/substrate"254branch = "polkadot-v0.9.36"255256[dependencies.hex-literal]257optional = true258version = '0.3.3'259260[dependencies.serde]261default-features = false262features = ['derive']263optional = true264version = '1.0.130'265266[dependencies.pallet-aura]267default-features = false268git = "https://github.com/paritytech/substrate"269branch = "polkadot-v0.9.36"270271[dependencies.pallet-authorship]272default-features = false273git = 'https://github.com/paritytech/substrate'274branch = 'polkadot-v0.9.36'275276[dependencies.pallet-session]277default-features = false278git = 'https://github.com/paritytech/substrate'279branch = 'polkadot-v0.9.36'280281[dependencies.pallet-balances]282default-features = false283git = "https://github.com/paritytech/substrate"284branch = "polkadot-v0.9.36"285286# Contracts specific packages287# [dependencies.pallet-contracts]288# git = 'https://github.com/paritytech/substrate'289# default-features = false290# branch = 'master'291# version = '4.0.0-dev'292293# [dependencies.pallet-contracts-primitives]294# git = 'https://github.com/paritytech/substrate'295# default-features = false296# branch = 'master'297# version = '4.0.0-dev'298299# [dependencies.pallet-contracts-rpc-runtime-api]300# git = 'https://github.com/paritytech/substrate'301# default-features = false302# branch = 'master'303# version = '4.0.0-dev'304305[dependencies.pallet-randomness-collective-flip]306default-features = false307git = "https://github.com/paritytech/substrate"308branch = "polkadot-v0.9.36"309310[dependencies.pallet-sudo]311default-features = false312git = "https://github.com/paritytech/substrate"313branch = "polkadot-v0.9.36"314315[dependencies.pallet-timestamp]316default-features = false317git = "https://github.com/paritytech/substrate"318branch = "polkadot-v0.9.36"319320[dependencies.pallet-transaction-payment]321default-features = false322git = "https://github.com/paritytech/substrate"323branch = "polkadot-v0.9.36"324325[dependencies.pallet-transaction-payment-rpc-runtime-api]326default-features = false327git = "https://github.com/paritytech/substrate"328branch = "polkadot-v0.9.36"329330[dependencies.pallet-treasury]331default-features = false332git = "https://github.com/paritytech/substrate"333branch = "polkadot-v0.9.36"334335[dependencies.sp-arithmetic]336default-features = false337git = "https://github.com/paritytech/substrate"338branch = "polkadot-v0.9.36"339340[dependencies.sp-api]341default-features = false342git = "https://github.com/paritytech/substrate"343branch = "polkadot-v0.9.36"344345[dependencies.sp-block-builder]346default-features = false347git = "https://github.com/paritytech/substrate"348branch = "polkadot-v0.9.36"349350[dependencies.sp-core]351default-features = false352git = "https://github.com/paritytech/substrate"353branch = "polkadot-v0.9.36"354355[dependencies.sp-consensus-aura]356default-features = false357git = "https://github.com/paritytech/substrate"358branch = "polkadot-v0.9.36"359360[dependencies.sp-inherents]361default-features = false362git = "https://github.com/paritytech/substrate"363branch = "polkadot-v0.9.36"364365[dependencies.sp-io]366default-features = false367git = "https://github.com/paritytech/substrate"368branch = "polkadot-v0.9.36"369370[dependencies.sp-offchain]371default-features = false372git = "https://github.com/paritytech/substrate"373branch = "polkadot-v0.9.36"374375[dependencies.sp-runtime]376default-features = false377git = "https://github.com/paritytech/substrate"378branch = "polkadot-v0.9.36"379380[dependencies.sp-session]381default-features = false382git = "https://github.com/paritytech/substrate"383branch = "polkadot-v0.9.36"384385[dependencies.sp-std]386default-features = false387git = "https://github.com/paritytech/substrate"388branch = "polkadot-v0.9.36"389390[dependencies.sp-transaction-pool]391default-features = false392git = "https://github.com/paritytech/substrate"393branch = "polkadot-v0.9.36"394395[dependencies.sp-version]396default-features = false397git = "https://github.com/paritytech/substrate"398branch = "polkadot-v0.9.36"399400[dependencies.smallvec]401version = '1.6.1'402403################################################################################404# Cumulus dependencies405406[dependencies.parachain-info]407default-features = false408git = "https://github.com/paritytech/cumulus"409branch = "polkadot-v0.9.36"410411[dependencies.cumulus-pallet-aura-ext]412git = "https://github.com/paritytech/cumulus"413branch = "polkadot-v0.9.36"414default-features = false415416[dependencies.cumulus-pallet-parachain-system]417git = "https://github.com/paritytech/cumulus"418branch = "polkadot-v0.9.36"419default-features = false420421[dependencies.cumulus-primitives-core]422git = "https://github.com/paritytech/cumulus"423branch = "polkadot-v0.9.36"424default-features = false425426[dependencies.cumulus-pallet-xcm]427git = "https://github.com/paritytech/cumulus"428branch = "polkadot-v0.9.36"429default-features = false430431[dependencies.cumulus-pallet-dmp-queue]432git = "https://github.com/paritytech/cumulus"433branch = "polkadot-v0.9.36"434default-features = false435436[dependencies.cumulus-pallet-xcmp-queue]437git = "https://github.com/paritytech/cumulus"438branch = "polkadot-v0.9.36"439default-features = false440441[dependencies.cumulus-primitives-utility]442git = "https://github.com/paritytech/cumulus"443branch = "polkadot-v0.9.36"444default-features = false445446[dependencies.cumulus-primitives-timestamp]447git = "https://github.com/paritytech/cumulus"448branch = "polkadot-v0.9.36"449default-features = false450451################################################################################452# Polkadot dependencies453454[dependencies.polkadot-parachain]455git = "https://github.com/paritytech/polkadot"456branch = "release-v0.9.36"457default-features = false458459[dependencies.xcm]460git = "https://github.com/paritytech/polkadot"461branch = "release-v0.9.36"462default-features = false463464[dependencies.xcm-builder]465git = "https://github.com/paritytech/polkadot"466branch = "release-v0.9.36"467default-features = false468469[dependencies.xcm-executor]470git = "https://github.com/paritytech/polkadot"471branch = "release-v0.9.36"472default-features = false473474[dependencies.pallet-xcm]475git = "https://github.com/paritytech/polkadot"476branch = "release-v0.9.36"477default-features = false478479################################################################################480# local dependencies481482[dependencies]483orml-vesting.workspace = true484orml-xtokens.workspace = true485orml-tokens.workspace = true486orml-traits.workspace = true487488log = { version = "0.4.16", default-features = false }489up-common = { path = "../../primitives/common", default-features = false }490scale-info = { version = "2.0.1", default-features = false, features = [491 "derive",492] }493derivative = "2.2.0"494pallet-unique = { path = '../../pallets/unique', default-features = false }495up-rpc = { path = "../../primitives/rpc", default-features = false }496up-pov-estimate-rpc = { path = "../../primitives/pov-estimate-rpc", default-features = false }497app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false }498rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }499fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }500fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }501pallet-inflation = { path = '../../pallets/inflation', default-features = false }502pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }503up-data-structs = { path = '../../primitives/data-structs', default-features = false }504pallet-collator-selection = { default-features = false, path = "../../pallets/collator-selection" }505pallet-identity = { default-features = false, path = "../../pallets/identity" }506pallet-configuration = { default-features = false, path = "../../pallets/configuration" }507pallet-common = { default-features = false, path = "../../pallets/common" }508pallet-structure = { default-features = false, path = "../../pallets/structure" }509pallet-fungible = { default-features = false, path = "../../pallets/fungible" }510pallet-refungible = { default-features = false, path = "../../pallets/refungible" }511pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }512pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }513pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }514pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.36", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }515pallet-unique-scheduler-v2 = { path = '../../pallets/scheduler-v2', default-features = false }516pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }517pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }518pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }519pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }520pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }521pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }522pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }523fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }524fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }525pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }526evm-coder = { default-features = false, path = '../../crates/evm-coder' }527up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.36' }528pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }529pallet-maintenance = { default-features = false, path = "../../pallets/maintenance" }530precompile-utils-macro = { path = "../common/ethereum/precompiles/utils/macro" }531num_enum = { version = "0.5.3", default-features = false }532533################################################################################534# Test dependencies535536pallet-test-utils = { optional = true, default-features = false, path = "../../test-pallets/utils" }537538################################################################################539# Other Dependencies540541impl-trait-for-tuples = "0.2.2"542543################################################################################544# Dev Dependencies545546[dev-dependencies.logtest]547version = "2.0.0"548549################################################################################550# Build Dependencies551552[build-dependencies.substrate-wasm-builder]553git = "https://github.com/paritytech/substrate"554branch = "polkadot-v0.9.36"1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version.workspace = true1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'opal-runtime']20runtime-benchmarks = [21 'hex-literal',22 'frame-benchmarking',23 'frame-support/runtime-benchmarks',24 'frame-system-benchmarking',25 'frame-system/runtime-benchmarks',26 'pallet-ethereum/runtime-benchmarks',27 'pallet-evm-migration/runtime-benchmarks',28 'pallet-evm-coder-substrate/runtime-benchmarks',29 'pallet-balances/runtime-benchmarks',30 'pallet-timestamp/runtime-benchmarks',31 'pallet-configuration/runtime-benchmarks',32 'pallet-common/runtime-benchmarks',33 'pallet-structure/runtime-benchmarks',34 'pallet-fungible/runtime-benchmarks',35 'pallet-refungible/runtime-benchmarks',36 'pallet-nonfungible/runtime-benchmarks',37 'pallet-proxy-rmrk-core/runtime-benchmarks',38 'pallet-proxy-rmrk-equip/runtime-benchmarks',39 'pallet-foreign-assets/runtime-benchmarks',40 'pallet-unique/runtime-benchmarks',41 'pallet-inflation/runtime-benchmarks',42 'pallet-app-promotion/runtime-benchmarks',43 'pallet-collator-selection/runtime-benchmarks',44 'pallet-identity/runtime-benchmarks',45 'pallet-unique-scheduler-v2/runtime-benchmarks',46 'pallet-xcm/runtime-benchmarks',47 'sp-runtime/runtime-benchmarks',48 'xcm-builder/runtime-benchmarks',49 'pallet-maintenance/runtime-benchmarks',50 'cumulus-pallet-parachain-system/runtime-benchmarks'51]52try-runtime = [53 'frame-try-runtime',54 'frame-try-runtime?/try-runtime',55 'frame-executive/try-runtime',56 'frame-support/try-runtime',57 'frame-system/try-runtime',58 'cumulus-pallet-parachain-system/try-runtime',59 'parachain-info/try-runtime',60 'pallet-aura/try-runtime',61 'cumulus-pallet-aura-ext/try-runtime',62 'pallet-balances/try-runtime',63 'pallet-randomness-collective-flip/try-runtime',64 'pallet-timestamp/try-runtime',65 'pallet-transaction-payment/try-runtime',66 'pallet-treasury/try-runtime',67 'pallet-sudo/try-runtime',68 'orml-vesting/try-runtime',69 'orml-xtokens/try-runtime',70 'orml-tokens/try-runtime',71 'cumulus-pallet-xcmp-queue/try-runtime',72 'pallet-xcm/try-runtime',73 'cumulus-pallet-xcm/try-runtime',74 'cumulus-pallet-dmp-queue/try-runtime',75 "pallet-authorship/try-runtime",76 "pallet-collator-selection/try-runtime",77 "pallet-session/try-runtime",78 "pallet-identity/try-runtime",79 'pallet-inflation/try-runtime',80 'pallet-unique/try-runtime',81 'pallet-configuration/try-runtime',82 'pallet-charge-transaction/try-runtime',83 'pallet-common/try-runtime',84 'pallet-fungible/try-runtime',85 'pallet-refungible/try-runtime',86 'pallet-nonfungible/try-runtime',87 'pallet-structure/try-runtime',88 'pallet-proxy-rmrk-core/try-runtime',89 'pallet-proxy-rmrk-equip/try-runtime',90 'pallet-app-promotion/try-runtime',91 'pallet-foreign-assets/try-runtime',92 'pallet-ethereum/try-runtime',93 'pallet-evm/try-runtime',94 'pallet-evm-coder-substrate/try-runtime',95 'pallet-evm-contract-helpers/try-runtime',96 'pallet-evm-transaction-payment/try-runtime',97 'pallet-evm-migration/try-runtime',98 'pallet-base-fee/try-runtime',99 'pallet-unique-scheduler-v2/try-runtime',100 'pallet-maintenance/try-runtime',101 'pallet-test-utils?/try-runtime',102 'fp-self-contained/try-runtime',103]104std = [105 'codec/std',106 'cumulus-pallet-aura-ext/std',107 'cumulus-pallet-parachain-system/std',108 'cumulus-pallet-xcm/std',109 'cumulus-pallet-xcmp-queue/std',110 'cumulus-primitives-core/std',111 'cumulus-primitives-utility/std',112 'frame-try-runtime/std',113 'frame-executive/std',114 'frame-support/std',115 'frame-system/std',116 'frame-system-rpc-runtime-api/std',117 'pallet-aura/std',118 'pallet-balances/std',119 # 'pallet-contracts/std',120 # 'pallet-contracts-primitives/std',121 # 'pallet-contracts-rpc-runtime-api/std',122 # 'pallet-contract-helpers/std',123 "pallet-authorship/std",124 'pallet-collator-selection/std',125 "pallet-session/std",126 'pallet-identity/std',127 'pallet-randomness-collective-flip/std',128 'pallet-sudo/std',129 'pallet-timestamp/std',130 'pallet-transaction-payment/std',131 'pallet-transaction-payment-rpc-runtime-api/std',132 'pallet-treasury/std',133 'pallet-evm/std',134 'pallet-evm-migration/std',135 'pallet-evm-contract-helpers/std',136 'pallet-evm-transaction-payment/std',137 'pallet-evm-coder-substrate/std',138 'pallet-ethereum/std',139 'pallet-base-fee/std',140 'fp-rpc/std',141 'up-rpc/std',142 'up-pov-estimate-rpc/std',143 'app-promotion-rpc/std',144 'fp-evm-mapping/std',145 'fp-self-contained/std',146 'parachain-info/std',147 'serde',148 'pallet-inflation/std',149 'pallet-configuration/std',150 'pallet-app-promotion/std',151 'pallet-common/std',152 'pallet-structure/std',153 'pallet-fungible/std',154 'pallet-refungible/std',155 'pallet-nonfungible/std',156 'pallet-proxy-rmrk-core/std',157 'pallet-proxy-rmrk-equip/std',158 'pallet-unique/std',159 'pallet-unique-scheduler-v2/std',160 'pallet-charge-transaction/std',161 'up-data-structs/std',162 'sp-api/std',163 'sp-block-builder/std',164 "sp-consensus-aura/std",165 'sp-core/std',166 'sp-inherents/std',167 'sp-io/std',168 'sp-offchain/std',169 'sp-runtime/std',170 'sp-session/std',171 'sp-std/std',172 'sp-transaction-pool/std',173 'sp-version/std',174 'xcm/std',175 'xcm-builder/std',176 'xcm-executor/std',177 'up-common/std',178 'rmrk-rpc/std',179 'evm-coder/std',180 'up-sponsorship/std',181182 "orml-vesting/std",183 "orml-tokens/std",184 "orml-xtokens/std",185 "orml-traits/std",186 "pallet-foreign-assets/std",187188 'pallet-maintenance/std',189 'pallet-test-utils?/std',190]191limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']192opal-runtime = [193 'refungible',194 'rmrk',195 'app-promotion',196 'collator-selection',197 'foreign-assets',198 'pallet-test-utils',199]200become-sapphire = []201pov-estimate = []202203refungible = []204scheduler = []205rmrk = []206foreign-assets = []207app-promotion = []208collator-selection = []209210################################################################################211# Substrate Dependencies212213[dependencies.codec]214default-features = false215features = ['derive']216package = 'parity-scale-codec'217version = '3.1.2'218219[dependencies.frame-benchmarking]220default-features = false221git = "https://github.com/paritytech/substrate"222optional = true223branch = "polkadot-v0.9.36"224225[dependencies.frame-try-runtime]226default-features = false227git = "https://github.com/paritytech/substrate"228optional = true229branch = "polkadot-v0.9.36"230231[dependencies.frame-executive]232default-features = false233git = "https://github.com/paritytech/substrate"234branch = "polkadot-v0.9.36"235236[dependencies.frame-support]237default-features = false238git = "https://github.com/paritytech/substrate"239branch = "polkadot-v0.9.36"240241[dependencies.frame-system]242default-features = false243git = "https://github.com/paritytech/substrate"244branch = "polkadot-v0.9.36"245246[dependencies.frame-system-benchmarking]247default-features = false248git = "https://github.com/paritytech/substrate"249optional = true250branch = "polkadot-v0.9.36"251252[dependencies.frame-system-rpc-runtime-api]253default-features = false254git = "https://github.com/paritytech/substrate"255branch = "polkadot-v0.9.36"256257[dependencies.hex-literal]258optional = true259version = '0.3.3'260261[dependencies.serde]262default-features = false263features = ['derive']264optional = true265version = '1.0.130'266267[dependencies.pallet-aura]268default-features = false269git = "https://github.com/paritytech/substrate"270branch = "polkadot-v0.9.36"271272[dependencies.pallet-authorship]273default-features = false274git = 'https://github.com/paritytech/substrate'275branch = 'polkadot-v0.9.36'276277[dependencies.pallet-session]278default-features = false279git = 'https://github.com/paritytech/substrate'280branch = 'polkadot-v0.9.36'281282[dependencies.pallet-balances]283default-features = false284git = "https://github.com/paritytech/substrate"285branch = "polkadot-v0.9.36"286287# Contracts specific packages288# [dependencies.pallet-contracts]289# git = 'https://github.com/paritytech/substrate'290# default-features = false291# branch = 'master'292# version = '4.0.0-dev'293294# [dependencies.pallet-contracts-primitives]295# git = 'https://github.com/paritytech/substrate'296# default-features = false297# branch = 'master'298# version = '4.0.0-dev'299300# [dependencies.pallet-contracts-rpc-runtime-api]301# git = 'https://github.com/paritytech/substrate'302# default-features = false303# branch = 'master'304# version = '4.0.0-dev'305306[dependencies.pallet-randomness-collective-flip]307default-features = false308git = "https://github.com/paritytech/substrate"309branch = "polkadot-v0.9.36"310311[dependencies.pallet-sudo]312default-features = false313git = "https://github.com/paritytech/substrate"314branch = "polkadot-v0.9.36"315316[dependencies.pallet-timestamp]317default-features = false318git = "https://github.com/paritytech/substrate"319branch = "polkadot-v0.9.36"320321[dependencies.pallet-transaction-payment]322default-features = false323git = "https://github.com/paritytech/substrate"324branch = "polkadot-v0.9.36"325326[dependencies.pallet-transaction-payment-rpc-runtime-api]327default-features = false328git = "https://github.com/paritytech/substrate"329branch = "polkadot-v0.9.36"330331[dependencies.pallet-treasury]332default-features = false333git = "https://github.com/paritytech/substrate"334branch = "polkadot-v0.9.36"335336[dependencies.sp-arithmetic]337default-features = false338git = "https://github.com/paritytech/substrate"339branch = "polkadot-v0.9.36"340341[dependencies.sp-api]342default-features = false343git = "https://github.com/paritytech/substrate"344branch = "polkadot-v0.9.36"345346[dependencies.sp-block-builder]347default-features = false348git = "https://github.com/paritytech/substrate"349branch = "polkadot-v0.9.36"350351[dependencies.sp-core]352default-features = false353git = "https://github.com/paritytech/substrate"354branch = "polkadot-v0.9.36"355356[dependencies.sp-consensus-aura]357default-features = false358git = "https://github.com/paritytech/substrate"359branch = "polkadot-v0.9.36"360361[dependencies.sp-inherents]362default-features = false363git = "https://github.com/paritytech/substrate"364branch = "polkadot-v0.9.36"365366[dependencies.sp-io]367default-features = false368git = "https://github.com/paritytech/substrate"369branch = "polkadot-v0.9.36"370371[dependencies.sp-offchain]372default-features = false373git = "https://github.com/paritytech/substrate"374branch = "polkadot-v0.9.36"375376[dependencies.sp-runtime]377default-features = false378git = "https://github.com/paritytech/substrate"379branch = "polkadot-v0.9.36"380381[dependencies.sp-session]382default-features = false383git = "https://github.com/paritytech/substrate"384branch = "polkadot-v0.9.36"385386[dependencies.sp-std]387default-features = false388git = "https://github.com/paritytech/substrate"389branch = "polkadot-v0.9.36"390391[dependencies.sp-transaction-pool]392default-features = false393git = "https://github.com/paritytech/substrate"394branch = "polkadot-v0.9.36"395396[dependencies.sp-version]397default-features = false398git = "https://github.com/paritytech/substrate"399branch = "polkadot-v0.9.36"400401[dependencies.smallvec]402version = '1.6.1'403404################################################################################405# Cumulus dependencies406407[dependencies.parachain-info]408default-features = false409git = "https://github.com/paritytech/cumulus"410branch = "polkadot-v0.9.36"411412[dependencies.cumulus-pallet-aura-ext]413git = "https://github.com/paritytech/cumulus"414branch = "polkadot-v0.9.36"415default-features = false416417[dependencies.cumulus-pallet-parachain-system]418git = "https://github.com/paritytech/cumulus"419branch = "polkadot-v0.9.36"420default-features = false421422[dependencies.cumulus-primitives-core]423git = "https://github.com/paritytech/cumulus"424branch = "polkadot-v0.9.36"425default-features = false426427[dependencies.cumulus-pallet-xcm]428git = "https://github.com/paritytech/cumulus"429branch = "polkadot-v0.9.36"430default-features = false431432[dependencies.cumulus-pallet-dmp-queue]433git = "https://github.com/paritytech/cumulus"434branch = "polkadot-v0.9.36"435default-features = false436437[dependencies.cumulus-pallet-xcmp-queue]438git = "https://github.com/paritytech/cumulus"439branch = "polkadot-v0.9.36"440default-features = false441442[dependencies.cumulus-primitives-utility]443git = "https://github.com/paritytech/cumulus"444branch = "polkadot-v0.9.36"445default-features = false446447[dependencies.cumulus-primitives-timestamp]448git = "https://github.com/paritytech/cumulus"449branch = "polkadot-v0.9.36"450default-features = false451452################################################################################453# Polkadot dependencies454455[dependencies.polkadot-parachain]456git = "https://github.com/paritytech/polkadot"457branch = "release-v0.9.36"458default-features = false459460[dependencies.xcm]461git = "https://github.com/paritytech/polkadot"462branch = "release-v0.9.36"463default-features = false464465[dependencies.xcm-builder]466git = "https://github.com/paritytech/polkadot"467branch = "release-v0.9.36"468default-features = false469470[dependencies.xcm-executor]471git = "https://github.com/paritytech/polkadot"472branch = "release-v0.9.36"473default-features = false474475[dependencies.pallet-xcm]476git = "https://github.com/paritytech/polkadot"477branch = "release-v0.9.36"478default-features = false479480################################################################################481# local dependencies482483[dependencies]484orml-vesting.workspace = true485orml-xtokens.workspace = true486orml-tokens.workspace = true487orml-traits.workspace = true488489log = { version = "0.4.16", default-features = false }490up-common = { path = "../../primitives/common", default-features = false }491scale-info = { version = "2.0.1", default-features = false, features = [492 "derive",493] }494derivative = "2.2.0"495pallet-unique = { path = '../../pallets/unique', default-features = false }496up-rpc = { path = "../../primitives/rpc", default-features = false }497up-pov-estimate-rpc = { path = "../../primitives/pov-estimate-rpc", default-features = false }498app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false }499rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }500fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }501fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }502pallet-inflation = { path = '../../pallets/inflation', default-features = false }503pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }504up-data-structs = { path = '../../primitives/data-structs', default-features = false }505pallet-collator-selection = { default-features = false, path = "../../pallets/collator-selection" }506pallet-identity = { default-features = false, path = "../../pallets/identity" }507pallet-configuration = { default-features = false, path = "../../pallets/configuration" }508pallet-common = { default-features = false, path = "../../pallets/common" }509pallet-structure = { default-features = false, path = "../../pallets/structure" }510pallet-fungible = { default-features = false, path = "../../pallets/fungible" }511pallet-refungible = { default-features = false, path = "../../pallets/refungible" }512pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }513pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }514pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }515pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.36", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }516pallet-unique-scheduler-v2 = { path = '../../pallets/scheduler-v2', default-features = false }517pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }518pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }519pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }520pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }521pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }522pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }523pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }524fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }525fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }526pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" }527evm-coder = { default-features = false, path = '../../crates/evm-coder' }528up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.36' }529pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }530pallet-maintenance = { default-features = false, path = "../../pallets/maintenance" }531precompile-utils-macro = { path = "../common/ethereum/precompiles/utils/macro" }532num_enum = { version = "0.5.3", default-features = false }533534################################################################################535# Test dependencies536537pallet-test-utils = { optional = true, default-features = false, path = "../../test-pallets/utils" }538539################################################################################540# Other Dependencies541542impl-trait-for-tuples = "0.2.2"543544################################################################################545# Dev Dependencies546547[dev-dependencies.logtest]548version = "2.0.0"549550################################################################################551# Build Dependencies552553[build-dependencies.substrate-wasm-builder]554git = "https://github.com/paritytech/substrate"555branch = "polkadot-v0.9.36"runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -28,6 +28,7 @@
'pallet-evm-coder-substrate/runtime-benchmarks',
'pallet-balances/runtime-benchmarks',
'pallet-timestamp/runtime-benchmarks',
+ 'pallet-configuration/runtime-benchmarks',
'pallet-common/runtime-benchmarks',
'pallet-structure/runtime-benchmarks',
'pallet-fungible/runtime-benchmarks',
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -28,6 +28,7 @@
'pallet-evm-coder-substrate/runtime-benchmarks',
'pallet-balances/runtime-benchmarks',
'pallet-timestamp/runtime-benchmarks',
+ 'pallet-configuration/runtime-benchmarks',
'pallet-common/runtime-benchmarks',
'pallet-structure/runtime-benchmarks',
'pallet-fungible/runtime-benchmarks',