From fb260502538e2764033fbf3dd667ff72708a46ae Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 16 Oct 2024 17:32:20 +0800 Subject: [PATCH 01/17] Staking V3 --- .maintain/zombienet.toml | 22 +- Cargo.lock | 14 - Cargo.toml | 2 - core/inflation/Cargo.toml | 6 - core/inflation/src/lib.rs | 32 -- core/inflation/src/test.rs | 20 - pallet/deposit/Cargo.toml | 6 - pallet/deposit/src/benchmarking.rs | 107 +---- pallet/deposit/src/lib.rs | 380 ++++----------- pallet/deposit/src/mock.rs | 67 --- pallet/deposit/src/tests.rs | 392 +++------------- pallet/deposit/src/weights.rs | 121 +---- pallet/staking/Cargo.toml | 3 - pallet/staking/src/benchmarking.rs | 19 +- pallet/staking/src/lib.rs | 715 ++++------------------------- pallet/staking/src/mock.rs | 6 +- pallet/staking/src/tests.rs | 420 +---------------- pallet/staking/src/weights.rs | 207 +-------- pallet/staking/traits/Cargo.toml | 30 -- pallet/staking/traits/src/lib.rs | 75 --- 20 files changed, 291 insertions(+), 2353 deletions(-) delete mode 100644 pallet/staking/traits/Cargo.toml delete mode 100644 pallet/staking/traits/src/lib.rs diff --git a/.maintain/zombienet.toml b/.maintain/zombienet.toml index bb98bcf47..cefd00530 100644 --- a/.maintain/zombienet.toml +++ b/.maintain/zombienet.toml @@ -17,28 +17,18 @@ validator = true chain = "koi-genesis" force_decorator = "generic-evm" id = 2105 -[parachains.collator] +[[parachains.collators]] args = ["--database=paritydb", "--force-authoring", "-lparachain=debug"] command = "tmp/darwinia" -name = "C1" +name = "c1" rpc_port = 10000 - -[[parachains]] -chain = "koi-genesis" -force_decorator = "generic-evm" -id = 2105 -[parachains.collator] +[[parachains.collators]] args = ["--database=paritydb", "--force-authoring", "-lparachain=debug"] command = "tmp/darwinia" -name = "C2" +name = "c2" rpc_port = 10001 - -[[parachains]] -chain = "koi-genesis" -force_decorator = "generic-evm" -id = 2105 -[parachains.collator] +[[parachains.collators]] args = ["--database=paritydb", "--force-authoring", "-lparachain=debug"] command = "tmp/darwinia" -name = "C3" +name = "c3" rpc_port = 10002 diff --git a/Cargo.lock b/Cargo.lock index a7d4b90b7..fd69a3d60 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2775,8 +2775,6 @@ name = "darwinia-deposit" version = "6.7.1" dependencies = [ "darwinia-ethtx-forwarder", - "darwinia-staking-traits", - "dc-inflation", "dc-types", "ethabi", "fp-evm", @@ -2784,7 +2782,6 @@ dependencies = [ "frame-support", "frame-system", "log", - "pallet-assets", "pallet-balances", "pallet-timestamp", "parity-scale-codec", @@ -3013,7 +3010,6 @@ version = "6.7.1" dependencies = [ "darwinia-deposit", "darwinia-ethtx-forwarder", - "darwinia-staking-traits", "dc-inflation", "dc-types", "ethabi", @@ -3037,15 +3033,6 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] -[[package]] -name = "darwinia-staking-traits" -version = "6.7.1" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-runtime", -] - [[package]] name = "data-encoding" version = "2.6.0" @@ -3077,7 +3064,6 @@ name = "dc-inflation" version = "6.7.1" dependencies = [ "dc-types", - "primitive-types", "sp-arithmetic", "substrate-fixed", ] diff --git a/Cargo.toml b/Cargo.toml index 83da3abdd..4c8a9d0db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,6 @@ members = [ "core/*", "node", "pallet/*", - "pallet/*/traits", "precompile/*", "runtime/*", ] @@ -45,7 +44,6 @@ darwinia-precompile-staking = { path = "precompile/staking", default-featu darwinia-precompile-state-storage = { path = "precompile/state-storage", default-features = false } darwinia-runtime = { path = "runtime/darwinia" } darwinia-staking = { path = "pallet/staking", default-features = false } -darwinia-staking-traits = { path = "pallet/staking/traits", default-features = false } dc-inflation = { path = "core/inflation", default-features = false } dc-primitives = { path = "core/primitives", default-features = false } dc-types = { path = "core/types" } diff --git a/core/inflation/Cargo.toml b/core/inflation/Cargo.toml index 20ac24271..5c20a8dce 100644 --- a/core/inflation/Cargo.toml +++ b/core/inflation/Cargo.toml @@ -7,9 +7,6 @@ readme = "README.md" version.workspace = true [dependencies] -# crates.io -primitive-types = { version = "0.12", default-features = false } - # darwinia dc-types = { workspace = true } @@ -22,9 +19,6 @@ sp-arithmetic = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ - # crates.io - "primitive-types/std", - # github "substrate-fixed/std", ] diff --git a/core/inflation/src/lib.rs b/core/inflation/src/lib.rs index 90b69e751..bfb800d48 100644 --- a/core/inflation/src/lib.rs +++ b/core/inflation/src/lib.rs @@ -24,8 +24,6 @@ #[cfg(test)] mod test; -// crates.io -use primitive_types::U256; // darwinia use dc_types::{Balance, Moment}; // github @@ -148,33 +146,3 @@ pub fn issuing_in_period(period: Moment, elapsed: Moment) -> Option { Some(to_issue_per_millisecs.checked_mul(U94F34::checked_from_num(period)?)?.floor().to_num()) } - -/// Calculate the reward of a deposit. -/// -/// Reference(s): -/// - -pub fn deposit_interest(amount: Balance, months: u8) -> Balance { - // The result of `((quot - 1) * precision + rem * precision / d)` is `197` when months is - // `12`. - // - // The default interest is `1_000`. - // So, we directly use `1_970_000` here instead `interest * 197 * 10^7`. - fn f(amount: U256, precision: U256, quot: U256, rem: U256, d: U256) -> Option { - Some( - (amount.checked_mul( - precision.checked_mul(quot.checked_sub(1_u8.into())?)? + precision * rem / d, - )? / 1_970_000_u32) - .as_u128(), - ) - } - - let amount = U256::from(amount); - let months = U256::from(months); - let n = U256::from(67_u8).pow(months); - let d = U256::from(66_u8).pow(months); - let quot = n / d; - let rem = n % d; - let precision = U256::from(1_000_u16); - - f(amount, precision, quot, rem, d).unwrap_or_default() -} diff --git a/core/inflation/src/test.rs b/core/inflation/src/test.rs index 7827161e2..a72178bcf 100644 --- a/core/inflation/src/test.rs +++ b/core/inflation/src/test.rs @@ -81,23 +81,3 @@ fn issuing_map_should_work() { unissued -= issued; }); } - -#[test] -fn deposit_interest_should_work() { - let precision = 10_000_f64; - - for (&expect_interest, months) in [ - 0.0761_f64, 0.1522, 0.2335, 0.3096, 0.3959, 0.4771, 0.5634, 0.6446, 0.7309, 0.8223, 0.9086, - 1.0000, 1.0913, 1.1878, 1.2842, 1.3807, 1.4771, 1.5736, 1.6751, 1.7766, 1.8832, 1.9898, - 2.0964, 2.2030, 2.3147, 2.4263, 2.5380, 2.6548, 2.7715, 2.8934, 3.0101, 3.1370, 3.2588, - 3.3857, 3.5126, 3.6446, - ] - .iter() - .zip(1_u8..) - { - let interest = deposit_interest(10_000_u128 * UNIT, months) as f64 / UNIT as f64; - let interest = (interest * precision).floor() / precision; - - assert_eq!(interest, expect_interest); - } -} diff --git a/pallet/deposit/Cargo.toml b/pallet/deposit/Cargo.toml index f355eb2a2..be7df7233 100644 --- a/pallet/deposit/Cargo.toml +++ b/pallet/deposit/Cargo.toml @@ -15,8 +15,6 @@ scale-info = { workspace = true } # darwinia darwinia-ethtx-forwarder = { workspace = true } -darwinia-staking-traits = { workspace = true } -dc-inflation = { workspace = true } dc-types = { workspace = true } # frontier @@ -34,7 +32,6 @@ frame-benchmarking = { workspace = true, optional = true } [dev-dependencies] # polkadot-sdk -pallet-assets = { workspace = true, features = ["std"] } pallet-balances = { workspace = true, features = ["std"] } sp-io = { workspace = true, features = ["std"] } @@ -49,8 +46,6 @@ std = [ # darwinia "darwinia-ethtx-forwarder/std", - "darwinia-staking-traits/std", - "dc-inflation/std", # frontier "fp-evm/std", @@ -69,7 +64,6 @@ std = [ runtime-benchmarks = [ # darwinia "darwinia-ethtx-forwarder/runtime-benchmarks", - "darwinia-staking-traits/runtime-benchmarks", # polkadot-sdk "frame-support/runtime-benchmarks", diff --git a/pallet/deposit/src/benchmarking.rs b/pallet/deposit/src/benchmarking.rs index 34fb0165b..c7c47752a 100644 --- a/pallet/deposit/src/benchmarking.rs +++ b/pallet/deposit/src/benchmarking.rs @@ -17,12 +17,10 @@ // along with Darwinia. If not, see . // darwinia -use crate::*; -use dc_types::UNIT; +use crate::{Deposit, *}; // polkadot-sdk use frame_benchmarking::v2; use frame_system::RawOrigin; -use sp_runtime::SaturatedConversion; use sp_std::prelude::*; #[v2::benchmarks] @@ -31,106 +29,27 @@ mod benchmarks { use super::*; #[benchmark] - fn lock() { - let a = frame_benchmarking::whitelisted_caller(); - let max_deposits = T::MaxDeposits::get(); - - // Remove `+ 1` after https://github.com/paritytech/substrate/pull/13655. - T::Ring::make_free_balance_be(&a, max_deposits as Balance * UNIT + 1); - - // Worst-case scenario: - // - // Calculate the last deposit's id. - (0..max_deposits - 1).for_each(|_| { - >::lock(RawOrigin::Signed(a.clone()).into(), UNIT, MAX_LOCKING_MONTHS) - .unwrap() - }); - - #[extrinsic_call] - _(RawOrigin::Signed(a), UNIT, MAX_LOCKING_MONTHS); - } - - #[benchmark] - fn claim() { - let a = frame_benchmarking::whitelisted_caller(); - let max_deposits = T::MaxDeposits::get(); - - // Remove `+ 1` after https://github.com/paritytech/substrate/pull/13655. - T::Ring::make_free_balance_be(&a, max_deposits as Balance * UNIT + 1); - - (0..max_deposits).for_each(|_| { - >::lock(RawOrigin::Signed(a.clone()).into(), UNIT, MAX_LOCKING_MONTHS) - .unwrap() - }); - - // Worst-case scenario: - // - // Let all locks be expired. - >::set_timestamp( - >::now() - + (MAX_LOCKING_MONTHS as Moment * MILLISECS_PER_MONTH).saturated_into(), - ); - - assert_eq!(>::deposit_of(&a).unwrap().len(), max_deposits as usize); - - #[extrinsic_call] - _(RawOrigin::Signed(a.clone())); - - assert!(>::deposit_of(&a).is_none()); - } - - #[benchmark] - fn claim_with_penalty() { - let a = frame_benchmarking::whitelisted_caller(); - let max_deposits = T::MaxDeposits::get(); - - // Remove `+ 1` after https://github.com/paritytech/substrate/pull/13655. - T::Ring::make_free_balance_be(&a, max_deposits as Balance * UNIT + 1); - T::Kton::mint(&a, UNIT).unwrap(); - - (0..max_deposits).for_each(|_| { - >::lock(RawOrigin::Signed(a.clone()).into(), UNIT, MAX_LOCKING_MONTHS) - .unwrap() - }); - - // Worst-case scenario: - // - // Remove the head item from a 'full-size' bounded vector. - { - let ds = >::deposit_of(&a).unwrap(); - - assert_eq!(ds.len(), max_deposits as usize); - assert_eq!(ds[0].id, 0); - } - - #[extrinsic_call] - _(RawOrigin::Signed(a.clone()), 0); - - { - let ds = >::deposit_of(&a).unwrap(); - - assert_eq!(ds.len(), max_deposits as usize - 1); - assert_eq!(ds[0].id, 1); - } - } - - #[benchmark] - fn migrate() { + fn migrate_for() { let a = frame_benchmarking::whitelisted_caller::(); let a_ = a.clone(); - let max_deposits = T::MaxDeposits::get(); >::set_deposit_contract(RawOrigin::Root.into(), a.clone()).unwrap(); - // Remove `+ 1` after https://github.com/paritytech/substrate/pull/13655. - T::Ring::make_free_balance_be(&a, max_deposits as Balance * UNIT + 1); + T::Ring::make_free_balance_be(&a, 512); + T::Ring::make_free_balance_be(&account_id(), 512); // Worst-case scenario: // // Max deposit items to be migrated. - (0..max_deposits).for_each(|_| { - >::lock(RawOrigin::Signed(a.clone()).into(), UNIT, MAX_LOCKING_MONTHS) - .unwrap() + >::insert(&a, { + let mut v = BoundedVec::new(); + + (0..512).for_each(|id| { + v.try_push(Deposit { id, value: 1, start_time: 0, expired_time: 0, in_use: false }) + .unwrap(); + }); + + v }); #[extrinsic_call] diff --git a/pallet/deposit/src/lib.rs b/pallet/deposit/src/lib.rs index 006542232..93fc41be4 100644 --- a/pallet/deposit/src/lib.rs +++ b/pallet/deposit/src/lib.rs @@ -38,16 +38,11 @@ mod weights; pub use weights::WeightInfo; // core -use core::{ - cmp::Ordering::{Equal, Greater, Less}, - marker::PhantomData, - ops::ControlFlow::{Break, Continue}, -}; +use core::marker::PhantomData; // crates.io use codec::FullCodec; use ethabi::{Function, Param, ParamType, StateMutability, Token}; // darwinia -use dc_inflation::MILLISECS_PER_YEAR; use dc_types::{Balance, Moment}; // frontier use fp_evm::{CallOrCreateInfo, ExitReason}; @@ -60,7 +55,7 @@ use frame_support::{ use frame_system::pallet_prelude::*; use sp_core::H160; use sp_runtime::traits::AccountIdConversion; -use sp_std::prelude::*; +use sp_std::{collections::btree_map::BTreeMap, prelude::*}; #[frame_support::pallet] pub mod pallet { @@ -72,72 +67,34 @@ pub mod pallet { /// Override the [`frame_system::Config::RuntimeEvent`]. type RuntimeEvent: From> + IsType<::RuntimeEvent>; - /// Weight information for extrinsics in this pallet. + /// Weight information for extrinsic in this pallet. type WeightInfo: WeightInfo; /// RING asset. type Ring: Currency; - /// KTON asset. - type Kton: SimpleAsset; - /// Deposit contract migrator. type DepositMigrator: MigrateToContract; /// Treasury account. #[pallet::constant] type Treasury: Get; - - /// Maximum deposit count. - /// - /// In currently design, this should not be greater than `u16::MAX`. - #[pallet::constant] - type MaxDeposits: Get; } #[allow(missing_docs)] #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - /// A new deposit has been created. - DepositCreated { - owner: T::AccountId, - deposit_id: DepositId, - value: Balance, - start_time: Moment, - expired_time: Moment, - kton_reward: Balance, - }, /// Expired deposits have been claimed. DepositsClaimed { owner: T::AccountId, deposits: Vec }, - /// An unexpired deposit has been claimed by paying the KTON penalty. - DepositClaimedWithPenalty { - owner: T::AccountId, - deposit_id: DepositId, - kton_penalty: Balance, - }, /// Deposits have been migrated. DepositsMigrated { owner: T::AccountId, deposits: Vec }, } #[pallet::error] pub enum Error { - /// Lock at least for a specific amount. - LockAtLeastSome, - /// Lock at least for one month. - LockAtLeastOneMonth, - /// Lock at most for thirty-six months. - LockAtMostThirtySixMonths, - /// Exceed maximum deposit count. - ExceedMaxDeposits, - /// Deposit not found. - DepositNotFound, - /// Deposit is in use. - DepositInUse, - /// Deposit is not in use. - DepositNotInUse, - /// Deposit is already expired. - DepositAlreadyExpired, + /// No deposit. + NoDeposit, /// Invalid deposit contract. InvalidDepositContract, /// Migration interaction with deposit contract failed. @@ -150,7 +107,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn deposit_of)] pub type Deposits = - StorageMap<_, Blake2_128Concat, T::AccountId, BoundedVec>; + StorageMap<_, Blake2_128Concat, T::AccountId, BoundedVec>>; // Deposit contract address. #[pallet::storage] @@ -159,204 +116,73 @@ pub mod pallet { #[pallet::pallet] pub struct Pallet(_); - #[pallet::call] - impl Pallet { - /// Lock the RING for some KTON profit/interest. - #[pallet::call_index(0)] - #[pallet::weight(::WeightInfo::lock())] - pub fn lock(origin: OriginFor, amount: Balance, months: u8) -> DispatchResult { - let who = ensure_signed(origin)?; - - if amount == 0 { - Err(>::LockAtLeastSome)?; - } - if months == 0 { - Err(>::LockAtLeastOneMonth)?; - } - if months > MAX_LOCKING_MONTHS { - Err(>::LockAtMostThirtySixMonths)?; + #[pallet::hooks] + impl Hooks> for Pallet { + fn on_idle(_: BlockNumberFor, mut remaining_weight: Weight) -> Weight { + // At least 1 read weight is required. + #[cfg(not(test))] + if let Some(rw) = remaining_weight.checked_sub(&T::DbWeight::get().reads(1)) { + remaining_weight = rw; + } else { + return remaining_weight; } - if >::decode_len(&who).unwrap_or_default() as u32 >= T::MaxDeposits::get() { - Err(>::ExceedMaxDeposits)?; - } - - let (deposit_id, start_time, expired_time) = >::try_mutate(&who, |ds| { - let ds = if let Some(ds) = ds { - ds - } else { - >::inc_consumers(&who)?; - - *ds = Some(Default::default()); - - ds.as_mut().expect("[pallet::deposit] `ds` must be some; qed") - }; - - // Keep the list sorted in increasing order. - // And find the missing id. - let id = match ds.iter().map(|d| d.id).try_fold(0, |i, id| match i.cmp(&id) { - // `Greater` never occurs, as this list is always sorted. - // But it's a good practice to handle it instead of marking as `unreachable!`. - Less | Greater => Break(i), - Equal => Continue(i + 1), - }) { - Continue(c) => c, - Break(b) => b, - }; - let start_time = Self::now(); - let expired_time = start_time + MILLISECS_PER_MONTH * months as Moment; - - ds.try_insert( - id as _, - Deposit { id, value: amount, start_time, expired_time, in_use: false }, - ) - .map_err(|_| >::ExceedMaxDeposits)?; - - >::Ok((id, start_time, expired_time)) - })?; - - T::Ring::transfer(&who, &account_id(), amount, AllowDeath)?; - - let kton_reward = dc_inflation::deposit_interest(amount, months); - - T::Kton::mint(&who, kton_reward)?; - - Self::deposit_event(Event::DepositCreated { - owner: who, - deposit_id, - value: amount, - start_time, - expired_time, - kton_reward, - }); - - Ok(()) - } - /// Claim the expired-locked RING. - #[pallet::call_index(1)] - #[pallet::weight(::WeightInfo::claim())] - pub fn claim(origin: OriginFor) -> DispatchResult { - let who = ensure_signed(origin)?; - let now = Self::now(); - let mut to_claim = (0, Vec::new()); - let _ = >::try_mutate(&who, |maybe_ds| { - let ds = maybe_ds.as_mut().ok_or(())?; - - ds.retain(|d| { - if d.expired_time <= now && !d.in_use { - to_claim.0 += d.value; - to_claim.1.push(d.id); - - false + #[cfg(test)] + let wt = Weight::zero().add_ref_time(10); + #[cfg(not(test))] + let wt = ::WeightInfo::migrate_for(); + let mut ds_to_migrate = BTreeMap::, usize)>::new(); + + 'outer: for (w, ds) in >::iter() { + for _ in 0..ds.len().div_ceil(10) { + if let Some(rw) = remaining_weight.checked_sub(&wt) { + remaining_weight = rw; + + if let Some((_, cnt)) = ds_to_migrate.get_mut(&w) { + *cnt += 1; + } else { + ds_to_migrate.insert(w.clone(), (ds.to_vec(), 1)); + } } else { - true + break 'outer; } - }); - - if ds.is_empty() { - >::dec_consumers(&who); - - *maybe_ds = None; } + } - >::Ok(()) - }); - - T::Ring::transfer(&account_id(), &who, to_claim.0, AllowDeath)?; - Self::deposit_event(Event::DepositsClaimed { owner: who, deposits: to_claim.1 }); - - Ok(()) - } + for (w, (ds, cnt)) in ds_to_migrate { + let mut ds = ds; - /// Claim the unexpired-locked RING by paying the KTON penalty. - #[pallet::call_index(2)] - #[pallet::weight(::WeightInfo::claim_with_penalty())] - pub fn claim_with_penalty(origin: OriginFor, id: DepositId) -> DispatchResult { - let who = ensure_signed(origin)?; - let d = >::try_mutate(&who, |maybe_ds| { - let ds = maybe_ds.as_mut().ok_or(>::DepositNotFound)?; - let d = ds - .remove(ds.iter().position(|d| d.id == id).ok_or(>::DepositNotFound)?); - - if d.in_use { - Err(>::DepositInUse)?; + for _ in 0..cnt { + match Self::migrate_for_inner(&w, ds.clone()) { + Ok(ds_) => ds = ds_, + _ => break, + } } - if ds.is_empty() { - >::dec_consumers(&who); - *maybe_ds = None; + if ds.is_empty() { + >::remove(&w); + } else { + // There are still some deposits left for this account. + >::insert(&w, BoundedVec::truncate_from(ds)); } - - Ok::<_, DispatchError>(d) - })?; - let now = Self::now(); - - if d.expired_time <= now { - Err(>::DepositAlreadyExpired)?; } - let promise_m = (d.expired_time - d.start_time) / MILLISECS_PER_MONTH; - let elapsed_m = (now - d.start_time) / MILLISECS_PER_MONTH; - let kton_penalty = dc_inflation::deposit_interest(d.value, promise_m as _) - .saturating_sub(dc_inflation::deposit_interest(d.value, elapsed_m as _)) - .max(1) * 3; - - T::Kton::burn(&who, kton_penalty)?; - T::Ring::transfer(&account_id(), &who, d.value, AllowDeath)?; - Self::deposit_event(Event::DepositClaimedWithPenalty { - owner: who, - deposit_id: id, - kton_penalty, - }); - - Ok(()) + remaining_weight } - + } + #[pallet::call] + impl Pallet { /// Migrate the specified account's data to deposit contract. #[pallet::call_index(3)] - #[pallet::weight(::WeightInfo::migrate())] - pub fn migrate(origin: OriginFor, who: T::AccountId) -> DispatchResult { + #[pallet::weight(::WeightInfo::migrate_for())] + pub fn migrate_for(origin: OriginFor, who: T::AccountId) -> DispatchResult { ensure_signed(origin)?; - let Some(ds) = >::take(&who) else { return Ok(()) }; - let now = Self::now(); - let mut ds = ds.into_iter(); - let mut to_claim = (0, Vec::new()); - let mut to_migrate = (0, Vec::new(), Vec::new()); - - // Take 0~10 deposits to migrate. - for d in ds.by_ref().take(10) { - if d.in_use { - Err(>::DepositInUse)?; - } - - if d.expired_time <= now { - to_claim.0 += d.value; - to_claim.1.push(d.id); - } else { - to_migrate.0 += d.value; - to_migrate.1.push(d.id); - to_migrate.2.push((d.value, d.start_time / 1_000, d.expired_time / 1_000)); - } - } - - T::Ring::transfer(&account_id(), &who, to_claim.0, AllowDeath)?; - T::Ring::transfer(&account_id(), &T::Treasury::get(), to_migrate.0, AllowDeath)?; - T::DepositMigrator::migrate(who.clone(), to_migrate.0, to_migrate.2)?; - - Self::deposit_event(Event::DepositsClaimed { - owner: who.clone(), - deposits: to_claim.1, - }); - Self::deposit_event(Event::DepositsMigrated { - owner: who.clone(), - deposits: to_migrate.1, - }); - - let ds = ds.collect::>(); + let ds = >::take(&who).ok_or(>::NoDeposit)?; + let ds = Self::migrate_for_inner(&who, ds)?; + // Put the rest deposits back. if !ds.is_empty() { - // Put the rest deposits back. >::insert(&who, BoundedVec::truncate_from(ds)); } @@ -384,56 +210,45 @@ pub mod pallet { fn now() -> Moment { as UnixTime>::now().as_millis() } - } - impl darwinia_staking_traits::Stake for Pallet - where - T: Config, - { - type AccountId = T::AccountId; - type Item = DepositId; - fn stake(who: &Self::AccountId, item: Self::Item) -> DispatchResult { - >::try_mutate(who, |ds| { - let ds = ds.as_mut().ok_or(>::DepositNotFound)?; - let d = ds.iter_mut().find(|d| d.id == item).ok_or(>::DepositNotFound)?; + fn migrate_for_inner( + who: &T::AccountId, + deposits: I, + ) -> Result, DispatchError> + where + I: IntoIterator, + { + let now = Self::now(); + let mut deposits = deposits.into_iter(); + let mut to_claim = (0, Vec::new()); + let mut to_migrate = (0, Vec::new(), Vec::new()); - if d.in_use { - Err(>::DepositInUse)? + // Take 0~10 deposits to migrate. + for d in deposits.by_ref().take(10) { + if d.expired_time <= now { + to_claim.0 += d.value; + to_claim.1.push(d.id); } else { - d.in_use = true; - - Ok(()) + to_migrate.0 += d.value; + to_migrate.1.push(d.id); + to_migrate.2.push((d.value, d.start_time / 1_000, d.expired_time / 1_000)); } - }) - } + } - fn unstake(who: &Self::AccountId, item: Self::Item) -> DispatchResult { - >::try_mutate(who, |ds| { - let ds = ds.as_mut().ok_or(>::DepositNotFound)?; - let d = ds.iter_mut().find(|d| d.id == item).ok_or(>::DepositNotFound)?; + T::Ring::transfer(&account_id(), &who, to_claim.0, AllowDeath)?; + T::Ring::transfer(&account_id(), &T::Treasury::get(), to_migrate.0, AllowDeath)?; + T::DepositMigrator::migrate(who.clone(), to_migrate.0, to_migrate.2)?; - if d.in_use { - d.in_use = false; + Self::deposit_event(Event::DepositsClaimed { + owner: who.clone(), + deposits: to_claim.1, + }); + Self::deposit_event(Event::DepositsMigrated { + owner: who.clone(), + deposits: to_migrate.1, + }); - Ok(()) - } else { - Err(>::DepositNotInUse)? - } - }) - } - } - impl darwinia_staking_traits::StakeExt for Pallet - where - T: Config, - { - type Amount = Balance; - - fn amount(who: &Self::AccountId, item: Self::Item) -> Result { - Ok(>::get(who) - .and_then(|ds| { - ds.into_iter().find_map(|d| if d.id == item { Some(d.value) } else { None }) - }) - .ok_or(>::DepositNotFound)?) + Ok(deposits.collect()) } } } @@ -441,29 +256,6 @@ pub use pallet::*; /// Deposit identifier. pub type DepositId = u16; -// https://github.com/polkadot-js/apps/issues/8591 -// Max deposits in Darwinia is 322. -// Max deposits in Crab is 220. -// Maybe we will use `WeakBoundedVec` later. -// pub type DepositId = u8; - -/// Milliseconds per month. -pub const MILLISECS_PER_MONTH: Moment = MILLISECS_PER_YEAR / 12; - -/// The maximum locking period for a deposit. -pub const MAX_LOCKING_MONTHS: u8 = 36; - -/// Simple asset APIs. -pub trait SimpleAsset { - /// Account type. - type AccountId; - - /// Mint API. - fn mint(beneficiary: &Self::AccountId, amount: Balance) -> DispatchResult; - - /// Burn API. - fn burn(who: &Self::AccountId, amount: Balance) -> DispatchResult; -} /// Migrate to contract trait. pub trait MigrateToContract diff --git a/pallet/deposit/src/mock.rs b/pallet/deposit/src/mock.rs index 597aa70f3..195437844 100644 --- a/pallet/deposit/src/mock.rs +++ b/pallet/deposit/src/mock.rs @@ -24,8 +24,6 @@ use frame_support::derive_impl; use sp_io::TestExternalities; use sp_runtime::BuildStorage; -pub type AssetId = u32; - #[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; @@ -45,51 +43,8 @@ impl pallet_balances::Config for Runtime { type ExistentialDeposit = (); } -impl pallet_assets::Config for Runtime { - type ApprovalDeposit = (); - type AssetAccountDeposit = (); - type AssetDeposit = (); - type AssetId = AssetId; - type AssetIdParameter = codec::Compact; - type Balance = Balance; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); - type CallbackHandle = (); - type CreateOrigin = frame_support::traits::AsEnsureOriginWithArg< - frame_system::EnsureSignedBy, Self::AccountId>, - >; - type Currency = Balances; - type Extra = (); - type ForceOrigin = frame_system::EnsureRoot; - type Freezer = (); - type MetadataDepositBase = (); - type MetadataDepositPerByte = (); - type RemoveItemsLimit = (); - type RuntimeEvent = RuntimeEvent; - type StringLimit = frame_support::traits::ConstU32<4>; - type WeightInfo = (); -} - -pub enum KtonMinting {} -impl crate::SimpleAsset for KtonMinting { - type AccountId = ::AccountId; - - fn mint(beneficiary: &Self::AccountId, amount: Balance) -> sp_runtime::DispatchResult { - Assets::mint(RuntimeOrigin::signed(0), 0.into(), *beneficiary, amount) - } - - fn burn(who: &Self::AccountId, amount: Balance) -> sp_runtime::DispatchResult { - if Assets::balance(0, who) < amount { - Err(>::BalanceLow)?; - } - - Assets::burn(RuntimeOrigin::signed(0), 0.into(), *who, amount) - } -} impl crate::Config for Runtime { type DepositMigrator = (); - type Kton = KtonMinting; - type MaxDeposits = frame_support::traits::ConstU32<16>; type Ring = Balances; type RuntimeEvent = RuntimeEvent; type Treasury = (); @@ -101,7 +56,6 @@ frame_support::construct_runtime! { System: frame_system, Timestamp: pallet_timestamp, Balances: pallet_balances, - Assets: pallet_assets, Deposit: crate, } } @@ -114,27 +68,6 @@ pub fn new_test_ext() -> TestExternalities { } .assimilate_storage(&mut storage) .unwrap(); - pallet_assets::GenesisConfig:: { - assets: vec![(0, 0, true, 1)], - metadata: vec![(0, b"KTON".to_vec(), b"KTON".to_vec(), 18)], - ..Default::default() - } - .assimilate_storage(&mut storage) - .unwrap(); storage.into() } - -pub fn efflux(milli_secs: Moment) { - Timestamp::set_timestamp(Timestamp::now() + milli_secs); -} - -pub fn set_in_use(who: u64, in_use: bool) { - let _ = >::try_mutate(who, |maybe_ds| { - let ds = maybe_ds.as_mut().ok_or(())?; - - ds.iter_mut().for_each(|d| d.in_use = in_use); - - Ok::<_, ()>(()) - }); -} diff --git a/pallet/deposit/src/tests.rs b/pallet/deposit/src/tests.rs index 765073e23..deecaf726 100644 --- a/pallet/deposit/src/tests.rs +++ b/pallet/deposit/src/tests.rs @@ -21,355 +21,77 @@ use crate::{ mock::{Deposit, *}, Deposit as DepositS, *, }; -use darwinia_staking_traits::Stake; -use dc_types::UNIT; // polkadot-sdk -use frame_support::{assert_noop, assert_ok}; -use sp_runtime::TokenError; +use frame_support::{assert_ok, traits::OnIdle}; #[test] -fn lock_should_work() { - new_test_ext().execute_with(|| { - assert_eq!(System::account(1).consumers, 0); - assert_eq!( - Balances::free_balance( - crate::account_id::<::AccountId>() - ), - 0 - ); - assert_eq!(Balances::free_balance(1), 1_000 * UNIT); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), 10 * UNIT, 1)); - assert_eq!(System::account(1).consumers, 1); - assert_eq!( - Balances::free_balance( - crate::account_id::<::AccountId>() - ), - 10 * UNIT - ); - assert_eq!(Balances::free_balance(1), 990 * UNIT); - }); -} - -#[test] -fn deposit_interest_should_work() { - new_test_ext().execute_with(|| { - assert_eq!(Assets::balance(0, 1), 0); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1)); - assert_eq!(Assets::balance(0, 1), 7_614_213_197_969); - - assert_eq!(Assets::balance(0, 2), 0); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(2), 1000 * UNIT, MAX_LOCKING_MONTHS)); - assert_eq!(Assets::balance(0, 2), 364_467_005_076_142_131); - }); -} - -#[test] -fn unique_identity_should_work() { - new_test_ext().execute_with(|| { - assert!(Deposit::deposit_of(1).is_none()); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1)); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), 2 * UNIT, 2)); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), 3 * UNIT, 1)); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), 4 * UNIT, 2)); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), 5 * UNIT, 1)); - assert_eq!( - Deposit::deposit_of(1).unwrap().as_slice(), - &[ - DepositS { - id: 0, - value: UNIT, - start_time: 0, - expired_time: MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 1, - value: 2 * UNIT, - start_time: 0, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 2, - value: 3 * UNIT, - start_time: 0, - expired_time: MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 3, - value: 4 * UNIT, - start_time: 0, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 4, - value: 5 * UNIT, - start_time: 0, - expired_time: MILLISECS_PER_MONTH, - in_use: false - } - ] - ); - - efflux(MILLISECS_PER_MONTH); - assert_ok!(Deposit::claim(RuntimeOrigin::signed(1))); - - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), 6 * UNIT, 1)); - assert_eq!( - Deposit::deposit_of(1).unwrap().as_slice(), - &[ - DepositS { - id: 0, - value: 6 * UNIT, - start_time: MILLISECS_PER_MONTH, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 1, - value: 2 * UNIT, - start_time: 0, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 3, - value: 4 * UNIT, - start_time: 0, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - ] - ); - - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), 7 * UNIT, 1)); - assert_eq!( - Deposit::deposit_of(1).unwrap().as_slice(), - &[ - DepositS { - id: 0, - value: 6 * UNIT, - start_time: MILLISECS_PER_MONTH, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 1, - value: 2 * UNIT, - start_time: 0, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 2, - value: 7 * UNIT, - start_time: MILLISECS_PER_MONTH, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 3, - value: 4 * UNIT, - start_time: 0, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - ] - ); - - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), 8 * UNIT, 1)); - assert_eq!( - Deposit::deposit_of(1).unwrap().as_slice(), - &[ - DepositS { - id: 0, - value: 6 * UNIT, - start_time: MILLISECS_PER_MONTH, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 1, - value: 2 * UNIT, - start_time: 0, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 2, - value: 7 * UNIT, - start_time: MILLISECS_PER_MONTH, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 3, - value: 4 * UNIT, - start_time: 0, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - DepositS { - id: 4, - value: 8 * UNIT, - start_time: MILLISECS_PER_MONTH, - expired_time: 2 * MILLISECS_PER_MONTH, - in_use: false - }, - ] - ); - }); -} - -#[test] -fn expire_time_should_work() { - new_test_ext().execute_with(|| { - (1..=8).for_each(|_| { - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1)); - efflux(MILLISECS_PER_MONTH); - }); - assert_eq!( - Deposit::deposit_of(1).unwrap().as_slice(), - (1..=8) - .map(|i| DepositS { - id: i - 1, - value: UNIT, - start_time: (i - 1) as Moment * MILLISECS_PER_MONTH, - expired_time: i as Moment * MILLISECS_PER_MONTH, - in_use: false - }) - .collect::>() - .as_slice() - ); - }); -} - -#[test] -fn lock_should_fail() { +fn migrate_should_work() { new_test_ext().execute_with(|| { - assert_noop!( - Deposit::lock(RuntimeOrigin::signed(1), 0, 0), - >::LockAtLeastSome - ); - - assert_noop!( - Deposit::lock(RuntimeOrigin::signed(1), UNIT, 0), - >::LockAtLeastOneMonth + let _ = Balances::deposit_creating(&account_id(), 2); + + >::insert( + 1, + BoundedVec::truncate_from(vec![ + DepositS { id: 0, value: 1, start_time: 0, expired_time: 0, in_use: false }, + DepositS { id: 0, value: 1, start_time: 0, expired_time: 0, in_use: true }, + ]), ); - assert_noop!( - Deposit::lock(RuntimeOrigin::signed(1), UNIT, 37), - >::LockAtMostThirtySixMonths - ); - - (0..<::MaxDeposits as Get<_>>::get()).for_each(|_| { - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1)); - }); - assert_noop!( - Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1), - >::ExceedMaxDeposits - ); - - assert_noop!( - Deposit::lock(RuntimeOrigin::signed(2), 2_001 * UNIT, 1), - TokenError::FundsUnavailable - ); - }); -} - -#[test] -fn claim_should_work() { - new_test_ext().execute_with(|| { - assert!(Deposit::deposit_of(1).is_none()); - assert_ok!(Deposit::claim(RuntimeOrigin::signed(1))); - assert!(Deposit::deposit_of(1).is_none()); - - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1)); - assert!(Deposit::deposit_of(1).is_some()); - - efflux(MILLISECS_PER_MONTH - 1); - assert_eq!(System::account(1).consumers, 1); - assert_ok!(Deposit::claim(RuntimeOrigin::signed(1))); - assert_eq!(System::account(1).consumers, 1); assert!(Deposit::deposit_of(1).is_some()); - - efflux(MILLISECS_PER_MONTH); - assert_eq!(System::account(1).consumers, 1); - assert_ok!(Deposit::claim(RuntimeOrigin::signed(1))); - assert_eq!(System::account(1).consumers, 0); - assert!(Deposit::deposit_of(1).is_none()); - - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1)); - assert_ok!(Deposit::stake(&1, 0)); - efflux(2 * MILLISECS_PER_MONTH); - assert_eq!(System::account(1).consumers, 1); - assert_ok!(Deposit::claim(RuntimeOrigin::signed(1))); - assert_eq!(System::account(1).consumers, 1); - assert!(Deposit::deposit_of(1).is_some()); - - assert_ok!(Deposit::unstake(&1, 0)); - assert_eq!(System::account(1).consumers, 1); - assert_ok!(Deposit::claim(RuntimeOrigin::signed(1))); - assert_eq!(System::account(1).consumers, 0); + assert_ok!(Deposit::migrate_for(RuntimeOrigin::signed(1), 1)); assert!(Deposit::deposit_of(1).is_none()); }); } #[test] -fn claim_with_penalty_should_work() { - new_test_ext().execute_with(|| { - assert_eq!(Balances::free_balance(1), 1_000 * UNIT); - assert!(Deposit::deposit_of(1).is_none()); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1)); - assert_eq!(Balances::free_balance(1), 999 * UNIT); - assert!(Deposit::deposit_of(1).is_some()); - - assert_noop!( - Deposit::claim_with_penalty(RuntimeOrigin::signed(1), 0), - >::BalanceLow - ); +fn on_idle_should_work() { + fn mock_deposits(count: u16) -> BoundedVec> { + BoundedVec::truncate_from( + (0..count) + .map(|id| DepositS { id, value: 1, start_time: 0, expired_time: 0, in_use: false }) + .collect(), + ) + } - assert_ok!(KtonMinting::mint(&1, UNIT)); - mock::set_in_use(1, true); - - assert_noop!( - Deposit::claim_with_penalty(RuntimeOrigin::signed(1), 0), - >::DepositInUse - ); - - mock::set_in_use(1, false); - - assert_ok!(Deposit::claim_with_penalty(RuntimeOrigin::signed(1), 0)); - assert_eq!(Balances::free_balance(1), 1_000 * UNIT); - assert_eq!(Assets::balance(0, 1), 999_984_771_573_604_062); - assert!(Deposit::deposit_of(1).is_none()); - - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1)); - efflux(MILLISECS_PER_MONTH); - assert!(Deposit::deposit_of(1).is_some()); - - assert_noop!( - Deposit::claim_with_penalty(RuntimeOrigin::signed(1), 0), - >::DepositAlreadyExpired - ); - }); -} - -#[test] -fn migrate_should_work() { new_test_ext().execute_with(|| { - assert_ok!(Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1)); - assert!(Deposit::deposit_of(1).is_some()); - - mock::set_in_use(1, true); - - assert_noop!(Deposit::migrate(RuntimeOrigin::signed(1), 1), >::DepositInUse); - - mock::set_in_use(1, false); - - assert_ok!(Deposit::migrate(RuntimeOrigin::signed(1), 1)); + let _ = Balances::deposit_creating(&account_id(), 10_000); + + >::insert(1, mock_deposits(512)); + >::insert(2, mock_deposits(512)); + >::insert(3, mock_deposits(512)); + assert_eq!(Deposit::deposit_of(1).unwrap().len(), 512); + assert_eq!(Deposit::deposit_of(2).unwrap().len(), 512); + assert_eq!(Deposit::deposit_of(3).unwrap().len(), 512); + + AllPalletsWithSystem::on_idle(0, Weight::zero()); + assert_eq!(Deposit::deposit_of(1).unwrap().len(), 512); + assert_eq!(Deposit::deposit_of(2).unwrap().len(), 512); + assert_eq!(Deposit::deposit_of(3).unwrap().len(), 512); + AllPalletsWithSystem::on_idle(0, Weight::MAX); + assert!(Deposit::deposit_of(1).is_none()); + assert!(Deposit::deposit_of(2).is_none()); + assert!(Deposit::deposit_of(3).is_none()); + + // --- + + >::insert(1, mock_deposits(512)); + >::insert(2, mock_deposits(512)); + >::insert(3, mock_deposits(512)); + assert_eq!(Deposit::deposit_of(1).unwrap().len(), 512); + assert_eq!(Deposit::deposit_of(2).unwrap().len(), 512); + assert_eq!(Deposit::deposit_of(3).unwrap().len(), 512); + + AllPalletsWithSystem::on_idle(0, Weight::zero().add_ref_time(256)); + assert_eq!(Deposit::deposit_of(1).unwrap().len(), 512); + assert_eq!(Deposit::deposit_of(2).unwrap().len(), 512); + // 512 - 256 / 10 * 10 = 252 + assert_eq!(Deposit::deposit_of(3).unwrap().len(), 262); + AllPalletsWithSystem::on_idle(0, Weight::zero().add_ref_time(1_234)); assert!(Deposit::deposit_of(1).is_none()); + // 512 => 520 weight + // 1_234 - 520 * 2 = 194 + // 262 - 194 / 10 * 10 = 72 + assert_eq!(Deposit::deposit_of(2).unwrap().len(), 72); + assert!(Deposit::deposit_of(3).is_none()); }); } diff --git a/pallet/deposit/src/weights.rs b/pallet/deposit/src/weights.rs index cd6aeeb2e..ced0977ed 100644 --- a/pallet/deposit/src/weights.rs +++ b/pallet/deposit/src/weights.rs @@ -52,72 +52,13 @@ use core::marker::PhantomData; /// Weight functions needed for darwinia_deposit. pub trait WeightInfo { - fn lock() -> Weight; - fn claim() -> Weight; - fn claim_with_penalty() -> Weight; - fn migrate() -> Weight; + fn migrate_for() -> Weight; fn set_deposit_contract() -> Weight; } /// Weights for darwinia_deposit using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - fn lock() -> Weight { - // Proof Size summary in bytes: - // Measured: `26812` - // Estimated: `29615` - // Minimum execution time: 92_000 nanoseconds. - Weight::from_parts(98_000_000, 0) - .saturating_add(Weight::from_parts(29615, 0)) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn claim() -> Weight { - // Proof Size summary in bytes: - // Measured: `26541` - // Estimated: `29615` - // Minimum execution time: 70_000 nanoseconds. - Weight::from_parts(82_000_000, 0) - .saturating_add(Weight::from_parts(29615, 0)) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn claim_with_penalty() -> Weight { - // Proof Size summary in bytes: - // Measured: `26863` - // Estimated: `29615` - // Minimum execution time: 92_000 nanoseconds. - Weight::from_parts(100_000_000, 0) - .saturating_add(Weight::from_parts(29615, 0)) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } /// Storage: `Deposit::Deposits` (r:1 w:1) /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// Storage: `Timestamp::Now` (r:1 w:0) @@ -134,7 +75,7 @@ impl WeightInfo for SubstrateWeight { /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Ethereum::Pending` (r:1 w:1) /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn migrate() -> Weight { + fn migrate_for() -> Weight { // Proof Size summary in bytes: // Measured: `27516` // Estimated: `33456` @@ -159,62 +100,6 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - fn lock() -> Weight { - // Proof Size summary in bytes: - // Measured: `26812` - // Estimated: `29615` - // Minimum execution time: 92_000 nanoseconds. - Weight::from_parts(98_000_000, 0) - .saturating_add(Weight::from_parts(29615, 0)) - .saturating_add(RocksDbWeight::get().reads(5_u64)) - .saturating_add(RocksDbWeight::get().writes(4_u64)) - } - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn claim() -> Weight { - // Proof Size summary in bytes: - // Measured: `26541` - // Estimated: `29615` - // Minimum execution time: 70_000 nanoseconds. - Weight::from_parts(82_000_000, 0) - .saturating_add(Weight::from_parts(29615, 0)) - .saturating_add(RocksDbWeight::get().reads(3_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - } - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn claim_with_penalty() -> Weight { - // Proof Size summary in bytes: - // Measured: `26863` - // Estimated: `29615` - // Minimum execution time: 92_000 nanoseconds. - Weight::from_parts(100_000_000, 0) - .saturating_add(Weight::from_parts(29615, 0)) - .saturating_add(RocksDbWeight::get().reads(5_u64)) - .saturating_add(RocksDbWeight::get().writes(4_u64)) - } /// Storage: `Deposit::Deposits` (r:1 w:1) /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// Storage: `Timestamp::Now` (r:1 w:0) @@ -231,7 +116,7 @@ impl WeightInfo for () { /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Ethereum::Pending` (r:1 w:1) /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn migrate() -> Weight { + fn migrate_for() -> Weight { // Proof Size summary in bytes: // Measured: `27516` // Estimated: `33456` diff --git a/pallet/staking/Cargo.toml b/pallet/staking/Cargo.toml index 07ac07172..1a96de304 100644 --- a/pallet/staking/Cargo.toml +++ b/pallet/staking/Cargo.toml @@ -15,7 +15,6 @@ scale-info = { workspace = true } # darwinia darwinia-ethtx-forwarder = { workspace = true } -darwinia-staking-traits = { workspace = true } dc-inflation = { workspace = true } dc-types = { workspace = true } # darwinia optional @@ -61,7 +60,6 @@ std = [ # darwinia "darwinia-ethtx-forwarder/std", - "darwinia-staking-traits/std", "dc-inflation/std", # darwinia optional "darwinia-deposit?/std", @@ -86,7 +84,6 @@ runtime-benchmarks = [ # darwinia "darwinia-deposit", "darwinia-ethtx-forwarder/runtime-benchmarks", - "darwinia-staking-traits/runtime-benchmarks", # polkadot-sdk "frame-benchmarking/runtime-benchmarks", diff --git a/pallet/staking/src/benchmarking.rs b/pallet/staking/src/benchmarking.rs index 5a93666e8..9d72a1b35 100644 --- a/pallet/staking/src/benchmarking.rs +++ b/pallet/staking/src/benchmarking.rs @@ -119,8 +119,7 @@ mod benchmarks { fn chill() { let a = frame_benchmarking::whitelisted_caller::(); - // Remove `+ 1` after https://github.com/paritytech/substrate/pull/13655. - ::Ring::make_free_balance_be(&a, UNIT + 1); + ::Ring::make_free_balance_be(&a, UNIT); >::stake(RawOrigin::Signed(a.clone()).into(), UNIT, Default::default()).unwrap(); >::collect(RawOrigin::Signed(a.clone()).into(), Default::default()).unwrap(); @@ -138,22 +137,6 @@ mod benchmarks { let a = frame_benchmarking::whitelisted_caller::(); let a_cloned = a.clone(); - call_on_cache_v1!(>::insert( - &a, - Exposure { - commission: Perbill::zero(), - vote: 32, - nominators: (0..32) - .map(|i| IndividualExposure { - who: frame_benchmarking::account("", i, i), - vote: 1, - }) - .collect(), - }, - )) - .unwrap(); - >::insert(&a, 500); - #[extrinsic_call] _(RawOrigin::Signed(a), a_cloned); } diff --git a/pallet/staking/src/lib.rs b/pallet/staking/src/lib.rs index be6b32a8d..a438ef8f4 100644 --- a/pallet/staking/src/lib.rs +++ b/pallet/staking/src/lib.rs @@ -22,13 +22,7 @@ //! //! This is a completely specialized stake pallet designed only for Darwinia parachain. //! So, this pallet will eliminate the generic parameters as much as possible. -//! -//! ### Acceptable stakes: -//! - RING: Darwinia's native token -//! - Deposit: Locking RINGs' ticket -// TODO: check this after the migration is complete. -#![allow(clippy::needless_borrows_for_generic_args)] #![cfg_attr(not(feature = "std"), no_std)] #![deny(missing_docs)] #![allow(clippy::needless_borrows_for_generic_args)] @@ -44,8 +38,6 @@ mod benchmarking; mod weights; pub use weights::WeightInfo; -pub use darwinia_staking_traits::*; - // crates.io use codec::FullCodec; use ethabi::{Function, Param, ParamType, StateMutability, Token}; @@ -54,10 +46,10 @@ use dc_types::{Balance, Moment}; // polkadot-sdk use frame_support::{ pallet_prelude::*, - traits::{Currency, UnixTime}, - DefaultNoBound, EqNoBound, PalletId, PartialEqNoBound, + traits::{Currency, ExistenceRequirement, UnixTime}, + DefaultNoBound, PalletId, }; -use frame_system::{pallet_prelude::*, RawOrigin}; +use frame_system::pallet_prelude::*; use pallet_session::ShouldEndSession as _; use sp_core::H160; use sp_runtime::{ @@ -66,30 +58,9 @@ use sp_runtime::{ }; use sp_std::{collections::btree_map::BTreeMap, prelude::*}; -/// Make it easier to call a function on a specific exposure storage. -#[macro_export] -macro_rules! call_on_cache_v1 { - ($s_e:expr, <$s:ident<$t:ident>>$($f:tt)*) => {{ - match $s_e { - ($crate::CacheState::$s, _, _) => Ok(<$crate::ExposureCache0<$t>>$($f)*), - (_, $crate::CacheState::$s, _) => Ok(<$crate::ExposureCache1<$t>>$($f)*), - (_, _, $crate::CacheState::$s) => Ok(<$crate::ExposureCache2<$t>>$($f)*), - _ => { - log::error!("exposure cache states must be correct; qed"); - - Err("[pallet::staking] exposure cache states must be correct; qed") - }, - } - }}; - (<$s:ident<$t:ident>>$($f:tt)*) => {{ - let s = <$crate::CacheStates<$t>>::get(); - - $crate::call_on_cache_v1!(s, <$s<$t>>$($f)*) - }}; -} /// Make it easier to call a function on a specific collators storage. #[macro_export] -macro_rules! call_on_cache_v2 { +macro_rules! call_on_cache { ($s_e:expr, <$s:ident<$t:ident>>$($f:tt)*) => {{ match $s_e { ($crate::CacheState::$s, _, _) => Ok(<$crate::CollatorsCache0<$t>>$($f)*), @@ -105,32 +76,19 @@ macro_rules! call_on_cache_v2 { (<$s:ident<$t:ident>>$($f:tt)*) => {{ let s = <$crate::CacheStates<$t>>::get(); - $crate::call_on_cache_v2!(s, <$s<$t>>$($f)*) + $crate::call_on_cache!(s, <$s<$t>>$($f)*) }}; } -type DepositId = <::Deposit as Stake>::Item; - const PAYOUT_FRAC: Perbill = Perbill::from_percent(40); -const DAY_IN_MILLIS: Moment = 24 * 60 * 60 * 1_000; #[frame_support::pallet] pub mod pallet { // darwinia use crate::*; - // Deposit helper for runtime benchmark. - #[cfg(feature = "runtime-benchmarks")] - use darwinia_deposit::Config as DepositConfig; - - const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); - - /// Empty trait acts as a place holder to satisfy the `#[pallet::config]` macro. - #[cfg(not(feature = "runtime-benchmarks"))] - pub trait DepositConfig {} - #[pallet::config] - pub trait Config: frame_system::Config + DepositConfig { + pub trait Config: frame_system::Config { /// Override the [`frame_system::Config::RuntimeEvent`]. type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -149,12 +107,6 @@ pub mod pallet { /// Inflation and reward manager. type IssuingManager: IssuingManager; - /// RING [`Stake`] interface. - type Ring: Stake; - - /// Deposit [`StakeExt`] interface. - type Deposit: StakeExt; - /// RING staking interface. type RingStaking: Election + Reward; @@ -163,22 +115,12 @@ pub mod pallet { /// Treasury address. type Treasury: Get; - - /// Maximum deposit count. - #[pallet::constant] - type MaxDeposits: Get; } #[allow(missing_docs)] #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - /// An account has staked some assets. - Staked { who: T::AccountId, ring_amount: Balance, deposits: Vec> }, - /// An account has unstaked assets. - Unstaked { who: T::AccountId, ring_amount: Balance, deposits: Vec> }, - /// A collator has updated their commission. - CommissionUpdated { who: T::AccountId, commission: Perbill }, /// A payout has been made for the staker. Payout { who: T::AccountId, amount: Balance }, /// Unable to pay the staker's reward. @@ -187,18 +129,10 @@ pub mod pallet { #[pallet::error] pub enum Error { - /// Exceed maximum deposit count. - ExceedMaxDeposits, - /// Exceed rate limit. - ExceedRateLimit, - /// Deposit not found. - DepositNotFound, - /// You are not a staker. - NotStaker, - /// Target is not a collator. - TargetNotCollator, /// Collator count mustn't be zero. ZeroCollatorCount, + /// No record for the account. + NoRecord, /// No reward to pay for this collator. NoReward, } @@ -206,14 +140,9 @@ pub mod pallet { /// All staking ledgers. #[pallet::storage] #[pallet::getter(fn ledger_of)] - pub type Ledgers = StorageMap<_, Blake2_128Concat, T::AccountId, Ledger>; - - /// The map from (wannabe) collator to the preferences of that collator. - #[pallet::storage] - #[pallet::getter(fn collator_of)] - pub type Collators = StorageMap<_, Twox64Concat, T::AccountId, Perbill>; + pub type Ledgers = StorageMap<_, Blake2_128Concat, T::AccountId, Ledger>; - /// Collator/Exposure cache states. + /// Cache states. /// /// To avoid extra DB RWs during new session, such as: /// ```nocompile @@ -245,38 +174,11 @@ pub mod pallet { (CacheState::Previous, CacheState::Current, CacheState::Next) } - /// Exposure cache 0. - #[pallet::storage] - #[pallet::unbounded] - #[pallet::getter(fn exposure_cache_0_of)] - pub type ExposureCache0 = - StorageMap<_, Twox64Concat, T::AccountId, Exposure>; - - /// Exposure cache 1. - #[pallet::storage] - #[pallet::unbounded] - #[pallet::getter(fn exposure_cache_1_of)] - pub type ExposureCache1 = - StorageMap<_, Twox64Concat, T::AccountId, Exposure>; - - /// Exposure cache 2. - #[pallet::storage] - #[pallet::unbounded] - #[pallet::getter(fn exposure_cache_2_of)] - pub type ExposureCache2 = - StorageMap<_, Twox64Concat, T::AccountId, Exposure>; - /// The ideal number of active collators. #[pallet::storage] #[pallet::getter(fn collator_count)] pub type CollatorCount = StorageValue<_, u32, ValueQuery>; - /// The map from nominator to their nomination preferences, namely the collator that - /// they wish to support. - #[pallet::storage] - #[pallet::getter(fn nominator_of)] - pub type Nominators = StorageMap<_, Twox64Concat, T::AccountId, T::AccountId>; - /// Number of blocks authored by the collator within current session. #[pallet::storage] #[pallet::unbounded] @@ -300,20 +202,6 @@ pub mod pallet { #[pallet::getter(fn elapsed_time)] pub type ElapsedTime = StorageValue<_, Moment, ValueQuery>; - /// Rate limit. - /// - /// The maximum amount of RING that can be staked or unstaked in one session. - #[pallet::storage] - #[pallet::getter(fn rate_limit)] - pub type RateLimit = StorageValue<_, Balance, ValueQuery>; - - /// Rate limit state. - /// - /// Tracks the rate limit state in a session. - #[pallet::storage] - #[pallet::getter(fn rate_limit_state)] - pub type RateLimitState = StorageValue<_, RateLimiter, ValueQuery>; - /// RING staking contract address. #[pallet::storage] #[pallet::getter(fn ring_staking_contract)] @@ -323,25 +211,20 @@ pub mod pallet { #[pallet::getter(fn kton_staking_contract)] pub type KtonStakingContract = StorageValue<_, T::AccountId>; - /// Migration start point. - #[pallet::storage] - #[pallet::getter(fn migration_start_point)] - pub type MigrationStartPoint = StorageValue<_, Moment, ValueQuery>; - // TODO: use `BoundedVec`. - /// Exposure cache 0. + /// Collators cache 0. #[pallet::storage] #[pallet::unbounded] #[pallet::getter(fn collators_cache_0)] pub type CollatorsCache0 = StorageValue<_, Vec, ValueQuery>; - /// Exposure cache 1. + /// Collators cache 1. #[pallet::storage] #[pallet::unbounded] #[pallet::getter(fn collators_cache_1)] pub type CollatorsCache1 = StorageValue<_, Vec, ValueQuery>; - /// Exposure cache 2. + /// Collators cache 2. #[pallet::storage] #[pallet::unbounded] #[pallet::getter(fn collators_cache_2)] @@ -354,12 +237,9 @@ pub mod pallet { pub now: Moment, /// The running time of Darwinia1. pub elapsed_time: Moment, - /// Rate limit. - pub rate_limit: Balance, /// Genesis collator count. pub collator_count: u32, - /// Genesis collator preferences. - pub collators: Vec<(T::AccountId, Balance)>, + _marker: PhantomData, } #[pallet::genesis_build] @@ -371,26 +251,11 @@ pub mod pallet { >::put(self.now); >::put(self.elapsed_time); - >::put(self.rate_limit); >::put(self.collator_count); - - self.collators.iter().for_each(|(who, ring_amount)| { - >::stake( - RawOrigin::Signed(who.to_owned()).into(), - *ring_amount, - Vec::new(), - ) - .expect("[pallet::staking] 0, genesis must be built; qed"); - >::collect(RawOrigin::Signed(who.to_owned()).into(), Default::default()) - .expect("[pallet::staking] 1, genesis must be built; qed"); - >::nominate(RawOrigin::Signed(who.to_owned()).into(), who.to_owned()) - .expect("[pallet::staking] 2, genesis must be built; qed"); - }); } } #[pallet::pallet] - #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); #[pallet::hooks] impl Hooks> for Pallet { @@ -398,7 +263,7 @@ pub mod pallet { // There are already plenty of tasks to handle during the new session, // so refrain from assigning any additional ones here. if !T::ShouldEndSession::get() { - let w2 = call_on_cache_v2!(>::get()) + call_on_cache!(>::get()) .map(|cs| { let mut cs = cs.into_iter(); let w = cs @@ -406,196 +271,71 @@ pub mod pallet { // ? make this value adjustable. .take(1) .fold(Weight::zero(), |acc, c| { - acc + Self::payout_inner(c).unwrap_or(Zero::zero()) + acc + Self::payout_for_inner(c).unwrap_or(Zero::zero()) }); - let _ = call_on_cache_v2!(>::put(cs.collect::>())); + let _ = call_on_cache!(>::put(cs.collect::>())); w }) - .unwrap_or_default(); - let w1 = call_on_cache_v1!(>::iter_keys() - // ? make this value adjustable. - .take(1) - .fold(Weight::zero(), |acc, c| acc - + Self::payout_inner(c).unwrap_or(Zero::zero()))) - .unwrap_or_default(); - - w1 + w2 + .unwrap_or_default() } else { Zero::zero() } } - } - #[pallet::call] - impl Pallet { - /// Add stakes to the staking pool. - /// - /// This will transfer the stakes to a pallet/contact account. - #[pallet::call_index(0)] - #[pallet::weight(::WeightInfo::stake(deposits.len() as _))] - pub fn stake( - origin: OriginFor, - ring_amount: Balance, - deposits: Vec>, - ) -> DispatchResult { - let who = ensure_signed(origin)?; - if ring_amount == 0 && deposits.is_empty() { - return Ok(()); - } - - let flow_in_amount = >::try_mutate(&who, |l| { - let l = if let Some(l) = l { - l - } else { - >::inc_consumers(&who)?; - - *l = Some(Ledger { ring: Default::default(), deposits: Default::default() }); - - l.as_mut().expect("[pallet::staking] `l` must be some; qed") - }; - let mut v = ring_amount; - - if ring_amount != 0 { - Self::stake_ring(&who, &mut l.ring, ring_amount)?; - } - - for d in deposits.clone() { - v = v.saturating_add(T::Deposit::amount(&who, d).unwrap_or_default()); - - Self::stake_deposit(&who, l, d)?; - } - - >::Ok(v) - })?; - - if let Some(r) = - >::get().flow_in(flow_in_amount, >::get()) - { - >::put(r); + fn on_idle(_: BlockNumberFor, mut remaining_weight: Weight) -> Weight { + // At least 1 read weight is required. + if let Some(rw) = remaining_weight.checked_sub(&T::DbWeight::get().reads(1)) { + remaining_weight = rw; } else { - Err(>::ExceedRateLimit)?; - } - - Self::deposit_event(Event::Staked { who, ring_amount, deposits }); - - Ok(()) - } - - /// Withdraw stakes from the staking pool. - #[pallet::call_index(1)] - #[pallet::weight(::WeightInfo::unstake(deposits.len() as _))] - pub fn unstake( - origin: OriginFor, - ring_amount: Balance, - deposits: Vec>, - ) -> DispatchResult { - let who = ensure_signed(origin)?; - - if ring_amount == 0 && deposits.is_empty() { - return Ok(()); + return remaining_weight; } - let flow_out_amount = >::try_mutate(&who, |l| { - let l = l.as_mut().ok_or(>::NotStaker)?; - let mut v = ring_amount; - - if ring_amount != 0 { - l.ring = l - .ring - .checked_sub(ring_amount) - .ok_or("[pallet::staking] `u128` must not be overflowed; qed")?; - - ::Ring::unstake(&who, ring_amount)?; - } - - for d in deposits { - v = v.saturating_add(T::Deposit::amount(&who, d).unwrap_or_default()); + #[cfg(feature = "test")] + let wt = Weight::zero().add_ref_time(1); + #[cfg(not(feature = "test"))] + let wt = T::WeightInfo::unstake_all(); + let mut ledger_to_migrate = Vec::new(); - l.deposits.remove( - l.deposits - .iter() - .position(|d_| d_ == &d) - .ok_or(>::DepositNotFound)?, - ); + for (w, l) in >::iter() { + if let Some(rw) = remaining_weight.checked_sub(&wt) { + remaining_weight = rw; - T::Deposit::unstake(&who, d)?; + ledger_to_migrate.push((w, l)); + } else { + break; } - - >::Ok(v) - })?; - - if let Some(r) = - >::get().flow_out(flow_out_amount, >::get()) - { - >::put(r); - } else { - Err(>::ExceedRateLimit)?; } - Self::try_clean_ledger_of(&who); - - Ok(()) - } - - /// Declare the desire to collect. - /// - /// Effects will be felt at the beginning of the next session. - #[pallet::call_index(4)] - #[pallet::weight(::WeightInfo::collect())] - pub fn collect(origin: OriginFor, commission: Perbill) -> DispatchResult { - let who = ensure_signed(origin)?; - - >::mutate(&who, |c| *c = Some(commission)); - - Self::deposit_event(Event::CommissionUpdated { who, commission }); - - Ok(()) - } - - /// Declare the desire to nominate a collator. - /// - /// Effects will be felt at the beginning of the next session. - #[pallet::call_index(5)] - #[pallet::weight(::WeightInfo::nominate())] - pub fn nominate(origin: OriginFor, target: T::AccountId) -> DispatchResult { - let who = ensure_signed(origin)?; - - if !>::contains_key(&who) { - Err(>::NotStaker)? + for (w, l) in ledger_to_migrate { + let _ = Self::unstake_all_for_inner(w, l); } - if !>::contains_key(&target) { - Err(>::TargetNotCollator)?; - } - - >::mutate(&who, |n| *n = Some(target)); - Ok(()) + remaining_weight } + } + #[pallet::call] + impl Pallet { + /// Withdraw all stakes from the staking pool. + #[pallet::call_index(1)] + #[pallet::weight(::WeightInfo::unstake_all())] + pub fn unstake_all_for(origin: OriginFor, who: T::AccountId) -> DispatchResult { + ensure_signed(origin)?; - /// Declare no desire to either collect or nominate. - /// - /// Effects will be felt at the beginning of the next era. - /// - /// If the target is a collator, its nominators need to re-nominate. - #[pallet::call_index(6)] - #[pallet::weight(::WeightInfo::chill())] - pub fn chill(origin: OriginFor) -> DispatchResult { - let who = ensure_signed(origin)?; + let l = >::take(&who).ok_or(>::NoRecord)?; - >::remove(&who); - >::remove(&who); + Self::unstake_all_for_inner(who, l)?; Ok(()) } - /// Making the payout for the specified collators and its nominators. + /// Making the payout for the specified. #[pallet::call_index(8)] - #[pallet::weight(::WeightInfo::payout())] - pub fn payout(origin: OriginFor, who: T::AccountId) -> DispatchResult { + #[pallet::weight(::WeightInfo::payout_for())] + pub fn payout_for(origin: OriginFor, who: T::AccountId) -> DispatchResult { ensure_signed(origin)?; - Self::payout_inner(who)?; + Self::payout_for_inner(who)?; Ok(()) } @@ -619,17 +359,6 @@ pub mod pallet { Ok(()) } - /// Set the max unstake RING limit. - #[pallet::call_index(9)] - #[pallet::weight(::WeightInfo::set_rate_limit())] - pub fn set_rate_limit(origin: OriginFor, amount: Balance) -> DispatchResult { - ensure_root(origin)?; - - >::put(amount); - - Ok(()) - } - /// Set the RING reward distribution contract address. #[pallet::call_index(11)] #[pallet::weight(::WeightInfo::set_ring_staking_contract())] @@ -662,69 +391,6 @@ pub mod pallet { where T: Config, { - fn stake_ring(who: &T::AccountId, staked: &mut Balance, amount: Balance) -> DispatchResult { - ::Ring::stake(who, amount)?; - - *staked = staked - .checked_add(amount) - .ok_or("[pallet::staking] `u128` must not be overflowed; qed")?; - - Ok(()) - } - - fn stake_deposit( - who: &T::AccountId, - ledger: &mut Ledger, - deposit: DepositId, - ) -> DispatchResult { - T::Deposit::stake(who, deposit)?; - - ledger.deposits.try_push(deposit).map_err(|_| >::ExceedMaxDeposits)?; - - Ok(()) - } - - fn try_clean_ledger_of(who: &T::AccountId) { - let _ = >::try_mutate(who, |maybe_l| { - let l = maybe_l.as_mut().ok_or(())?; - - if l.is_empty() { - *maybe_l = None; - - >::dec_consumers(who); - - Ok(()) - } else { - Err(()) - } - }); - } - - /// Update the record of block production. - pub fn note_authors(authors: &[T::AccountId]) { - >::mutate(|(total, map)| { - authors.iter().cloned().for_each(|c| { - *total += One::one(); - - map.entry(c).and_modify(|p_| *p_ += One::one()).or_insert(One::one()); - }); - }); - } - - /// Calculate the stakes of the given account. - pub fn stake_of(who: &T::AccountId) -> Balance { - >::get(who) - .map(|l| { - l.ring - + l.deposits - .into_iter() - // We don't care if the deposit exists here. - // It was guaranteed by the `stake`/`unstake`/`restake` functions. - .fold(0, |r, d| r + T::Deposit::amount(who, d).unwrap_or_default()) - }) - .unwrap_or_default() - } - /// Distribute the session reward to staking pot and update the stakers' reward record. pub fn distribute_session_reward(amount: Balance) { let who = ::Treasury::get(); @@ -748,84 +414,55 @@ pub mod pallet { T::KtonStaking::distribute(None, reward_k); } - /// Pay the reward to the collator and its nominators. - pub fn payout_inner(collator: T::AccountId) -> Result { - // Pay to V2. - if call_on_cache_v2!(>::get()).unwrap_or_default().contains(&collator) { + fn unstake_all_for_inner(who: T::AccountId, ledger: Ledger) -> DispatchResult { + T::Currency::transfer( + &account_id(), + &who, + ledger.ring, + ExistenceRequirement::AllowDeath, + )?; + + Ok(()) + } + + /// Pay the reward to the RING staking contract. + fn payout_for_inner(collator: T::AccountId) -> Result { + if call_on_cache!(>::get()).unwrap_or_default().contains(&collator) { T::RingStaking::distribute( Some(collator.clone()), >::take(&collator).ok_or(>::NoReward)?, ); - } - // Pay to V1. - else if let Ok(Some(c_exposure)) = call_on_cache_v1!(>::take(&collator)) { - let c_total_payout = - >::take(&collator).ok_or(>::NoReward)?; - let mut c_payout = c_exposure.commission * c_total_payout; - let n_payout = c_total_payout - c_payout; - for n_exposure in c_exposure.nominators { - let n_payout = - Perbill::from_rational(n_exposure.vote, c_exposure.vote) * n_payout; - - if collator == n_exposure.who { - // If the collator nominated themselves. - - c_payout += n_payout; - } else if T::IssuingManager::reward(&n_exposure.who, n_payout).is_ok() { - Self::deposit_event(Event::Payout { - who: n_exposure.who, - amount: n_payout, - }); - } else { - Self::deposit_event(Event::Unpaid { - who: n_exposure.who, - amount: n_payout, - }); - } - } - - if T::IssuingManager::reward(&collator, c_payout).is_ok() { - Self::deposit_event(Event::Payout { who: collator, amount: c_payout }); - } else { - Self::deposit_event(Event::Unpaid { who: collator, amount: c_payout }); - } } else { // Impossible case. Err(>::NoReward)?; } - Ok(::WeightInfo::payout()) + Ok(::WeightInfo::payout_for()) + } + + /// Update the record of block production. + fn note_authors(authors: &[T::AccountId]) { + >::mutate(|(total, map)| { + authors.iter().cloned().for_each(|c| { + *total += One::one(); + + map.entry(c).and_modify(|p_| *p_ += One::one()).or_insert(One::one()); + }); + }); } /// Prepare the session state. - pub fn prepare_new_session(index: u32) -> Option> { - >::kill(); + fn prepare_new_session(index: u32) -> Option> { >::shift_cache_states(); - #[allow(deprecated)] - call_on_cache_v1!(>::remove_all(None)).ok()?; - call_on_cache_v2!(>::kill()).ok()?; + call_on_cache!(>::kill()).ok()?; let bn = >::block_number(); log::info!("assembling new collators for new session {index} at #{bn:?}",); - let (n1, n2) = Self::elect_ns(); - // TODO: update this once the migration is completed. - // let cs_from_contract = Self::elect_from_contract(n1)?; - // let cs_from_pallet = Self::elect(n2)?; - let cs_from_contract = Self::elect_from_contract(n1).unwrap_or_default(); - let cs_from_pallet = Self::elect(n2) - .unwrap_or_default() - .into_iter() - .filter(|c| !cs_from_contract.contains(c)) - .collect(); - - log::info!("collators from contract {cs_from_contract:?}"); - log::info!("collators from pallet {cs_from_pallet:?}"); - - let cs = [cs_from_contract, cs_from_pallet].concat(); + let cs = Self::elect().unwrap_or_default(); if cs.is_empty() { // TODO: update this once the migration is completed. @@ -841,7 +478,7 @@ pub mod pallet { } } - /// Shift the exposure cache states. + /// Shift the cache states. /// /// Previous Current Next /// Next Previous Current @@ -850,87 +487,16 @@ pub mod pallet { /// ```nocompile /// loop { mutate(2, 0, 1) } /// ``` - pub fn shift_cache_states() { + fn shift_cache_states() { let (s0, s1, s2) = >::get(); >::put((s2, s0, s1)); } - /// Elect the new collators. - /// - /// This should only be called by the [`pallet_session::SessionManager::new_session`]. - pub fn elect(n: u32) -> Option> { - let nominators = >::iter().collect::>(); - let mut collators = >::iter() - .map(|(c, cm)| { - let scaler = Perbill::one() - cm; - let mut collator_v = 0; - let nominators = nominators - .iter() - .filter_map(|(n, c_)| { - if c_ == &c { - let nominator_v = scaler * Self::stake_of(n); - - collator_v += nominator_v; - - Some(IndividualExposure { who: n.to_owned(), vote: nominator_v }) - } else { - None - } - }) - .collect(); - - ((c, Exposure { commission: cm, vote: collator_v, nominators }), collator_v) - }) - .collect::>(); - - collators.sort_by(|(_, a), (_, b)| b.cmp(a)); - - let cache_states = >::get(); - - collators - .into_iter() - .take(n as _) - .map(|((c, e), _)| { - call_on_cache_v1!(cache_states, >::insert(&c, e)).map(|_| c).ok() - }) - .collect() - } - } - // Implementation part.2. - // - // After the migration is completed, - // the following implementation blocks will be merged into one. - impl Pallet - where - T: Config, - { - /// Elect the new collators. - pub fn elect_ns() -> (u32, u32) { - let n = >::get(); - let n1 = Self::migration_progress() * n; - let n2 = n - n1; - - log::info!("election ns {n1} + {n2}"); - - (n1, n2) - } - - fn migration_progress() -> Perbill { - const TOTAL: Moment = 30 * 2 * DAY_IN_MILLIS; - - let start = >::get(); - let prog = Perbill::from_rational(now::() - start, TOTAL); - - log::info!("migration progress {prog:?}"); - - prog - } - - fn elect_from_contract(n: u32) -> Option> { - let winners = T::RingStaking::elect(n)?; + fn elect() -> Option> { + let winners = T::RingStaking::elect(>::get())?; - call_on_cache_v2!(>::put(winners.clone())).ok()?; + call_on_cache!(>::put(winners.clone())).ok()?; Some(winners) } @@ -1012,55 +578,13 @@ pub trait Reward { } impl Reward for () {} -/// Staking rate limiter. -#[derive(Clone, Debug, PartialEq, Encode, Decode, MaxEncodedLen, TypeInfo)] -pub enum RateLimiter { - /// Positive balance. - Pos(Balance), - /// Negative balance. - Neg(Balance), -} -impl RateLimiter { - fn flow_in(self, amount: Balance, limit: Balance) -> Option { - match self { - Self::Pos(v) => v.checked_add(amount).filter(|&v| v <= limit).map(Self::Pos), - Self::Neg(v) => - if v >= amount { - Some(Self::Neg(v - amount)) - } else { - let v = amount - v; - - if v <= limit { - Some(Self::Pos(v)) - } else { - None - } - }, - } - } +/// UnstakeAll trait that stakes must be implemented. +pub trait UnstakeAll { + /// Account type. + type AccountId; - fn flow_out(self, amount: Balance, limit: Balance) -> Option { - match self { - Self::Pos(v) => - if v >= amount { - Some(Self::Pos(v - amount)) - } else { - let v = amount - v; - - if v <= limit { - Some(Self::Neg(v)) - } else { - None - } - }, - Self::Neg(v) => v.checked_add(amount).filter(|&new_v| new_v <= limit).map(Self::Neg), - } - } -} -impl Default for RateLimiter { - fn default() -> Self { - Self::Pos(0) - } + /// Withdraw all stakes from the staking pool. + fn unstake_all(who: &Self::AccountId) -> DispatchResult; } /// Cache state. @@ -1134,18 +658,14 @@ where if who == &treasury { Ok(()) } else { - T::Currency::transfer( - &treasury, - who, - amount, - frame_support::traits::ExistenceRequirement::KeepAlive, - ) + T::Currency::transfer(&treasury, who, amount, ExistenceRequirement::KeepAlive) } } } -/// A convertor from collators id. Since this pallet does not have stash/controller, this is -/// just identity. +/// A convertor from collators id. +/// +/// Since this pallet does not have stash/controller, this is just identity. pub struct IdentityCollator; impl Convert> for IdentityCollator { fn convert(t: T) -> Option { @@ -1154,50 +674,17 @@ impl Convert> for IdentityCollator { } /// Staking ledger. -#[derive(DebugNoBound, PartialEqNoBound, EqNoBound, Encode, Decode, MaxEncodedLen, TypeInfo)] -#[scale_info(skip_type_params(T))] -pub struct Ledger -where - T: Config, -{ +#[derive(Debug, PartialEq, Eq, Encode, Decode, MaxEncodedLen, TypeInfo)] +pub struct Ledger { /// Staked RING. pub ring: Balance, /// Staked deposits. - pub deposits: BoundedVec, ::MaxDeposits>, -} -impl Ledger -where - T: Config, -{ - fn is_empty(&self) -> bool { - self.ring == 0 && self.deposits.is_empty() - } -} - -/// A snapshot of the stake backing a single collator in the system. -#[cfg_attr(test, derive(Clone))] -#[derive(Encode, Decode, TypeInfo, RuntimeDebug)] -pub struct Exposure { - /// The commission of this collator. - pub commission: Perbill, - /// The total vote backing this collator. - pub vote: Balance, - /// Nominator staking map. - pub nominators: Vec>, -} -/// A snapshot of the staker's state. -#[cfg_attr(test, derive(Clone))] -#[derive(Encode, Decode, TypeInfo, RuntimeDebug)] -pub struct IndividualExposure { - /// Nominator. - pub who: AccountId, - /// Nominator's staking vote. - pub vote: Balance, + pub deposits: BoundedVec>, } -/// RING staking interface. +/// RING staking contract interface. /// -/// .https://github.com/darwinia-network/DIP-7/blob/2249e3baa065b7e6c42427810b722fafa37628f1/src/collator/CollatorSet.sol#L27. +/// https://github.com/darwinia-network/DIP-7/blob/2249e3baa065b7e6c42427810b722fafa37628f1/src/collator/CollatorSet.sol#L27. pub struct RingStaking(PhantomData); impl Election for RingStaking where @@ -1310,7 +797,7 @@ where } } -/// KTON staking interface. +/// KTON staking contract interface. pub struct KtonStaking(PhantomData); // Distribute the reward to KTON staking contract. // diff --git a/pallet/staking/src/mock.rs b/pallet/staking/src/mock.rs index 8f788f7b4..d2245aa9f 100644 --- a/pallet/staking/src/mock.rs +++ b/pallet/staking/src/mock.rs @@ -458,11 +458,7 @@ pub fn new_session() { } pub fn payout() { - crate::call_on_cache_v2!(>::get().into_iter().for_each(|c| { - let _ = Staking::payout_inner(c); - })) - .unwrap(); - crate::call_on_cache_v1!(>::iter_keys().for_each(|c| { + crate::call_on_cache!(>::get().into_iter().for_each(|c| { let _ = Staking::payout_inner(c); })) .unwrap(); diff --git a/pallet/staking/src/tests.rs b/pallet/staking/src/tests.rs index ed5f097de..9a661d12e 100644 --- a/pallet/staking/src/tests.rs +++ b/pallet/staking/src/tests.rs @@ -27,88 +27,8 @@ use frame_support::{assert_noop, assert_ok, BoundedVec}; use sp_runtime::{assert_eq_error_rate, DispatchError, Perbill}; #[test] -fn exposure_cache_states_should_work() { - ExtBuilder::default().build().execute_with(|| { - #[allow(deprecated)] - { - >::kill(); - >::remove_all(None); - >::remove_all(None); - >::remove_all(None); - - let e = Exposure { - commission: Default::default(), - vote: Default::default(), - nominators: Default::default(), - }; - - >::insert(AccountId(0), e.clone()); - >::insert(AccountId(1), e.clone()); - >::insert(AccountId(2), e); - } - - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_some()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_some()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_some()).unwrap()); - assert_eq!( - >::get(), - (CacheState::Previous, CacheState::Current, CacheState::Next) - ); - - Staking::shift_cache_states(); - - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_some()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_some()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_some()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_none()).unwrap()); - assert_eq!( - >::get(), - (CacheState::Next, CacheState::Previous, CacheState::Current) - ); - - Staking::shift_cache_states(); - - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_some()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_some()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_some()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_none()).unwrap()); - assert_eq!( - >::get(), - (CacheState::Current, CacheState::Next, CacheState::Previous) - ); - - Staking::shift_cache_states(); - - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_some()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_some()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(0)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(1)).is_none()).unwrap()); - assert!(call_on_cache_v1!(>::get(AccountId(2)).is_some()).unwrap()); - assert_eq!( - >::get(), - (CacheState::Previous, CacheState::Current, CacheState::Next) - ); - }); +fn exposure_cache_should_work() { + ExtBuilder::default().build().execute_with(|| {}); } #[test] @@ -605,341 +525,7 @@ fn auto_payout_should_work() { #[test] fn on_new_session_should_work() { - ExtBuilder::default().collator_count(2).genesis_collator().build().execute_with(|| { - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(1), AccountId(2)] - ); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(1), AccountId(2)] - ); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(1), AccountId(2)] - ); - - assert_ok!(Staking::collect(RuntimeOrigin::signed(AccountId(3)), Perbill::zero())); - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(3)), 2, Vec::new())); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(3)), AccountId(3))); - Staking::note_authors(&Session::validators()); - - new_session(); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(1), AccountId(2)] - ); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(1), AccountId(2)] - ); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(3), AccountId(2)] - ); - - assert_ok!(Staking::chill(RuntimeOrigin::signed(AccountId(3)))); - assert_ok!(Staking::collect(RuntimeOrigin::signed(AccountId(4)), Perbill::zero())); - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(4)), 2, Vec::new())); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(4)), AccountId(4))); - Staking::note_authors(&Session::validators()); - - new_session(); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(1), AccountId(2)] - ); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(3), AccountId(2)] - ); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(4), AccountId(2)] - ); - - assert_ok!(Staking::chill(RuntimeOrigin::signed(AccountId(4)))); - assert_ok!(Staking::collect(RuntimeOrigin::signed(AccountId(5)), Perbill::zero())); - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(5)), 2, Vec::new())); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(5)), AccountId(5))); - Staking::note_authors(&Session::validators()); - - new_session(); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(3), AccountId(2)] - ); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(4), AccountId(2)] - ); - assert_eq!( - crate::call_on_cache_v1!(>::iter_keys().collect::>()).unwrap(), - [AccountId(5), AccountId(2)] - ); - }); -} - -#[test] -fn rate_limiter_should_work() { - let r = RateLimiter::default(); - let r = r.flow_in(1, 3).unwrap(); - assert_eq!(r, RateLimiter::Pos(1)); - - let r = r.flow_in(2, 3).unwrap(); - assert_eq!(r, RateLimiter::Pos(3)); - assert!(r.clone().flow_in(1, 3).is_none()); - - let r = r.flow_out(1, 3).unwrap(); - assert_eq!(r, RateLimiter::Pos(2)); - - let r = r.flow_out(2, 3).unwrap(); - assert_eq!(r, RateLimiter::Pos(0)); - - let r = r.flow_out(1, 3).unwrap(); - assert_eq!(r, RateLimiter::Neg(1)); - - let r = r.flow_out(2, 3).unwrap(); - assert_eq!(r, RateLimiter::Neg(3)); - assert!(r.clone().flow_out(1, 3).is_none()); - - let r = r.flow_in(1, 3).unwrap(); - assert_eq!(r, RateLimiter::Neg(2)); - - let r = r.flow_in(2, 3).unwrap(); - assert_eq!(r, RateLimiter::Neg(0)); - - let r = r.flow_in(1, 3).unwrap(); - assert_eq!(r, RateLimiter::Pos(1)); - - let r = RateLimiter::Pos(3); - assert_eq!(r.flow_out(6, 3).unwrap(), RateLimiter::Neg(3)); - - let r = RateLimiter::Neg(3); - assert_eq!(r.flow_in(6, 3).unwrap(), RateLimiter::Pos(3)); -} - -#[test] -fn elect_ns_should_work() { - ExtBuilder::default().collator_count(100).build().execute_with(|| { - [ - (0, 100), - (2, 98), - (3, 97), - (5, 95), - (7, 93), - (8, 92), - (10, 90), - (12, 88), - (13, 87), - (15, 85), - (17, 83), - (18, 82), - (20, 80), - (22, 78), - (23, 77), - (25, 75), - (27, 73), - (28, 72), - (30, 70), - (32, 68), - (33, 67), - (35, 65), - (37, 63), - (38, 62), - (40, 60), - (42, 58), - (43, 57), - (45, 55), - (47, 53), - (48, 52), - (50, 50), - (52, 48), - (53, 47), - (55, 45), - (57, 43), - (58, 42), - (60, 40), - (62, 38), - (63, 37), - (65, 35), - (67, 33), - (68, 32), - (70, 30), - (72, 28), - (73, 27), - (75, 25), - (77, 23), - (78, 22), - (80, 20), - (82, 18), - (83, 17), - (85, 15), - (87, 13), - (88, 12), - (90, 10), - (92, 8), - (93, 7), - (95, 5), - (97, 3), - (98, 2), - (100, 0), - (100, 0), - ] - .iter() - .for_each(|exp| { - assert_eq!(exp, &>::elect_ns()); - - Efflux::time(DAY_IN_MILLIS); - }); - }); -} - -#[test] -fn hybrid_election_should_work() { - ExtBuilder::default().collator_count(10).build().execute_with(|| { - mock::preset_collator_wait_list(10); - new_session(); - new_session(); - - assert_eq!( - (10..20).rev().map(AccountId).collect::>(), - >::get() - ); - - Timestamp::set_timestamp(15 * DAY_IN_MILLIS); - new_session(); - new_session(); - - assert_eq!( - (100..102).map(AccountId).chain((12..20).rev().map(AccountId)).collect::>(), - >::get() - ); - - Timestamp::set_timestamp(30 * DAY_IN_MILLIS); - new_session(); - new_session(); - - assert_eq!( - (100..105).map(AccountId).chain((15..20).rev().map(AccountId)).collect::>(), - >::get() - ); - - Timestamp::set_timestamp(45 * DAY_IN_MILLIS); - new_session(); - new_session(); - - assert_eq!( - (100..107).map(AccountId).chain((17..20).rev().map(AccountId)).collect::>(), - >::get() - ); - - Timestamp::set_timestamp(60 * DAY_IN_MILLIS); - new_session(); - new_session(); - - assert_eq!( - (100..110).map(AccountId).collect::>(), - >::get() - ); - }); -} - -#[test] -fn dedup_election_should_work() { - ExtBuilder::default().collator_count(10).build().execute_with(|| { - let who = AccountId(100); - let _ = >::deposit_creating(&who, 100 as _); - - assert_ok!(Staking::stake(RuntimeOrigin::signed(who), 100 as _, Vec::new())); - assert_ok!(Staking::collect(RuntimeOrigin::signed(who), Perbill::zero())); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(who), who)); - - Timestamp::set_timestamp(30 * DAY_IN_MILLIS); - new_session(); - new_session(); - - assert_eq!(vec![who], >::get()); - }); -} - -#[test] -fn hybrid_payout_should_work() { - ExtBuilder::default().collator_count(10).inflation_type(1).build().execute_with(|| { - mock::preset_collator_wait_list(10); - Timestamp::set_timestamp(30 * DAY_IN_MILLIS); - new_session(); - new_session(); - - let collators = - (100..105).map(AccountId).chain((15..20).rev().map(AccountId)).collect::>(); - assert_eq!(collators, >::get()); - - let collators_balances = collators.iter().map(Balances::free_balance).collect::>(); - Staking::note_authors(&collators); - new_session(); - payout(); - - assert_eq!( - [1_000 * UNIT; 10].as_slice(), - collators - .into_iter() - .map(Balances::free_balance) - .zip(collators_balances) - .map(|(a, b)| a - b) - .collect::>() - ); - }); -} - -#[test] -fn hybrid_auto_payout_should_work() { - ExtBuilder::default().collator_count(4).inflation_type(1).build().execute_with(|| { - mock::preset_collator_wait_list(4); - Timestamp::set_timestamp(30 * DAY_IN_MILLIS); - new_session(); - new_session(); - - let collators = - (100..102).map(AccountId).chain((12..14).rev().map(AccountId)).collect::>(); - assert_eq!(collators, >::get()); - - let collators_balances = collators.iter().map(Balances::free_balance).collect::>(); - Staking::note_authors(&collators); - new_session(); - - assert_eq!( - vec![0, 0, 0, 0], - collators - .iter() - .map(Balances::free_balance) - .zip(collators_balances.clone()) - .map(|(a, b)| a - b) - .collect::>() - ); - - Efflux::block(1); - assert_eq!( - vec![2_500 * UNIT, 0, 0, 2_500 * UNIT], - collators - .iter() - .map(Balances::free_balance) - .zip(collators_balances.clone()) - .map(|(a, b)| a - b) - .collect::>() - ); - - Efflux::block(1); - assert_eq!( - vec![2_500 * UNIT, 2_500 * UNIT, 2_500 * UNIT, 2_500 * UNIT], - collators - .iter() - .map(Balances::free_balance) - .zip(collators_balances.clone()) - .map(|(a, b)| a - b) - .collect::>() - ); - }); + ExtBuilder::default().collator_count(2).genesis_collator().build().execute_with(|| {}); } #[test] diff --git a/pallet/staking/src/weights.rs b/pallet/staking/src/weights.rs index ffa10a6b9..0034cf691 100644 --- a/pallet/staking/src/weights.rs +++ b/pallet/staking/src/weights.rs @@ -52,13 +52,8 @@ use core::marker::PhantomData; /// Weight functions needed for darwinia_staking. pub trait WeightInfo { - fn stake(x: u32, ) -> Weight; - fn unstake(x: u32, ) -> Weight; - fn collect() -> Weight; - fn nominate() -> Weight; - fn chill() -> Weight; - fn payout() -> Weight; - fn set_rate_limit() -> Weight; + fn unstake_all() -> Weight; + fn payout_for() -> Weight; fn set_ring_staking_contract() -> Weight; fn set_kton_staking_contract() -> Weight; fn set_collator_count() -> Weight; @@ -78,81 +73,15 @@ impl WeightInfo for SubstrateWeight { /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 1023]`. - fn stake(x: u32, ) -> Weight { + fn unstake_all() -> Weight { // Proof Size summary in bytes: - // Measured: `7088 + x * (25 ±0)` - // Estimated: `29615` - // Minimum execution time: 47_000 nanoseconds. - Weight::from_parts(859_853_520, 0) - .saturating_add(Weight::from_parts(29615, 0)) - // Standard Error: 267_757 - .saturating_add(Weight::from_parts(12_932_760, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - /// Storage: `DarwiniaStaking::Ledgers` (r:1 w:1) - /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimitState` (r:1 w:1) - /// Proof: `DarwiniaStaking::RateLimitState` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 1023]`. - fn unstake(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `7415 + x * (26 ±0)` - // Estimated: `29615` - // Minimum execution time: 50_000 nanoseconds. - Weight::from_parts(643_370_535, 0) - .saturating_add(Weight::from_parts(29615, 0)) - // Standard Error: 274_835 - .saturating_add(Weight::from_parts(14_096_069, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - /// Storage: `DarwiniaStaking::Collators` (r:1 w:1) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - fn collect() -> Weight { - // Proof Size summary in bytes: - // Measured: `388` - // Estimated: `3497` - // Minimum execution time: 10_000 nanoseconds. - Weight::from_parts(12_000_000, 0) - .saturating_add(Weight::from_parts(3497, 0)) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `DarwiniaStaking::Ledgers` (r:1 w:0) - /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Collators` (r:1 w:0) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Nominators` (r:1 w:1) - /// Proof: `DarwiniaStaking::Nominators` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - fn nominate() -> Weight { - // Proof Size summary in bytes: - // Measured: `600` - // Estimated: `4543` - // Minimum execution time: 13_000 nanoseconds. - Weight::from_parts(14_000_000, 0) - .saturating_add(Weight::from_parts(4543, 0)) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `DarwiniaStaking::Nominators` (r:0 w:1) - /// Proof: `DarwiniaStaking::Nominators` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Collators` (r:0 w:1) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - fn chill() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_000 nanoseconds. - Weight::from_parts(6_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(2_u64)) + // Measured: `2330` + // Estimated: `83902` + // Minimum execution time: 535_000 nanoseconds. + Weight::from_parts(629_000_000, 0) + .saturating_add(Weight::from_parts(83902, 0)) + .saturating_add(T::DbWeight::get().reads(35_u64)) + .saturating_add(T::DbWeight::get().writes(34_u64)) } /// Storage: `DarwiniaStaking::ExposureCacheStates` (r:1 w:0) /// Proof: `DarwiniaStaking::ExposureCacheStates` (`max_values`: Some(1), `max_size`: Some(3), added: 498, mode: `MaxEncodedLen`) @@ -162,7 +91,7 @@ impl WeightInfo for SubstrateWeight { /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:32 w:32) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn payout() -> Weight { + fn payout_for() -> Weight { // Proof Size summary in bytes: // Measured: `2330` // Estimated: `83902` @@ -172,17 +101,6 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(35_u64)) .saturating_add(T::DbWeight::get().writes(34_u64)) } - /// Storage: `DarwiniaStaking::RateLimit` (r:0 w:1) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_rate_limit() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. - Weight::from_parts(3_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } /// Storage: `DarwiniaStaking::RingStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_ring_staking_contract() -> Weight { @@ -231,91 +149,7 @@ impl WeightInfo for () { /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 1023]`. - fn stake(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `7088 + x * (25 ±0)` - // Estimated: `29615` - // Minimum execution time: 47_000 nanoseconds. - Weight::from_parts(859_853_520, 0) - .saturating_add(Weight::from_parts(29615, 0)) - // Standard Error: 267_757 - .saturating_add(Weight::from_parts(12_932_760, 0).saturating_mul(x.into())) - .saturating_add(RocksDbWeight::get().reads(5_u64)) - .saturating_add(RocksDbWeight::get().writes(4_u64)) - } - /// Storage: `DarwiniaStaking::Ledgers` (r:1 w:1) - /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimitState` (r:1 w:1) - /// Proof: `DarwiniaStaking::RateLimitState` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 1023]`. - fn unstake(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `7415 + x * (26 ±0)` - // Estimated: `29615` - // Minimum execution time: 50_000 nanoseconds. - Weight::from_parts(643_370_535, 0) - .saturating_add(Weight::from_parts(29615, 0)) - // Standard Error: 274_835 - .saturating_add(Weight::from_parts(14_096_069, 0).saturating_mul(x.into())) - .saturating_add(RocksDbWeight::get().reads(5_u64)) - .saturating_add(RocksDbWeight::get().writes(4_u64)) - } - /// Storage: `DarwiniaStaking::Collators` (r:1 w:1) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - fn collect() -> Weight { - // Proof Size summary in bytes: - // Measured: `388` - // Estimated: `3497` - // Minimum execution time: 10_000 nanoseconds. - Weight::from_parts(12_000_000, 0) - .saturating_add(Weight::from_parts(3497, 0)) - .saturating_add(RocksDbWeight::get().reads(1_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - /// Storage: `DarwiniaStaking::Ledgers` (r:1 w:0) - /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Collators` (r:1 w:0) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Nominators` (r:1 w:1) - /// Proof: `DarwiniaStaking::Nominators` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - fn nominate() -> Weight { - // Proof Size summary in bytes: - // Measured: `600` - // Estimated: `4543` - // Minimum execution time: 13_000 nanoseconds. - Weight::from_parts(14_000_000, 0) - .saturating_add(Weight::from_parts(4543, 0)) - .saturating_add(RocksDbWeight::get().reads(3_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - /// Storage: `DarwiniaStaking::Nominators` (r:0 w:1) - /// Proof: `DarwiniaStaking::Nominators` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Collators` (r:0 w:1) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - fn chill() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_000 nanoseconds. - Weight::from_parts(6_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - } - /// Storage: `DarwiniaStaking::ExposureCacheStates` (r:1 w:0) - /// Proof: `DarwiniaStaking::ExposureCacheStates` (`max_values`: Some(1), `max_size`: Some(3), added: 498, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::ExposureCache2` (r:1 w:1) - /// Proof: `DarwiniaStaking::ExposureCache2` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `DarwiniaStaking::PendingRewards` (r:1 w:1) - /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:32 w:32) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn payout() -> Weight { + fn unstake_all() -> Weight { // Proof Size summary in bytes: // Measured: `2330` // Estimated: `83902` @@ -325,16 +159,15 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(35_u64)) .saturating_add(RocksDbWeight::get().writes(34_u64)) } - /// Storage: `DarwiniaStaking::RateLimit` (r:0 w:1) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_rate_limit() -> Weight { + fn payout_for() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. - Weight::from_parts(3_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Measured: `2330` + // Estimated: `83902` + // Minimum execution time: 535_000 nanoseconds. + Weight::from_parts(629_000_000, 0) + .saturating_add(Weight::from_parts(83902, 0)) + .saturating_add(RocksDbWeight::get().reads(35_u64)) + .saturating_add(RocksDbWeight::get().writes(34_u64)) } /// Storage: `DarwiniaStaking::RingStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) diff --git a/pallet/staking/traits/Cargo.toml b/pallet/staking/traits/Cargo.toml deleted file mode 100644 index 3e49557a2..000000000 --- a/pallet/staking/traits/Cargo.toml +++ /dev/null @@ -1,30 +0,0 @@ -[package] -authors.workspace = true -description = "Darwinia parachain staking's traits." -edition.workspace = true -name = "darwinia-staking-traits" -readme = "README.md" -version.workspace = true - -[dependencies] -# crates.io -codec = { workspace = true } -scale-info = { workspace = true } - -# polkadot-sdk -sp-runtime = { workspace = true } - -[features] -default = ["std"] -std = [ - # crates.io - "codec/std", - "scale-info/std", - - # polkadot-sdk - "sp-runtime/std", -] - -runtime-benchmarks = [ - "sp-runtime/runtime-benchmarks", -] diff --git a/pallet/staking/traits/src/lib.rs b/pallet/staking/traits/src/lib.rs deleted file mode 100644 index 98dbc7e53..000000000 --- a/pallet/staking/traits/src/lib.rs +++ /dev/null @@ -1,75 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -//! # Darwinia parachain staking's traits - -#![cfg_attr(not(feature = "std"), no_std)] -#![deny(missing_docs)] - -// core -use core::fmt::Debug; -// crates.io -use codec::{FullCodec, MaxEncodedLen}; -use scale_info::TypeInfo; -// polkadot-sdk -use sp_runtime::{DispatchError, DispatchResult}; - -/// Stake trait that stake items must be implemented. -pub trait Stake { - /// Account type. - type AccountId; - /// Stake item type. - /// - /// Basically, it's just a num type. - #[cfg(not(feature = "runtime-benchmarks"))] - type Item: Clone + Copy + Debug + PartialEq + FullCodec + MaxEncodedLen + TypeInfo; - /// Stake item type. - /// - /// Basically, it's just a num type. - #[cfg(feature = "runtime-benchmarks")] - type Item: Clone - + Copy - + Debug - + Default - + From - + PartialEq - + FullCodec - + MaxEncodedLen - + TypeInfo; - - /// Add stakes to the staking pool. - /// - /// This will transfer the stakes to a pallet/contact account. - fn stake(who: &Self::AccountId, item: Self::Item) -> DispatchResult; - - /// Withdraw stakes from the staking pool. - /// - /// This will transfer the stakes back to the staker's account. - fn unstake(who: &Self::AccountId, item: Self::Item) -> DispatchResult; -} - -/// Extended stake trait. -/// -/// Provide a way to access the deposit RING amount. -pub trait StakeExt: Stake { - /// Amount type. - type Amount; - - /// Get the staked amount. - fn amount(who: &Self::AccountId, item: Self::Item) -> Result; -} From 48443c5694472b3796f14daa5f5c6b0dc754bc5f Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Thu, 17 Oct 2024 16:57:16 +0800 Subject: [PATCH 02/17] Part.2 --- Cargo.lock | 1 - pallet/staking/Cargo.toml | 8 - pallet/staking/src/benchmarking.rs | 99 +---- pallet/staking/src/lib.rs | 381 ++++++----------- pallet/staking/src/mock.rs | 180 +++----- pallet/staking/src/tests.rs | 631 ++++++----------------------- pallet/staking/src/weights.rs | 12 +- 7 files changed, 311 insertions(+), 1001 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fd69a3d60..6ab30f853 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3008,7 +3008,6 @@ dependencies = [ name = "darwinia-staking" version = "6.7.1" dependencies = [ - "darwinia-deposit", "darwinia-ethtx-forwarder", "dc-inflation", "dc-types", diff --git a/pallet/staking/Cargo.toml b/pallet/staking/Cargo.toml index 1a96de304..9c20d6d35 100644 --- a/pallet/staking/Cargo.toml +++ b/pallet/staking/Cargo.toml @@ -17,8 +17,6 @@ scale-info = { workspace = true } darwinia-ethtx-forwarder = { workspace = true } dc-inflation = { workspace = true } dc-types = { workspace = true } -# darwinia optional -darwinia-deposit = { workspace = true, optional = true } # frontier fp-evm = { workspace = true } @@ -39,9 +37,6 @@ frame-benchmarking = { workspace = true, optional = true } pretty_env_logger = { version = "0.5" } serde = { version = "1.0", features = ["derive"] } -# darwinia -darwinia-deposit = { workspace = true, features = ["std"] } - # polkadot-sdk pallet-balances = { workspace = true, features = ["std"] } pallet-session = { workspace = true, features = ["std"] } @@ -61,8 +56,6 @@ std = [ # darwinia "darwinia-ethtx-forwarder/std", "dc-inflation/std", - # darwinia optional - "darwinia-deposit?/std", # frontier "fp-evm/std", @@ -82,7 +75,6 @@ std = [ runtime-benchmarks = [ # darwinia - "darwinia-deposit", "darwinia-ethtx-forwarder/runtime-benchmarks", # polkadot-sdk diff --git a/pallet/staking/src/benchmarking.rs b/pallet/staking/src/benchmarking.rs index 9d72a1b35..404fb2486 100644 --- a/pallet/staking/src/benchmarking.rs +++ b/pallet/staking/src/benchmarking.rs @@ -18,7 +18,6 @@ // darwinia use crate::*; -use darwinia_deposit::SimpleAsset; use dc_types::UNIT; // polkadot-sdk use frame_benchmarking::v2; @@ -32,108 +31,20 @@ mod benchmarks { // polkadot-sdk use frame_support::traits::Currency; - fn deposit_for(who: &T::AccountId, count: u32) -> Vec> - where - T: Config + darwinia_deposit::Config, - { - (0..count.min(<::MaxDeposits>::get()) as u16) - .map(|x| { - >::lock( - RawOrigin::Signed(who.to_owned()).into(), - UNIT, - 1, - ) - .unwrap(); - - x.into() - }) - .collect() - } - #[benchmark] - fn stake(x: Linear<0, 1_023>) { + fn unstake_all_for() { let a = frame_benchmarking::whitelisted_caller(); - - // Remove `+ 1` after https://github.com/paritytech/substrate/pull/13655. - ::Ring::make_free_balance_be(&a, 1_024 * UNIT + 1); - ::Kton::mint(&a, UNIT).unwrap(); - - let deposits = deposit_for::(&a, x); - - // Worst-case scenario: - // - // The total number of deposit items has reached `darwinia_deposits::Config::MaxDeposits`. - #[extrinsic_call] - _(RawOrigin::Signed(a), UNIT, deposits); - } - - #[benchmark] - fn unstake(x: Linear<0, 1_023>) { - let a = frame_benchmarking::whitelisted_caller(); - - // Remove `+ 1` after https://github.com/paritytech/substrate/pull/13655. - ::Ring::make_free_balance_be(&a, 1_024 * UNIT + 1); - ::Kton::mint(&a, UNIT).unwrap(); - - let deposits = deposit_for::(&a, x); - - >::stake(RawOrigin::Signed(a.clone()).into(), UNIT, deposits.clone()).unwrap(); - - // Worst-case scenario: - // - // The total number of deposit items has reached `darwinia_deposits::Config::MaxDeposits`. - #[extrinsic_call] - _(RawOrigin::Signed(a), UNIT, deposits); - } - - #[benchmark] - fn collect() { - let a = frame_benchmarking::whitelisted_caller(); - - // Worst-case scenario: - // - // None. - #[extrinsic_call] - _(RawOrigin::Signed(a), Default::default()); - } - - #[benchmark] - fn nominate() { - let a = frame_benchmarking::whitelisted_caller::(); let a_cloned = a.clone(); - // Remove `+ 1` after https://github.com/paritytech/substrate/pull/13655. - ::Ring::make_free_balance_be(&a, UNIT + 1); - - >::stake(RawOrigin::Signed(a.clone()).into(), UNIT, Default::default()).unwrap(); - >::collect(RawOrigin::Signed(a.clone()).into(), Default::default()).unwrap(); - // Worst-case scenario: // - // Nominate the target collator successfully. + // The total number of deposit items has reached `darwinia_deposits::Config::MaxDeposits`. #[extrinsic_call] _(RawOrigin::Signed(a), a_cloned); } #[benchmark] - fn chill() { - let a = frame_benchmarking::whitelisted_caller::(); - - ::Ring::make_free_balance_be(&a, UNIT); - - >::stake(RawOrigin::Signed(a.clone()).into(), UNIT, Default::default()).unwrap(); - >::collect(RawOrigin::Signed(a.clone()).into(), Default::default()).unwrap(); - >::nominate(RawOrigin::Signed(a.clone()).into(), a.clone()).unwrap(); - - // Worst-case scenario: - // - // Collect and nominate at the same time. - #[extrinsic_call] - _(RawOrigin::Signed(a)); - } - - #[benchmark] - fn payout() { + fn allocate_ring_staking_reward_of() { let a = frame_benchmarking::whitelisted_caller::(); let a_cloned = a.clone(); @@ -142,12 +53,12 @@ mod benchmarks { } #[benchmark] - fn set_rate_limit() { + fn set_ring_staking_contract() { // Worst-case scenario: // // Set successfully. #[extrinsic_call] - _(RawOrigin::Root, 1); + _(RawOrigin::Root, frame_benchmarking::whitelisted_caller::()); } #[benchmark] diff --git a/pallet/staking/src/lib.rs b/pallet/staking/src/lib.rs index a438ef8f4..845076eff 100644 --- a/pallet/staking/src/lib.rs +++ b/pallet/staking/src/lib.rs @@ -16,11 +16,11 @@ // You should have received a copy of the GNU General Public License // along with Darwinia. If not, see . -//! # Darwinia parachain staking pallet +//! # Darwinia Staking Pallet //! //! ## Overview //! -//! This is a completely specialized stake pallet designed only for Darwinia parachain. +//! This is a completely specialized stake pallet designed only for Darwinia. //! So, this pallet will eliminate the generic parameters as much as possible. #![cfg_attr(not(feature = "std"), no_std)] @@ -50,36 +50,13 @@ use frame_support::{ DefaultNoBound, PalletId, }; use frame_system::pallet_prelude::*; -use pallet_session::ShouldEndSession as _; use sp_core::H160; use sp_runtime::{ - traits::{AccountIdConversion, Convert, One, Zero}, + traits::{AccountIdConversion, Convert, One}, Perbill, }; use sp_std::{collections::btree_map::BTreeMap, prelude::*}; -/// Make it easier to call a function on a specific collators storage. -#[macro_export] -macro_rules! call_on_cache { - ($s_e:expr, <$s:ident<$t:ident>>$($f:tt)*) => {{ - match $s_e { - ($crate::CacheState::$s, _, _) => Ok(<$crate::CollatorsCache0<$t>>$($f)*), - (_, $crate::CacheState::$s, _) => Ok(<$crate::CollatorsCache1<$t>>$($f)*), - (_, _, $crate::CacheState::$s) => Ok(<$crate::CollatorsCache2<$t>>$($f)*), - _ => { - log::error!("collators cache states must be correct; qed"); - - Err("[pallet::staking] collators cache states must be correct; qed") - }, - } - }}; - (<$s:ident<$t:ident>>$($f:tt)*) => {{ - let s = <$crate::CacheStates<$t>>::get(); - - $crate::call_on_cache!(s, <$s<$t>>$($f)*) - }}; -} - const PAYOUT_FRAC: Perbill = Perbill::from_percent(40); #[frame_support::pallet] @@ -98,9 +75,6 @@ pub mod pallet { /// Unix time interface. type UnixTime: UnixTime; - /// Pass [`pallet_session::Config::ShouldEndSession`]'s result to here. - type ShouldEndSession: Get; - /// Currency interface to pay the reward. type Currency: Currency; @@ -125,6 +99,8 @@ pub mod pallet { Payout { who: T::AccountId, amount: Balance }, /// Unable to pay the staker's reward. Unpaid { who: T::AccountId, amount: Balance }, + /// Unstake all stakes for the account. + UnstakeAllFor { who: T::AccountId }, } #[pallet::error] @@ -142,38 +118,6 @@ pub mod pallet { #[pallet::getter(fn ledger_of)] pub type Ledgers = StorageMap<_, Blake2_128Concat, T::AccountId, Ledger>; - /// Cache states. - /// - /// To avoid extra DB RWs during new session, such as: - /// ```nocompile - /// previous = current; - /// current = next; - /// next = elect(); - /// ``` - /// - /// Now, with data: - /// ```nocompile - /// cache1 == previous; - /// cache2 == current; - /// cache3 == next; - /// ``` - /// Just need to shift the marker and write the storage map once: - /// ```nocompile - /// mark(cache3, current); - /// mark(cache2, previous); - /// mark(cache1, next); - /// cache1 = elect(); - /// ``` - #[pallet::storage] - #[pallet::getter(fn exposure_cache_states)] - pub type CacheStates = - StorageValue<_, (CacheState, CacheState, CacheState), ValueQuery, CacheStatesDefault>; - /// Default value for [`CacheStates`]. - #[pallet::type_value] - pub fn CacheStatesDefault() -> (CacheState, CacheState, CacheState) { - (CacheState::Previous, CacheState::Current, CacheState::Next) - } - /// The ideal number of active collators. #[pallet::storage] #[pallet::getter(fn collator_count)] @@ -183,7 +127,7 @@ pub mod pallet { #[pallet::storage] #[pallet::unbounded] #[pallet::getter(fn authored_block_count)] - pub type AuthoredBlocksCount = + pub type AuthoredBlockCount = StorageValue<_, (BlockNumberFor, BTreeMap>), ValueQuery>; /// All outstanding rewards since the last payment. @@ -211,25 +155,6 @@ pub mod pallet { #[pallet::getter(fn kton_staking_contract)] pub type KtonStakingContract = StorageValue<_, T::AccountId>; - // TODO: use `BoundedVec`. - /// Collators cache 0. - #[pallet::storage] - #[pallet::unbounded] - #[pallet::getter(fn collators_cache_0)] - pub type CollatorsCache0 = StorageValue<_, Vec, ValueQuery>; - - /// Collators cache 1. - #[pallet::storage] - #[pallet::unbounded] - #[pallet::getter(fn collators_cache_1)] - pub type CollatorsCache1 = StorageValue<_, Vec, ValueQuery>; - - /// Collators cache 2. - #[pallet::storage] - #[pallet::unbounded] - #[pallet::getter(fn collators_cache_2)] - pub type CollatorsCache2 = StorageValue<_, Vec, ValueQuery>; - #[derive(DefaultNoBound)] #[pallet::genesis_config] pub struct GenesisConfig { @@ -239,7 +164,8 @@ pub mod pallet { pub elapsed_time: Moment, /// Genesis collator count. pub collator_count: u32, - _marker: PhantomData, + #[allow(missing_docs)] + pub _marker: PhantomData, } #[pallet::genesis_build] @@ -259,66 +185,17 @@ pub mod pallet { pub struct Pallet(_); #[pallet::hooks] impl Hooks> for Pallet { - fn on_initialize(_: BlockNumberFor) -> Weight { - // There are already plenty of tasks to handle during the new session, - // so refrain from assigning any additional ones here. - if !T::ShouldEndSession::get() { - call_on_cache!(>::get()) - .map(|cs| { - let mut cs = cs.into_iter(); - let w = cs - .by_ref() - // ? make this value adjustable. - .take(1) - .fold(Weight::zero(), |acc, c| { - acc + Self::payout_for_inner(c).unwrap_or(Zero::zero()) - }); - let _ = call_on_cache!(>::put(cs.collect::>())); - - w - }) - .unwrap_or_default() - } else { - Zero::zero() - } - } - fn on_idle(_: BlockNumberFor, mut remaining_weight: Weight) -> Weight { - // At least 1 read weight is required. - if let Some(rw) = remaining_weight.checked_sub(&T::DbWeight::get().reads(1)) { - remaining_weight = rw; - } else { - return remaining_weight; - } - - #[cfg(feature = "test")] - let wt = Weight::zero().add_ref_time(1); - #[cfg(not(feature = "test"))] - let wt = T::WeightInfo::unstake_all(); - let mut ledger_to_migrate = Vec::new(); - - for (w, l) in >::iter() { - if let Some(rw) = remaining_weight.checked_sub(&wt) { - remaining_weight = rw; - - ledger_to_migrate.push((w, l)); - } else { - break; - } - } - - for (w, l) in ledger_to_migrate { - let _ = Self::unstake_all_for_inner(w, l); - } + Self::idle_unstake(&mut remaining_weight); remaining_weight } } #[pallet::call] impl Pallet { - /// Withdraw all stakes from the staking pool. - #[pallet::call_index(1)] - #[pallet::weight(::WeightInfo::unstake_all())] + /// Withdraw all stakes. + #[pallet::call_index(0)] + #[pallet::weight(::WeightInfo::unstake_all_for())] pub fn unstake_all_for(origin: OriginFor, who: T::AccountId) -> DispatchResult { ensure_signed(origin)?; @@ -329,13 +206,17 @@ pub mod pallet { Ok(()) } - /// Making the payout for the specified. - #[pallet::call_index(8)] - #[pallet::weight(::WeightInfo::payout_for())] - pub fn payout_for(origin: OriginFor, who: T::AccountId) -> DispatchResult { + /// Allocate the RING staking rewards to the designated RING staking contract of a + /// particular collator. + #[pallet::call_index(1)] + #[pallet::weight(::WeightInfo::allocate_ring_staking_reward_of())] + pub fn allocate_ring_staking_reward_of( + origin: OriginFor, + who: T::AccountId, + ) -> DispatchResult { ensure_signed(origin)?; - Self::payout_for_inner(who)?; + Self::allocate_ring_staking_reward_of_inner(who)?; Ok(()) } @@ -345,7 +226,7 @@ pub mod pallet { /// This will apply to the incoming session. /// /// Require root origin. - #[pallet::call_index(7)] + #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::set_collator_count())] pub fn set_collator_count(origin: OriginFor, count: u32) -> DispatchResult { ensure_root(origin)?; @@ -360,7 +241,9 @@ pub mod pallet { } /// Set the RING reward distribution contract address. - #[pallet::call_index(11)] + /// + /// Require root origin. + #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::set_ring_staking_contract())] pub fn set_ring_staking_contract( origin: OriginFor, @@ -374,7 +257,9 @@ pub mod pallet { } /// Set the KTON reward distribution contract address. - #[pallet::call_index(10)] + /// + /// Require root origin. + #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::set_kton_staking_contract())] pub fn set_kton_staking_contract( origin: OriginFor, @@ -391,114 +276,112 @@ pub mod pallet { where T: Config, { - /// Distribute the session reward to staking pot and update the stakers' reward record. - pub fn distribute_session_reward(amount: Balance) { - let who = ::Treasury::get(); + /// Allocate the session reward. + pub fn allocate_session_reward(amount: Balance) { + let treasury = ::Treasury::get(); - if T::IssuingManager::reward(&who, amount).is_ok() { - Self::deposit_event(Event::Payout { who, amount }); + if T::IssuingManager::reward(&treasury, amount).is_ok() { + Self::deposit_event(Event::Payout { who: treasury, amount }); } else { - Self::deposit_event(Event::Unpaid { who, amount }); + Self::deposit_event(Event::Unpaid { who: treasury, amount }); } - let reward_r = amount.saturating_div(2); - let reward_k = amount.saturating_sub(reward_r); - let (b_total, map) = >::take(); + let reward_to_ring_staking = amount.saturating_div(2); + let reward_to_kton_staking = amount.saturating_sub(reward_to_ring_staking); + let (total_block_count, author_map) = >::take(); - map.into_iter().for_each(|(c, b)| { - let r = Perbill::from_rational(b, b_total).mul_floor(reward_r); + author_map.into_iter().for_each(|(who, authored_block_count)| { + let incoming_reward = + Perbill::from_rational(authored_block_count, total_block_count) + .mul_floor(reward_to_ring_staking); - >::mutate(c, |u| *u = u.map(|u| u + r).or(Some(r))); + >::mutate(who, |maybe_pending_reward| { + *maybe_pending_reward = maybe_pending_reward + .map(|pending_reward| pending_reward + incoming_reward) + .or(Some(incoming_reward)) + }); }); - T::KtonStaking::distribute(None, reward_k); + T::KtonStaking::allocate(None, reward_to_kton_staking); } - fn unstake_all_for_inner(who: T::AccountId, ledger: Ledger) -> DispatchResult { - T::Currency::transfer( - &account_id(), - &who, - ledger.ring, - ExistenceRequirement::AllowDeath, - )?; + pub(crate) fn allocate_ring_staking_reward_of_inner(who: T::AccountId) -> DispatchResult { + let amount = >::take(&who).ok_or(>::NoReward)?; - Ok(()) - } + T::RingStaking::allocate(Some(who.clone()), amount); - /// Pay the reward to the RING staking contract. - fn payout_for_inner(collator: T::AccountId) -> Result { - if call_on_cache!(>::get()).unwrap_or_default().contains(&collator) { - T::RingStaking::distribute( - Some(collator.clone()), - >::take(&collator).ok_or(>::NoReward)?, - ); - } else { - // Impossible case. - - Err(>::NoReward)?; - } + Self::deposit_event(Event::Payout { who, amount }); - Ok(::WeightInfo::payout_for()) + Ok(()) } - /// Update the record of block production. fn note_authors(authors: &[T::AccountId]) { - >::mutate(|(total, map)| { - authors.iter().cloned().for_each(|c| { - *total += One::one(); - - map.entry(c).and_modify(|p_| *p_ += One::one()).or_insert(One::one()); + >::mutate(|(total_block_count, author_map)| { + authors.iter().cloned().for_each(|who| { + author_map + .entry(who) + .and_modify(|authored_block_count| *authored_block_count += One::one()) + .or_insert(One::one()); + + *total_block_count += One::one(); }); }); } - /// Prepare the session state. - fn prepare_new_session(index: u32) -> Option> { - >::shift_cache_states(); - - call_on_cache!(>::kill()).ok()?; - + fn prepare_new_session(i: u32) -> Option> { let bn = >::block_number(); - log::info!("assembling new collators for new session {index} at #{bn:?}",); - - let cs = Self::elect().unwrap_or_default(); + log::info!("assembling new collators for new session {i} at #{bn:?}",); - if cs.is_empty() { - // TODO: update this once the migration is completed. - // Possible case under the hybrid election mode. + let collators = T::RingStaking::elect(>::get()).unwrap_or_default(); - // Impossible case. - // - // But if there is an issue, retain the old collators; do not alter the session - // collators if any error occurs to prevent the chain from stalling. + if collators.is_empty() { None } else { - Some(cs) + Some(collators) } } - /// Shift the cache states. - /// - /// Previous Current Next - /// Next Previous Current - /// Current Next Previous - /// - /// ```nocompile - /// loop { mutate(2, 0, 1) } - /// ``` - fn shift_cache_states() { - let (s0, s1, s2) = >::get(); + fn idle_unstake(remaining_weight: &mut Weight) { + // At least 1 read weight is required. + if let Some(rw) = remaining_weight.checked_sub(&T::DbWeight::get().reads(1)) { + *remaining_weight = rw; + } else { + return; + } + + #[cfg(feature = "test")] + let weight = Weight::zero().add_ref_time(1); + #[cfg(not(feature = "test"))] + let weight = T::WeightInfo::unstake_all_for(); + let mut ledgers_to_migrate = Vec::new(); + + for (who, l) in >::iter() { + if let Some(rw) = remaining_weight.checked_sub(&weight) { + *remaining_weight = rw; + + ledgers_to_migrate.push((who, l)); + } else { + break; + } + } - >::put((s2, s0, s1)); + for (who, l) in ledgers_to_migrate { + let _ = Self::unstake_all_for_inner(who, l); + } } - fn elect() -> Option> { - let winners = T::RingStaking::elect(>::get())?; + fn unstake_all_for_inner(who: T::AccountId, ledger: Ledger) -> DispatchResult { + T::Currency::transfer( + &account_id(), + &who, + ledger.ring, + ExistenceRequirement::AllowDeath, + )?; - call_on_cache!(>::put(winners.clone())).ok()?; + Self::deposit_event(Event::UnstakeAllFor { who }); - Some(winners) + Ok(()) } } impl pallet_authorship::EventHandler> for Pallet @@ -519,11 +402,19 @@ pub mod pallet { fn start_session(_: u32) {} - fn new_session(index: u32) -> Option> { - let maybe_collators = Self::prepare_new_session(index); + // No election in genesis. + // Since RING contract isn't available at this time. + fn new_session_genesis(i: u32) -> Option> { + Self::prepare_new_session(i); + + None + } + + fn new_session(i: u32) -> Option> { + let maybe_collators = Self::prepare_new_session(i); if maybe_collators.is_none() { - log::error!("fail to elect collators for session {index}"); + log::error!("fail to elect collators for session {i}"); } maybe_collators @@ -542,7 +433,7 @@ where let inflation = Self::inflate(); let reward = Self::calculate_reward(inflation); - >::distribute_session_reward(reward); + >::allocate_session_reward(reward); } /// Inflation settings. @@ -571,45 +462,13 @@ pub trait Election { } impl Election for () {} -/// Distribute the reward to a contract. +/// Allocate the reward to a contract. pub trait Reward { - /// Distribute the reward. - fn distribute(_: Option, _: Balance) {} + /// Allocate the reward. + fn allocate(_: Option, _: Balance) {} } impl Reward for () {} -/// UnstakeAll trait that stakes must be implemented. -pub trait UnstakeAll { - /// Account type. - type AccountId; - - /// Withdraw all stakes from the staking pool. - fn unstake_all(who: &Self::AccountId) -> DispatchResult; -} - -/// Cache state. -#[allow(missing_docs)] -#[cfg_attr(any(test, feature = "runtime-benchmarks", feature = "try-runtime"), derive(PartialEq))] -#[derive(Encode, Decode, MaxEncodedLen, TypeInfo, RuntimeDebug)] -pub enum CacheState { - Previous, - Current, - Next, -} - -/// Session ending checker. -pub struct ShouldEndSession(PhantomData); -impl Get for ShouldEndSession -where - T: frame_system::Config + pallet_session::Config, -{ - fn get() -> bool { - ::ShouldEndSession::should_end_session( - >::block_number(), - ) - } -} - /// Issue new token from pallet-balances. pub struct BalanceIssuing(PhantomData); impl IssuingManager for BalanceIssuing @@ -691,7 +550,7 @@ where T: Config + darwinia_ethtx_forwarder::Config, T::AccountId: From + Into, { - fn elect(n: u32) -> Option> { + fn elect(x: u32) -> Option> { const ZERO: [u8; 20] = [0; 20]; let Some(rsc) = >::get() else { @@ -717,7 +576,7 @@ where state_mutability: StateMutability::View, }; let input = function - .encode_input(&[Token::Uint(n.into())]) + .encode_input(&[Token::Uint(x.into())]) .map_err(|e| log::error!("failed to encode input due to {e:?}")) .ok()?; @@ -731,7 +590,7 @@ where .map_err(|e| log::error!("failed to forward call due to {e:?}")) .ok() .and_then(|i| { - log::info!("getTopCollators({n})'s execution info {i:?}"); + log::info!("getTopCollators({x})'s execution info {i:?}"); function .decode_output(&i.value) @@ -760,7 +619,7 @@ where T: Config + darwinia_ethtx_forwarder::Config, T::AccountId: Into, { - fn distribute(who: Option, amount: Balance) { + fn allocate(who: Option, amount: Balance) { let Some(who) = who else { log::error!("who must be some; qed"); @@ -807,7 +666,7 @@ where T: Config + darwinia_ethtx_forwarder::Config, T::AccountId: Into, { - fn distribute(_: Option, amount: Balance) { + fn allocate(_: Option, amount: Balance) { let Some(ksc) = >::get() else { log::error!("KTON staking contract must be some; qed"); diff --git a/pallet/staking/src/mock.rs b/pallet/staking/src/mock.rs index d2245aa9f..802bce517 100644 --- a/pallet/staking/src/mock.rs +++ b/pallet/staking/src/mock.rs @@ -26,7 +26,10 @@ use serde::{Deserialize, Serialize}; use crate::*; use dc_types::UNIT; // polkadot-sdk -use frame_support::{assert_ok, derive_impl, traits::OnInitialize}; +use frame_support::{ + assert_ok, derive_impl, + traits::{OnFinalize, OnInitialize}, +}; use sp_core::H160; use sp_io::TestExternalities; use sp_runtime::{BuildStorage, RuntimeAppPublic}; @@ -90,28 +93,6 @@ impl pallet_balances::Config for Runtime { type ExistentialDeposit = (); } -pub enum KtonMinting {} -impl darwinia_deposit::SimpleAsset for KtonMinting { - type AccountId = AccountId; - - fn mint(_: &Self::AccountId, _: Balance) -> sp_runtime::DispatchResult { - Ok(()) - } - - fn burn(_: &Self::AccountId, _: Balance) -> sp_runtime::DispatchResult { - Ok(()) - } -} -impl darwinia_deposit::Config for Runtime { - type DepositMigrator = (); - type Kton = KtonMinting; - type MaxDeposits = frame_support::traits::ConstU32<16>; - type Ring = Balances; - type RuntimeEvent = RuntimeEvent; - type Treasury = TreasuryAcct; - type WeightInfo = (); -} - frame_support::parameter_types! { pub static SessionHandlerCollators: Vec = Vec::new(); pub static SessionChangeBlock: BlockNumber = 0; @@ -121,7 +102,7 @@ sp_runtime::impl_opaque_keys! { pub uint: SessionHandler, } } -pub type Period = frame_support::traits::ConstU64<3>; +pub type Period = frame_support::traits::ConstU64<5>; pub struct SessionHandler; impl pallet_session::SessionHandler for SessionHandler { const KEY_TYPE_IDS: &'static [sp_runtime::KeyTypeId] = @@ -209,6 +190,7 @@ impl pallet_treasury::Config for Runtime { frame_support::parameter_types! { pub static InflationType: u8 = 0; + pub static NextCollatorId: u64 = 1; } pub enum StatedOnSessionEnd {} impl crate::IssuingManager for StatedOnSessionEnd { @@ -237,46 +219,25 @@ impl crate::IssuingManager for StatedOnSessionEnd { } } pub enum RingStaking {} -impl crate::Stake for RingStaking { - type AccountId = AccountId; - type Item = Balance; +impl crate::Election for RingStaking { + fn elect(x: u32) -> Option> { + let start = NextCollatorId::get(); + let end = start + x as u64; - fn stake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - >::transfer( - who, - &crate::account_id(), - item, - frame_support::traits::ExistenceRequirement::AllowDeath, - ) - } + assert!(end < 1_000); - fn unstake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - >::transfer( - &crate::account_id(), - who, - item, - frame_support::traits::ExistenceRequirement::AllowDeath, - ) - } -} -impl crate::Election for RingStaking { - fn elect(n: u32) -> Option> { Some( - (100..(100 + n) as u64) + (start..end) .map(|i| { let who = AccountId(i); - if Session::set_keys( + assert_ok!(Session::set_keys( RuntimeOrigin::signed(who), SessionKeys { uint: i.into() }, Vec::new(), - ) - .is_ok() - { - who - } else { - AccountId(0) - } + )); + + who }) .collect(), ) @@ -285,8 +246,11 @@ impl crate::Election for RingStaking { impl crate::Reward for RingStaking { fn distribute(who: Option, amount: Balance) { let Some(who) = who else { return }; - let _ = - Balances::transfer_keep_alive(RuntimeOrigin::signed(TreasuryAcct::get()), who, amount); + let _ = Balances::transfer_keep_alive( + RuntimeOrigin::signed(Treasury::account_id()), + who, + amount, + ); } } pub enum KtonStaking {} @@ -301,27 +265,20 @@ impl crate::Reward for KtonStaking { } impl crate::Config for Runtime { type Currency = Balances; - type Deposit = Deposit; type IssuingManager = StatedOnSessionEnd; type KtonStaking = KtonStaking; - type MaxDeposits = ::MaxDeposits; - type Ring = RingStaking; type RingStaking = RingStaking; type RuntimeEvent = RuntimeEvent; - type ShouldEndSession = crate::ShouldEndSession; type Treasury = TreasuryAcct; type UnixTime = Timestamp; type WeightInfo = (); } -#[cfg(not(feature = "runtime-benchmarks"))] -impl crate::DepositConfig for Runtime {} frame_support::construct_runtime! { pub enum Runtime { System: frame_system, Timestamp: pallet_timestamp, Balances: pallet_balances, - Deposit: darwinia_deposit, Session: pallet_session, Treasury: pallet_treasury, Staking: crate, @@ -344,110 +301,74 @@ impl Efflux { } } -pub struct ExtBuilder { - collator_count: u32, - genesis_collator: bool, -} +pub struct ExtBuilder; impl ExtBuilder { - pub fn inflation_type(self, r#type: u8) -> Self { - INFLATION_TYPE.with(|v| *v.borrow_mut() = r#type); + // pub fn inflation_type(self, r#type: u8) -> Self { + // INFLATION_TYPE.with(|v| *v.borrow_mut() = r#type); - self - } - - pub fn collator_count(mut self, collator_count: u32) -> Self { - self.collator_count = collator_count; - - self - } - - pub fn genesis_collator(mut self) -> Self { - self.genesis_collator = true; - - self - } + // self + // } pub fn build(self) -> TestExternalities { - // let _ = pretty_env_logger::try_init(); + let _ = pretty_env_logger::try_init(); let mut storage = >::default().build_storage().unwrap(); pallet_balances::GenesisConfig:: { - balances: (1..=10) - .map(|i| (AccountId(i), 1_000 * UNIT)) - .chain([(TreasuryAcct::get(), 1_000_000 * UNIT)]) + balances: (1..=1_000) + .map(|i| (AccountId(i), 100)) + .chain([(Treasury::account_id(), 1 << 64), (account_id(), 1 << 64)]) + .collect(), + } + .assimilate_storage(&mut storage) + .unwrap(); + pallet_session::GenesisConfig:: { + keys: (1..=3) + .map(|i| (AccountId(i), AccountId(i), SessionKeys { uint: i.into() })) .collect(), } .assimilate_storage(&mut storage) .unwrap(); crate::GenesisConfig:: { - rate_limit: 100 * UNIT, - collator_count: self.collator_count, - collators: if self.genesis_collator { - (1..=self.collator_count as u64).map(|i| (AccountId(i), i as _)).collect() - } else { - Default::default() - }, + collator_count: 3, + collators: (1..=3).map(|i| AccountId(i)).collect(), ..Default::default() } .assimilate_storage(&mut storage) .unwrap(); - if self.genesis_collator { - pallet_session::GenesisConfig:: { - keys: (1..=self.collator_count as u64) - .map(|i| (AccountId(i), AccountId(i), SessionKeys { uint: i.into() })) - .collect(), - } - .assimilate_storage(&mut storage) - .unwrap(); - } let mut ext = TestExternalities::from(storage); ext.execute_with(|| { - >::put(AccountId(718)); - >::put(AccountId(719)); + >::put(AccountId(1_001)); + >::put(AccountId(1_002)); + preset_session_keys(); new_session(); }); ext } } -impl Default for ExtBuilder { - fn default() -> Self { - Self { collator_count: 1, genesis_collator: false } - } -} - -pub fn preset_collator_wait_list(n: u64) { - (10..10 + n).for_each(|i| { - let who = AccountId(i); - let _ = >::deposit_creating(&who, i as _); +pub fn preset_session_keys() { + (1..1_000).for_each(|i| { assert_ok!(Session::set_keys( - RuntimeOrigin::signed(who), + RuntimeOrigin::signed(AccountId(i)), SessionKeys { uint: i.into() }, Vec::new() )); - assert_ok!(Staking::stake(RuntimeOrigin::signed(who), i as _, Vec::new())); - assert_ok!(Staking::collect(RuntimeOrigin::signed(who), Perbill::zero())); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(who), who)); - }); - (100..100 + n).for_each(|i| { - let who = AccountId(i); - let _ = >::deposit_creating(&who, i as _); }); } pub fn initialize_block(number: BlockNumber) { System::set_block_number(number); Efflux::time(1); - >::on_initialize(number); + AllPalletsWithSystem::on_initialize(number); } pub fn finalize_block(number: BlockNumber) { - >::on_finalize(number); + AllPalletsWithSystem::on_finalize(number); } pub fn new_session() { @@ -457,9 +378,6 @@ pub fn new_session() { (now..target).for_each(|_| Efflux::block(1)); } -pub fn payout() { - crate::call_on_cache!(>::get().into_iter().for_each(|c| { - let _ = Staking::payout_inner(c); - })) - .unwrap(); +pub fn events() -> Vec> { + System::read_events_for_pallet() } diff --git a/pallet/staking/src/tests.rs b/pallet/staking/src/tests.rs index 9a661d12e..279fa7da4 100644 --- a/pallet/staking/src/tests.rs +++ b/pallet/staking/src/tests.rs @@ -16,568 +16,199 @@ // You should have received a copy of the GNU General Public License // along with Darwinia. If not, see . -// core -use core::time::Duration; // darwinia use crate::{mock::*, *}; -use darwinia_deposit::Error as DepositError; -use dc_types::UNIT; // polkadot-sdk -use frame_support::{assert_noop, assert_ok, BoundedVec}; -use sp_runtime::{assert_eq_error_rate, DispatchError, Perbill}; +use frame_support::{assert_noop, assert_ok}; +use sp_runtime::DispatchError; #[test] -fn exposure_cache_should_work() { - ExtBuilder::default().build().execute_with(|| {}); -} - -#[test] -fn stake_should_work() { - ExtBuilder::default().build().execute_with(|| { - assert_eq!(System::account(AccountId(1)).consumers, 0); - assert!(Staking::ledger_of(AccountId(1)).is_none()); - assert_eq!(Balances::free_balance(AccountId(1)), 1_000 * UNIT); - assert_eq!(Staking::rate_limit_state(), RateLimiter::Pos(0)); - - // Stake 1 RING. - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(1)), UNIT, Vec::new())); - assert_eq!(System::account(AccountId(1)).consumers, 1); - assert_eq!( - Staking::ledger_of(AccountId(1)).unwrap(), - Ledger { ring: UNIT, deposits: Default::default() } - ); - assert_eq!(Balances::free_balance(AccountId(1)), 999 * UNIT); - assert_eq!(Staking::rate_limit_state(), RateLimiter::Pos(UNIT)); +fn get_top_collators_should_work() { + const ZERO: [u8; 20] = [0; 20]; - // Stake invalid deposit. - assert_noop!( - Staking::stake(RuntimeOrigin::signed(AccountId(1)), 0, vec![0]), - >::DepositNotFound - ); + let data = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 244, 240, 74, 89, 79, 214, 144, 224, + 254, 164, 111, 40, 130, 165, 178, 97, 83, 167, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + ]; + #[allow(deprecated)] + let function = Function { + name: "getTopCollators".to_owned(), + inputs: vec![Param { + name: "k".to_owned(), + kind: ParamType::Uint(256), + internal_type: None, + }], + outputs: vec![Param { + name: "collators".to_owned(), + kind: ParamType::Array(Box::new(ParamType::Address)), + internal_type: None, + }], + constant: None, + state_mutability: StateMutability::View, + }; + let output = function + .decode_output(&data) + .map(|o| { + let Some(Token::Array(addrs)) = o.into_iter().next() else { return Vec::new() }; - // Stake 1 deposit. - assert_eq!(System::account(AccountId(1)).consumers, 1); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(AccountId(1)), UNIT, 1)); - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(1)), 0, vec![0])); - assert_eq!( - Staking::ledger_of(AccountId(1)).unwrap(), - Ledger { ring: UNIT, deposits: BoundedVec::truncate_from(vec![0]) } - ); - assert_eq!(Staking::rate_limit_state(), RateLimiter::Pos(2 * UNIT)); + addrs + .into_iter() + .filter_map(|addr| match addr { + Token::Address(addr) if addr.0 != ZERO => Some(addr.0), + _ => None, + }) + .collect() + }) + .unwrap(); - // Stake 2 RING and 2 deposits. - assert_eq!(System::account(AccountId(1)).consumers, 2); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(AccountId(1)), UNIT, 1)); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(AccountId(1)), UNIT, 1)); - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(1)), 2 * UNIT, vec![1, 2])); - assert_eq!(Balances::free_balance(AccountId(1)), 994 * UNIT); - assert_eq!( - Staking::ledger_of(AccountId(1)).unwrap(), - Ledger { ring: 3 * UNIT, deposits: BoundedVec::truncate_from(vec![0, 1, 2]) } - ); - assert_eq!(Staking::rate_limit_state(), RateLimiter::Pos(6 * UNIT)); - }); + assert_eq!( + output, + [ + // 0x94f4f04a594fd690e0fea46f2882a5b26153a72f. + [ + 148, 244, 240, 74, 89, 79, 214, 144, 224, 254, 164, 111, 40, 130, 165, 178, 97, 83, + 167, 47 + ] + ] + ); } #[test] -fn unstake_should_work() { - ExtBuilder::default().build().execute_with(|| { - assert_ok!(Deposit::lock(RuntimeOrigin::signed(AccountId(1)), UNIT, 1)); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(AccountId(1)), UNIT, 1)); - assert_ok!(Deposit::lock(RuntimeOrigin::signed(AccountId(1)), UNIT, 1)); - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(1)), 3 * UNIT, vec![0, 1, 2])); - assert_eq!(Balances::free_balance(AccountId(1)), 994 * UNIT); - assert_eq!(Staking::rate_limit_state(), RateLimiter::Pos(6 * UNIT)); +fn collator_caches_should_work() { + ExtBuilder.build().execute_with(|| { + assert!(call_on_cache!(>::get()).unwrap().is_empty()); + assert!(call_on_cache!(>::get()).unwrap().is_empty()); assert_eq!( - Staking::ledger_of(AccountId(1)).unwrap(), - Ledger { ring: 3 * UNIT, deposits: BoundedVec::truncate_from(vec![0, 1, 2]) } + call_on_cache!(>::get()).unwrap(), + vec![AccountId(1), AccountId(2), AccountId(3)] ); assert_eq!( - Deposit::deposit_of(AccountId(1)) - .unwrap() - .into_iter() - .map(|d| d.in_use) - .collect::>(), - [true, true, true] + >::get(), + (CacheState::Previous, CacheState::Current, CacheState::Next) ); - // Unstake 1 RING. - assert_ok!(Staking::unstake(RuntimeOrigin::signed(AccountId(1)), UNIT, Vec::new())); - assert_eq!(Staking::rate_limit_state(), RateLimiter::Pos(5 * UNIT)); - assert_eq!(Balances::free_balance(AccountId(1)), 995 * UNIT); - assert_eq!( - Staking::ledger_of(AccountId(1)).unwrap(), - Ledger { ring: 2 * UNIT, deposits: BoundedVec::truncate_from(vec![0, 1, 2]) } - ); + Staking::shift_cache_states(); - // Unstake invalid deposit. - assert_noop!( - Staking::unstake(RuntimeOrigin::signed(AccountId(1)), 0, vec![3]), - >::DepositNotFound - ); - - // Unstake 1 deposit. - Efflux::block(1); - assert_ok!(Staking::unstake(RuntimeOrigin::signed(AccountId(1)), 0, vec![1])); - assert_eq!(Staking::rate_limit_state(), RateLimiter::Pos(4 * UNIT)); + assert!(call_on_cache!(>::get()).unwrap().is_empty()); assert_eq!( - Staking::ledger_of(AccountId(1)).unwrap(), - Ledger { ring: 2 * UNIT, deposits: BoundedVec::truncate_from(vec![0, 2]) } + call_on_cache!(>::get()).unwrap(), + vec![AccountId(1), AccountId(2), AccountId(3)] ); + assert!(call_on_cache!(>::get()).unwrap().is_empty()); assert_eq!( - Deposit::deposit_of(AccountId(1)) - .unwrap() - .into_iter() - .map(|d| d.in_use) - .collect::>(), - [true, false, true] + >::get(), + (CacheState::Next, CacheState::Previous, CacheState::Current) ); - // Unstake 2 RING and 2 deposits. - Efflux::block(1); - assert_ok!(Staking::unstake(RuntimeOrigin::signed(AccountId(1)), 2 * UNIT, vec![0, 2])); - assert_eq!(Staking::rate_limit_state(), RateLimiter::Pos(0)); - assert!(Staking::ledger_of(AccountId(1)).is_none()); - assert_eq!( - Deposit::deposit_of(AccountId(1)) - .unwrap() - .into_iter() - .map(|d| d.in_use) - .collect::>(), - [false, false, false] - ); - - // Prepare rate limit test data. - assert_ok!(Deposit::lock(RuntimeOrigin::signed(AccountId(1)), 100 * UNIT + 1, 1)); - >::put(200 * UNIT + 2); - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(1)), 100 * UNIT + 1, vec![3])); - >::put(100 * UNIT); - >::kill(); + Staking::shift_cache_states(); - // Unstake 100 UNIT + 1. - assert_noop!( - Staking::unstake(RuntimeOrigin::signed(AccountId(1)), 100 * UNIT + 1, Vec::new()), - >::ExceedRateLimit - ); - - // Unstake 100 UNIT + 1. - assert_noop!( - Staking::unstake(RuntimeOrigin::signed(AccountId(1)), 0, vec![3]), - >::ExceedRateLimit + assert_eq!( + call_on_cache!(>::get()).unwrap(), + vec![AccountId(1), AccountId(2), AccountId(3)] ); - - // Unstake RING(100 UNIT + 1) and deposit(100 UNIT + 1). - assert_noop!( - Staking::unstake(RuntimeOrigin::signed(AccountId(1)), 100 * UNIT + 1, vec![3]), - >::ExceedRateLimit + assert!(call_on_cache!(>::get()).unwrap().is_empty()); + assert!(call_on_cache!(>::get()).unwrap().is_empty()); + assert_eq!( + >::get(), + (CacheState::Current, CacheState::Next, CacheState::Previous) ); - }); -} - -#[test] -fn collect_should_work() { - ExtBuilder::default().build().execute_with(|| { - assert!(Staking::collator_of(AccountId(1)).is_none()); - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(1)), UNIT, Vec::new())); - (0..=99).for_each(|c| { - let c = Perbill::from_percent(c); + Staking::shift_cache_states(); - assert_ok!(Staking::collect(RuntimeOrigin::signed(AccountId(1)), c)); - assert_eq!(Staking::collator_of(AccountId(1)).unwrap(), c); - }); - }); -} - -#[test] -fn nominate_should_work() { - ExtBuilder::default().build().execute_with(|| { - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(1)), UNIT, Vec::new())); - assert_ok!(Staking::collect(RuntimeOrigin::signed(AccountId(1)), Perbill::zero())); - - (2..=10).for_each(|i| { - assert!(Staking::nominator_of(AccountId(i)).is_none()); - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(i)), UNIT, Vec::new())); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(i)), AccountId(1))); - assert_eq!(Staking::nominator_of(AccountId(i)).unwrap(), AccountId(1)); - }); - }); -} - -#[test] -fn chill_should_work() { - ExtBuilder::default().build().execute_with(|| { - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(1)), UNIT, Vec::new())); - assert_ok!(Staking::collect(RuntimeOrigin::signed(AccountId(1)), Perbill::zero())); - (2..=10).for_each(|i| { - assert_ok!(Staking::stake(RuntimeOrigin::signed(AccountId(i)), UNIT, Vec::new())); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(i)), AccountId(1))); - }); - assert!(Staking::collator_of(AccountId(1)).is_some()); - (2..=10).for_each(|i| assert!(Staking::nominator_of(AccountId(i)).is_some())); - - (1..=10).for_each(|i| { - assert_ok!(Staking::chill(RuntimeOrigin::signed(AccountId(i)))); - }); - assert!(Staking::collator_of(AccountId(1)).is_none()); - (2..=10).for_each(|i| assert!(Staking::nominator_of(AccountId(i)).is_none())); - }); -} - -#[test] -fn set_collator_count_should_work() { - ExtBuilder::default().build().execute_with(|| { - assert_noop!( - Staking::set_collator_count(RuntimeOrigin::signed(AccountId(1)), 1), - DispatchError::BadOrigin - ); - assert_noop!( - Staking::set_collator_count(RuntimeOrigin::root(), 0), - >::ZeroCollatorCount + assert!(call_on_cache!(>::get()).unwrap().is_empty()); + assert!(call_on_cache!(>::get()).unwrap().is_empty()); + assert_eq!( + call_on_cache!(>::get()).unwrap(), + vec![AccountId(1), AccountId(2), AccountId(3)] ); - assert_ok!(Staking::set_collator_count(RuntimeOrigin::root(), 1)); - }); -} - -#[test] -fn elect_should_work() { - ExtBuilder::default().collator_count(3).build().execute_with(|| { - (1..=5).for_each(|i| { - assert_ok!(Staking::stake( - RuntimeOrigin::signed(AccountId(i)), - i as Balance * UNIT, - Vec::new() - )); - assert_ok!(Staking::collect(RuntimeOrigin::signed(AccountId(i)), Perbill::zero())); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(i)), AccountId(i))); - }); - (6..=10).for_each(|i| { - assert_ok!(Staking::stake( - RuntimeOrigin::signed(AccountId(i)), - i as Balance * UNIT, - Vec::new() - )); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(i)), AccountId(i - 5))); - }); - assert_eq!( - Staking::elect(Staking::collator_count()).unwrap(), - vec![AccountId(5), AccountId(4), AccountId(3)] + >::get(), + (CacheState::Previous, CacheState::Current, CacheState::Next) ); }); } #[test] -fn payout_should_work() { - ExtBuilder::default().collator_count(5).build().execute_with(|| { - (1..=5).for_each(|i| { - assert_ok!(Staking::stake( - RuntimeOrigin::signed(AccountId(i)), - i as Balance * UNIT, - Vec::new() - )); - assert_ok!(Staking::collect( - RuntimeOrigin::signed(AccountId(i)), - Perbill::from_percent(i as u32 * 10) - )); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(i)), AccountId(i))); - }); - (6..=10).for_each(|i| { - assert_ok!(Staking::stake( - RuntimeOrigin::signed(AccountId(i)), - (11 - i as Balance) * UNIT, - Vec::new() - )); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(i)), AccountId(i - 5))); - }); - new_session(); - (1..=10).for_each(|i| { - assert_eq!( - Balances::free_balance(AccountId(i)), - (1_000 - if i < 6 { i } else { 11 - i }) as Balance * UNIT - ) - }); - - let session_duration = Duration::new(12 * 600, 0).as_millis(); - let kton_staking_contract_balance = - Balances::free_balance(>::get().unwrap()); - Efflux::time(session_duration - >::get() as Moment); - Staking::note_authors(&[ - AccountId(1), - AccountId(2), - AccountId(3), - AccountId(4), - AccountId(5), - ]); - new_session(); - new_session(); - payout(); - - let rewards = [ - 182149362040072859745, - 340012143096539162113, - 473588342440801457194, - 582877959635701275045, - 667880995628415300546, - 546448087213114754098, - 388585306229508196721, - 255009107468123861566, - 145719489836065573771, - 60716453916211293261, - ]; - let half_reward = PAYOUT_FRAC - * dc_inflation::issuing_in_period(session_duration, Timestamp::now()).unwrap() - / 2; - assert_eq_error_rate!(half_reward, rewards.iter().sum::(), UNIT); - assert_eq_error_rate!( - half_reward, - Balances::free_balance(>::get().unwrap()) - - kton_staking_contract_balance, - UNIT - ); - assert_eq!( - rewards.as_slice(), - (1..=10) - .map(|i| Balances::free_balance(AccountId(i)) - - (1_000 - if i < 6 { i } else { 11 - i }) as Balance * UNIT) - .collect::>() - ); - }); - - ExtBuilder::default().inflation_type(1).collator_count(5).build().execute_with(|| { - (1..=5).for_each(|i| { - assert_ok!(Staking::stake( - RuntimeOrigin::signed(AccountId(i)), - i as Balance * UNIT, - Vec::new() - )); - assert_ok!(Staking::collect( - RuntimeOrigin::signed(AccountId(i)), - Perbill::from_percent(i as u32 * 10) - )); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(i)), AccountId(i))); - }); - (6..=10).for_each(|i| { - assert_ok!(Staking::stake( - RuntimeOrigin::signed(AccountId(i)), - (11 - i as Balance) * UNIT, - Vec::new() - )); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(i)), AccountId(i - 5))); - }); - new_session(); - new_session(); - (1..=10).for_each(|i| { - assert_eq!( - Balances::free_balance(AccountId(i)), - (1_000 - if i < 6 { i } else { 11 - i }) as Balance * UNIT - ) - }); - - let total_issuance = Balances::total_issuance(); - let session_duration = Duration::new(12 * 600, 0).as_millis(); - Efflux::time(session_duration - >::get() as Moment); - Staking::note_authors(&[ - AccountId(1), - AccountId(2), - AccountId(3), - AccountId(4), - AccountId(5), - ]); - new_session(); - payout(); - - let rewards = [ - 499999998800000000000, - 933333332800000000000, - 1300000000000000000000, - 1599999999200000000000, - 1833333333000000000000, - 1499999999400000000000, - 1066666665600000000000, - 700000000000000000000, - 399999999600000000000, - 166666666000000000000, - ]; +fn elect_should_work() { + ExtBuilder.build().execute_with(|| { assert_eq!( - rewards.as_slice(), - (1..=10) - .map(|i| Balances::free_balance(AccountId(i)) - - (1_000 - if i < 6 { i } else { 11 - i }) as Balance * UNIT) - .collect::>() + call_on_cache!(>::get()).unwrap(), + vec![AccountId(1), AccountId(2), AccountId(3)] ); - assert_eq!(Balances::total_issuance(), total_issuance); - - assert_ok!(Balances::transfer_all( - RuntimeOrigin::signed(Treasury::account_id()), - AccountId(0), - false - )); - Staking::note_authors(&[AccountId(1)]); - System::reset_events(); + NEXT_COLLATOR_ID.with(|v| *v.borrow_mut() = 4); new_session(); - payout(); assert_eq!( - System::events() - .into_iter() - .filter_map(|e| match e.event { - RuntimeEvent::Staking(e @ Event::Unpaid { .. }) => Some(e), - _ => None, - }) - .collect::>(), - vec![ - // Pay to collator failed. - Event::Unpaid { who: AccountId(6), amount: 7499999997000000000000 }, - // Pay to nominator failed. - Event::Unpaid { who: AccountId(1), amount: 2499999994000000000000 } - ] + call_on_cache!(>::get()).unwrap(), + vec![AccountId(4), AccountId(5), AccountId(6)] ); }); } #[test] fn auto_payout_should_work() { - ExtBuilder::default().collator_count(2).build().execute_with(|| { - (1..=2).for_each(|i| { - assert_ok!(Staking::stake( - RuntimeOrigin::signed(AccountId(i)), - i as Balance * UNIT, - Vec::new() - )); - assert_ok!(Staking::collect( - RuntimeOrigin::signed(AccountId(i)), - Perbill::from_percent(i as u32 * 10) - )); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(i)), AccountId(i))); - }); - (3..=4).for_each(|i| { - assert_ok!(Staking::stake( - RuntimeOrigin::signed(AccountId(i)), - (5 - i as Balance) * UNIT, - Vec::new() - )); - assert_ok!(Staking::nominate(RuntimeOrigin::signed(AccountId(i)), AccountId(i - 2))); - }); - new_session(); - new_session(); + ExtBuilder.build().execute_with(|| { + Efflux::block(1); - Efflux::time(>::get() as Moment); - Staking::note_authors(&[AccountId(1), AccountId(2)]); - new_session(); - (1..=4).for_each(|i| { - assert_eq!( - Balances::free_balance(AccountId(i)), - (1_000 - if i < 3 { i } else { 5 - i }) as Balance * UNIT - ) - }); + (1..=3).for_each(|i| >::insert(AccountId(i), i as Balance)); + System::reset_events(); Efflux::block(1); - assert_eq!( - [ - Balances::free_balance(AccountId(1)), - Balances::free_balance(AccountId(2)), - Balances::free_balance(AccountId(3)), - Balances::free_balance(AccountId(4)), - ], - [ - 999000607164541135398, - 998000000000000000000, - 998000910746811475409, - 999000000000000000000 - ] - ); + dbg!(>::iter().collect::>()); + assert_eq!(events(), vec![Event::Payout { who: AccountId(2), amount: 2 }]); + System::reset_events(); Efflux::block(1); - assert_eq!( - [ - Balances::free_balance(AccountId(1)), - Balances::free_balance(AccountId(2)), - Balances::free_balance(AccountId(3)), - Balances::free_balance(AccountId(4)), - ], - [ - 999000607164541135398, - 998001113134992106860, - 998000910746811475409, - 999000404776360655738 - ] - ); + dbg!(>::iter().collect::>()); + assert_eq!(events(), vec![Event::Payout { who: AccountId(3), amount: 3 }]); + System::reset_events(); Efflux::block(1); - assert_eq!( - [ - Balances::free_balance(AccountId(1)), - Balances::free_balance(AccountId(2)), - Balances::free_balance(AccountId(3)), - Balances::free_balance(AccountId(4)), - ], - [ - 999000607164541135398, - 998001113134992106860, - 998000910746811475409, - 999000404776360655738 - ] - ); + dbg!(>::iter().collect::>()); + assert_eq!(events(), vec![Event::Payout { who: AccountId(1), amount: 1 }]); }); } #[test] fn on_new_session_should_work() { - ExtBuilder::default().collator_count(2).genesis_collator().build().execute_with(|| {}); + ExtBuilder.build().execute_with(|| {}); } #[test] -fn get_top_collators_should_work() { - const ZERO: [u8; 20] = [0; 20]; +fn unstake_all_for_should_work() { + ExtBuilder.build().execute_with(|| { + assert_noop!( + Staking::unstake_all_for(RuntimeOrigin::signed(AccountId(1)), AccountId(1)), + >::NoRecord + ); - let data = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 244, 240, 74, 89, 79, 214, 144, 224, - 254, 164, 111, 40, 130, 165, 178, 97, 83, 167, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ]; - #[allow(deprecated)] - let function = Function { - name: "getTopCollators".to_owned(), - inputs: vec![Param { - name: "k".to_owned(), - kind: ParamType::Uint(256), - internal_type: None, - }], - outputs: vec![Param { - name: "collators".to_owned(), - kind: ParamType::Array(Box::new(ParamType::Address)), - internal_type: None, - }], - constant: None, - state_mutability: StateMutability::View, - }; - let output = function - .decode_output(&data) - .map(|o| { - let Some(Token::Array(addrs)) = o.into_iter().next() else { return Vec::new() }; + >::insert(AccountId(1), Ledger { ring: 1, deposits: Default::default() }); + assert_ok!(Staking::unstake_all_for(RuntimeOrigin::signed(AccountId(1)), AccountId(1))); + }); +} - addrs - .into_iter() - .filter_map(|addr| match addr { - Token::Address(addr) if addr.0 != ZERO => Some(addr.0), - _ => None, - }) - .collect() - }) - .unwrap(); +#[test] +fn payout_for_should_work() { + ExtBuilder.build().execute_with(|| {}); +} - assert_eq!( - output, - [ - // 0x94f4f04a594fd690e0fea46f2882a5b26153a72f. - [ - 148, 244, 240, 74, 89, 79, 214, 144, 224, 254, 164, 111, 40, 130, 165, 178, 97, 83, - 167, 47 - ] - ] - ); +#[test] +fn set_collator_count_should_work() { + ExtBuilder.build().execute_with(|| { + assert_noop!( + Staking::set_collator_count(RuntimeOrigin::signed(AccountId(1)), 1), + DispatchError::BadOrigin + ); + assert_noop!( + Staking::set_collator_count(RuntimeOrigin::root(), 0), + >::ZeroCollatorCount + ); + + assert_ok!(Staking::set_collator_count(RuntimeOrigin::root(), 1)); + assert_eq!(Staking::collator_count(), 1); + }); } diff --git a/pallet/staking/src/weights.rs b/pallet/staking/src/weights.rs index 0034cf691..5c619a2db 100644 --- a/pallet/staking/src/weights.rs +++ b/pallet/staking/src/weights.rs @@ -52,8 +52,8 @@ use core::marker::PhantomData; /// Weight functions needed for darwinia_staking. pub trait WeightInfo { - fn unstake_all() -> Weight; - fn payout_for() -> Weight; + fn unstake_all_for() -> Weight; + fn allocate_ring_staking_reward_of() -> Weight; fn set_ring_staking_contract() -> Weight; fn set_kton_staking_contract() -> Weight; fn set_collator_count() -> Weight; @@ -73,7 +73,7 @@ impl WeightInfo for SubstrateWeight { /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 1023]`. - fn unstake_all() -> Weight { + fn unstake_all_for() -> Weight { // Proof Size summary in bytes: // Measured: `2330` // Estimated: `83902` @@ -91,7 +91,7 @@ impl WeightInfo for SubstrateWeight { /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:32 w:32) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn payout_for() -> Weight { + fn allocate_ring_staking_reward_of() -> Weight { // Proof Size summary in bytes: // Measured: `2330` // Estimated: `83902` @@ -149,7 +149,7 @@ impl WeightInfo for () { /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 1023]`. - fn unstake_all() -> Weight { + fn unstake_all_for() -> Weight { // Proof Size summary in bytes: // Measured: `2330` // Estimated: `83902` @@ -159,7 +159,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(35_u64)) .saturating_add(RocksDbWeight::get().writes(34_u64)) } - fn payout_for() -> Weight { + fn allocate_ring_staking_reward_of() -> Weight { // Proof Size summary in bytes: // Measured: `2330` // Estimated: `83902` From 7e56ca8b9828642c4332fd51d7e869df7a616581 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Thu, 17 Oct 2024 18:43:04 +0800 Subject: [PATCH 03/17] Part.3 --- pallet/staking/src/lib.rs | 55 +++++++++++--- pallet/staking/src/mock.rs | 17 ++--- pallet/staking/src/tests.rs | 145 +++++++++++++++++------------------- 3 files changed, 122 insertions(+), 95 deletions(-) diff --git a/pallet/staking/src/lib.rs b/pallet/staking/src/lib.rs index 845076eff..a45589a92 100644 --- a/pallet/staking/src/lib.rs +++ b/pallet/staking/src/lib.rs @@ -186,6 +186,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn on_idle(_: BlockNumberFor, mut remaining_weight: Weight) -> Weight { + Self::idle_allocate_ring_staking_reward(&mut remaining_weight); Self::idle_unstake(&mut remaining_weight); remaining_weight @@ -199,9 +200,9 @@ pub mod pallet { pub fn unstake_all_for(origin: OriginFor, who: T::AccountId) -> DispatchResult { ensure_signed(origin)?; - let l = >::take(&who).ok_or(>::NoRecord)?; + let leger = >::take(&who).ok_or(>::NoRecord)?; - Self::unstake_all_for_inner(who, l)?; + Self::unstake_all_for_inner(who, leger)?; Ok(()) } @@ -216,7 +217,9 @@ pub mod pallet { ) -> DispatchResult { ensure_signed(origin)?; - Self::allocate_ring_staking_reward_of_inner(who)?; + let amount = >::take(&who).ok_or(>::NoReward)?; + + Self::allocate_ring_staking_reward_of_inner(who, amount)?; Ok(()) } @@ -305,9 +308,10 @@ pub mod pallet { T::KtonStaking::allocate(None, reward_to_kton_staking); } - pub(crate) fn allocate_ring_staking_reward_of_inner(who: T::AccountId) -> DispatchResult { - let amount = >::take(&who).ok_or(>::NoReward)?; - + pub(crate) fn allocate_ring_staking_reward_of_inner( + who: T::AccountId, + amount: Balance, + ) -> DispatchResult { T::RingStaking::allocate(Some(who.clone()), amount); Self::deposit_event(Event::Payout { who, amount }); @@ -342,6 +346,37 @@ pub mod pallet { } } + fn idle_allocate_ring_staking_reward(remaining_weight: &mut Weight) { + // At least 1 read weight is required. + if let Some(rw) = remaining_weight.checked_sub(&T::DbWeight::get().reads(1)) { + *remaining_weight = rw; + } else { + return; + } + + #[cfg(test)] + let weight = Weight::zero().add_ref_time(1); + #[cfg(not(test))] + let weight = T::WeightInfo::allocate_ring_staking_reward_of(); + let mut reward_to_allocate = Vec::new(); + + for (who, amount) in >::iter() { + if let Some(rw) = remaining_weight.checked_sub(&weight) { + *remaining_weight = rw; + + reward_to_allocate.push((who, amount)); + } else { + break; + } + } + + for (who, amount) in reward_to_allocate { + let _ = Self::allocate_ring_staking_reward_of_inner(who.clone(), amount); + + >::remove(&who); + } + } + fn idle_unstake(remaining_weight: &mut Weight) { // At least 1 read weight is required. if let Some(rw) = remaining_weight.checked_sub(&T::DbWeight::get().reads(1)) { @@ -350,9 +385,9 @@ pub mod pallet { return; } - #[cfg(feature = "test")] + #[cfg(test)] let weight = Weight::zero().add_ref_time(1); - #[cfg(not(feature = "test"))] + #[cfg(not(test))] let weight = T::WeightInfo::unstake_all_for(); let mut ledgers_to_migrate = Vec::new(); @@ -367,7 +402,9 @@ pub mod pallet { } for (who, l) in ledgers_to_migrate { - let _ = Self::unstake_all_for_inner(who, l); + let _ = Self::unstake_all_for_inner(who.clone(), l); + + >::remove(&who); } } diff --git a/pallet/staking/src/mock.rs b/pallet/staking/src/mock.rs index 802bce517..289bacd9d 100644 --- a/pallet/staking/src/mock.rs +++ b/pallet/staking/src/mock.rs @@ -28,7 +28,7 @@ use dc_types::UNIT; // polkadot-sdk use frame_support::{ assert_ok, derive_impl, - traits::{OnFinalize, OnInitialize}, + traits::{OnFinalize, OnIdle, OnInitialize}, }; use sp_core::H160; use sp_io::TestExternalities; @@ -244,7 +244,7 @@ impl crate::Election for RingStaking { } } impl crate::Reward for RingStaking { - fn distribute(who: Option, amount: Balance) { + fn allocate(who: Option, amount: Balance) { let Some(who) = who else { return }; let _ = Balances::transfer_keep_alive( RuntimeOrigin::signed(Treasury::account_id()), @@ -255,7 +255,7 @@ impl crate::Reward for RingStaking { } pub enum KtonStaking {} impl crate::Reward for KtonStaking { - fn distribute(_: Option, amount: Balance) { + fn allocate(_: Option, amount: Balance) { let _ = Balances::transfer_keep_alive( RuntimeOrigin::signed(TreasuryAcct::get()), >::get().unwrap(), @@ -329,13 +329,9 @@ impl ExtBuilder { } .assimilate_storage(&mut storage) .unwrap(); - crate::GenesisConfig:: { - collator_count: 3, - collators: (1..=3).map(|i| AccountId(i)).collect(), - ..Default::default() - } - .assimilate_storage(&mut storage) - .unwrap(); + crate::GenesisConfig:: { collator_count: 3, ..Default::default() } + .assimilate_storage(&mut storage) + .unwrap(); let mut ext = TestExternalities::from(storage); @@ -368,6 +364,7 @@ pub fn initialize_block(number: BlockNumber) { } pub fn finalize_block(number: BlockNumber) { + AllPalletsWithSystem::on_idle(number, Weight::MAX); AllPalletsWithSystem::on_finalize(number); } diff --git a/pallet/staking/src/tests.rs b/pallet/staking/src/tests.rs index 279fa7da4..eb2dce83a 100644 --- a/pallet/staking/src/tests.rs +++ b/pallet/staking/src/tests.rs @@ -19,7 +19,7 @@ // darwinia use crate::{mock::*, *}; // polkadot-sdk -use frame_support::{assert_noop, assert_ok}; +use frame_support::{assert_noop, assert_ok, traits::OnIdle}; use sp_runtime::DispatchError; #[test] @@ -77,99 +77,53 @@ fn get_top_collators_should_work() { } #[test] -fn collator_caches_should_work() { +fn elect_should_work() { ExtBuilder.build().execute_with(|| { - assert!(call_on_cache!(>::get()).unwrap().is_empty()); - assert!(call_on_cache!(>::get()).unwrap().is_empty()); - assert_eq!( - call_on_cache!(>::get()).unwrap(), - vec![AccountId(1), AccountId(2), AccountId(3)] - ); - assert_eq!( - >::get(), - (CacheState::Previous, CacheState::Current, CacheState::Next) - ); - - Staking::shift_cache_states(); - - assert!(call_on_cache!(>::get()).unwrap().is_empty()); - assert_eq!( - call_on_cache!(>::get()).unwrap(), - vec![AccountId(1), AccountId(2), AccountId(3)] - ); - assert!(call_on_cache!(>::get()).unwrap().is_empty()); - assert_eq!( - >::get(), - (CacheState::Next, CacheState::Previous, CacheState::Current) - ); - - Staking::shift_cache_states(); - - assert_eq!( - call_on_cache!(>::get()).unwrap(), - vec![AccountId(1), AccountId(2), AccountId(3)] - ); - assert!(call_on_cache!(>::get()).unwrap().is_empty()); - assert!(call_on_cache!(>::get()).unwrap().is_empty()); - assert_eq!( - >::get(), - (CacheState::Current, CacheState::Next, CacheState::Previous) - ); - - Staking::shift_cache_states(); + NEXT_COLLATOR_ID.with(|v| *v.borrow_mut() = 4); - assert!(call_on_cache!(>::get()).unwrap().is_empty()); - assert!(call_on_cache!(>::get()).unwrap().is_empty()); assert_eq!( - call_on_cache!(>::get()).unwrap(), - vec![AccountId(1), AccountId(2), AccountId(3)] - ); - assert_eq!( - >::get(), - (CacheState::Previous, CacheState::Current, CacheState::Next) + ::RingStaking::elect(>::get()).unwrap(), + vec![AccountId(4), AccountId(5), AccountId(6)] ); }); } #[test] -fn elect_should_work() { +fn on_idle_allocate_ring_staking_reward_should_work() { ExtBuilder.build().execute_with(|| { - assert_eq!( - call_on_cache!(>::get()).unwrap(), - vec![AccountId(1), AccountId(2), AccountId(3)] - ); + (1..=512).for_each(|i| >::insert(AccountId(i), 1)); - NEXT_COLLATOR_ID.with(|v| *v.borrow_mut() = 4); - new_session(); + System::reset_events(); + AllPalletsWithSystem::on_idle(0, Weight::zero().add_ref_time(128)); + assert_eq!(events().into_iter().filter(|e| matches!(e, Event::Payout { .. })).count(), 128); - assert_eq!( - call_on_cache!(>::get()).unwrap(), - vec![AccountId(4), AccountId(5), AccountId(6)] - ); + System::reset_events(); + AllPalletsWithSystem::on_idle(0, Weight::MAX); + assert_eq!(events().into_iter().filter(|e| matches!(e, Event::Payout { .. })).count(), 384); }); } #[test] -fn auto_payout_should_work() { +fn on_idle_unstake_should_work() { ExtBuilder.build().execute_with(|| { - Efflux::block(1); - - (1..=3).for_each(|i| >::insert(AccountId(i), i as Balance)); + (1..=512).for_each(|i| { + >::insert( + AccountId(i), + Ledger { ring: i as _, deposits: BoundedVec::new() }, + ) + }); System::reset_events(); - Efflux::block(1); - dbg!(>::iter().collect::>()); - assert_eq!(events(), vec![Event::Payout { who: AccountId(2), amount: 2 }]); + AllPalletsWithSystem::on_idle(0, Weight::zero().add_ref_time(128)); + assert_eq!(>::iter().count(), 384); System::reset_events(); - Efflux::block(1); - dbg!(>::iter().collect::>()); - assert_eq!(events(), vec![Event::Payout { who: AccountId(3), amount: 3 }]); + AllPalletsWithSystem::on_idle(0, Weight::MAX); + assert_eq!(>::iter().count(), 0); - System::reset_events(); - Efflux::block(1); - dbg!(>::iter().collect::>()); - assert_eq!(events(), vec![Event::Payout { who: AccountId(1), amount: 1 }]); + (1..512).for_each(|who| { + assert_eq!(Balances::free_balance(AccountId(who)), 100 + who as Balance); + }); }); } @@ -186,14 +140,27 @@ fn unstake_all_for_should_work() { >::NoRecord ); - >::insert(AccountId(1), Ledger { ring: 1, deposits: Default::default() }); + >::insert(AccountId(1), Ledger { ring: 1, deposits: BoundedVec::new() }); assert_ok!(Staking::unstake_all_for(RuntimeOrigin::signed(AccountId(1)), AccountId(1))); }); } #[test] -fn payout_for_should_work() { - ExtBuilder.build().execute_with(|| {}); +fn allocate_ring_staking_reward_of_should_work() { + ExtBuilder.build().execute_with(|| { + let who = AccountId(1); + + assert_noop!( + Staking::allocate_ring_staking_reward_of(RuntimeOrigin::signed(who), who), + >::NoReward + ); + + >::insert(who, 1); + System::reset_events(); + + assert_ok!(Staking::allocate_ring_staking_reward_of(RuntimeOrigin::signed(who), who)); + assert_eq!(events(), vec![Event::Payout { who, amount: 1 }]); + }); } #[test] @@ -212,3 +179,29 @@ fn set_collator_count_should_work() { assert_eq!(Staking::collator_count(), 1); }); } + +#[test] +fn set_ring_staking_contract_should_work() { + ExtBuilder.build().execute_with(|| { + assert_noop!( + Staking::set_ring_staking_contract(RuntimeOrigin::signed(AccountId(1)), AccountId(1)), + DispatchError::BadOrigin + ); + + assert_ok!(Staking::set_ring_staking_contract(RuntimeOrigin::root(), AccountId(1))); + assert_eq!(Staking::ring_staking_contract(), Some(AccountId(1))); + }); +} + +#[test] +fn set_kton_staking_contract_should_work() { + ExtBuilder.build().execute_with(|| { + assert_noop!( + Staking::set_kton_staking_contract(RuntimeOrigin::signed(AccountId(1)), AccountId(1)), + DispatchError::BadOrigin + ); + + assert_ok!(Staking::set_kton_staking_contract(RuntimeOrigin::root(), AccountId(1))); + assert_eq!(Staking::kton_staking_contract(), Some(AccountId(1))); + }); +} From 9a396615e4d862367939a5d981eb686035c5268a Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Thu, 17 Oct 2024 19:40:09 +0800 Subject: [PATCH 04/17] Part.4 --- pallet/staking/src/lib.rs | 94 +++++++++---------- pallet/staking/src/mock.rs | 26 +++--- pallet/staking/src/tests.rs | 115 ++++++++++++++++++++++-- runtime/darwinia/src/pallets/staking.rs | 2 +- runtime/koi/src/pallets/staking.rs | 2 +- 5 files changed, 167 insertions(+), 72 deletions(-) diff --git a/pallet/staking/src/lib.rs b/pallet/staking/src/lib.rs index a45589a92..d16cc4c9c 100644 --- a/pallet/staking/src/lib.rs +++ b/pallet/staking/src/lib.rs @@ -95,10 +95,10 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - /// A payout has been made for the staker. - Payout { who: T::AccountId, amount: Balance }, - /// Unable to pay the staker's reward. - Unpaid { who: T::AccountId, amount: Balance }, + /// Reward allocated to the account. + RewardAllocated { who: T::AccountId, amount: Balance }, + /// Fail to allocate the reward to the account. + RewardAllocationFailed { who: T::AccountId, amount: Balance }, /// Unstake all stakes for the account. UnstakeAllFor { who: T::AccountId }, } @@ -279,14 +279,27 @@ pub mod pallet { where T: Config, { + pub(crate) fn note_authors(authors: &[T::AccountId]) { + >::mutate(|(total_block_count, author_map)| { + authors.iter().cloned().for_each(|who| { + author_map + .entry(who) + .and_modify(|authored_block_count| *authored_block_count += One::one()) + .or_insert(One::one()); + + *total_block_count += One::one(); + }); + }); + } + /// Allocate the session reward. pub fn allocate_session_reward(amount: Balance) { let treasury = ::Treasury::get(); - if T::IssuingManager::reward(&treasury, amount).is_ok() { - Self::deposit_event(Event::Payout { who: treasury, amount }); + if T::IssuingManager::reward(amount).is_ok() { + Self::deposit_event(Event::RewardAllocated { who: treasury, amount }); } else { - Self::deposit_event(Event::Unpaid { who: treasury, amount }); + Self::deposit_event(Event::RewardAllocationFailed { who: treasury, amount }); } let reward_to_ring_staking = amount.saturating_div(2); @@ -314,24 +327,11 @@ pub mod pallet { ) -> DispatchResult { T::RingStaking::allocate(Some(who.clone()), amount); - Self::deposit_event(Event::Payout { who, amount }); + Self::deposit_event(Event::RewardAllocated { who, amount }); Ok(()) } - fn note_authors(authors: &[T::AccountId]) { - >::mutate(|(total_block_count, author_map)| { - authors.iter().cloned().for_each(|who| { - author_map - .entry(who) - .and_modify(|authored_block_count| *authored_block_count += One::one()) - .or_insert(One::one()); - - *total_block_count += One::one(); - }); - }); - } - fn prepare_new_session(i: u32) -> Option> { let bn = >::block_number(); @@ -460,6 +460,15 @@ pub mod pallet { } pub use pallet::*; +/// Election interface. +pub trait Election { + /// Elect the new collators. + fn elect(_: u32) -> Option> { + None + } +} +impl Election for () {} + /// Issuing and reward manager. pub trait IssuingManager where @@ -484,31 +493,14 @@ where } /// The reward function. - fn reward(_: &T::AccountId, _: Balance) -> DispatchResult { + fn reward(_: Balance) -> DispatchResult { Ok(()) } } impl IssuingManager for () where T: Config {} - -/// Election interface. -pub trait Election { - /// Elect the new collators. - fn elect(_: u32) -> Option> { - None - } -} -impl Election for () {} - -/// Allocate the reward to a contract. -pub trait Reward { - /// Allocate the reward. - fn allocate(_: Option, _: Balance) {} -} -impl Reward for () {} - /// Issue new token from pallet-balances. -pub struct BalanceIssuing(PhantomData); -impl IssuingManager for BalanceIssuing +pub struct BalancesIssuing(PhantomData); +impl IssuingManager for BalancesIssuing where T: Config, { @@ -530,13 +522,12 @@ where PAYOUT_FRAC * issued } - fn reward(who: &T::AccountId, amount: Balance) -> DispatchResult { - let _ = T::Currency::deposit_creating(who, amount); + fn reward(amount: Balance) -> DispatchResult { + let _ = T::Currency::deposit_creating(&T::Treasury::get(), amount); Ok(()) } } - /// Transfer issued token from pallet-treasury. pub struct TreasuryIssuing(PhantomData<(T, R)>); impl IssuingManager for TreasuryIssuing @@ -547,17 +538,14 @@ where fn calculate_reward(_: Balance) -> Balance { R::get() } +} - fn reward(who: &T::AccountId, amount: Balance) -> DispatchResult { - let treasury = ::Treasury::get(); - - if who == &treasury { - Ok(()) - } else { - T::Currency::transfer(&treasury, who, amount, ExistenceRequirement::KeepAlive) - } - } +/// Allocate the reward to a contract. +pub trait Reward { + /// Allocate the reward. + fn allocate(_: Option, _: Balance) {} } +impl Reward for () {} /// A convertor from collators id. /// diff --git a/pallet/staking/src/mock.rs b/pallet/staking/src/mock.rs index 289bacd9d..593b92236 100644 --- a/pallet/staking/src/mock.rs +++ b/pallet/staking/src/mock.rs @@ -196,7 +196,7 @@ pub enum StatedOnSessionEnd {} impl crate::IssuingManager for StatedOnSessionEnd { fn inflate() -> Balance { if INFLATION_TYPE.with(|v| *v.borrow()) == 0 { - >::inflate() + >::inflate() } else { >>::inflate() } @@ -204,17 +204,17 @@ impl crate::IssuingManager for StatedOnSessionEnd { fn calculate_reward(issued: Balance) -> Balance { if INFLATION_TYPE.with(|v| *v.borrow()) == 0 { - >::calculate_reward(issued) + >::calculate_reward(issued) } else { >>::calculate_reward(issued) } } - fn reward(who: &AccountId, amount: Balance) -> sp_runtime::DispatchResult { + fn reward(amount: Balance) -> sp_runtime::DispatchResult { if INFLATION_TYPE.with(|v| *v.borrow()) == 0 { - >::reward(who, amount) + >::reward(amount) } else { - >>::reward(who, amount) + >>::reward( amount) } } } @@ -303,11 +303,11 @@ impl Efflux { pub struct ExtBuilder; impl ExtBuilder { - // pub fn inflation_type(self, r#type: u8) -> Self { - // INFLATION_TYPE.with(|v| *v.borrow_mut() = r#type); + pub fn inflation_type(self, r#type: u8) -> Self { + INFLATION_TYPE.with(|v| *v.borrow_mut() = r#type); - // self - // } + self + } pub fn build(self) -> TestExternalities { let _ = pretty_env_logger::try_init(); @@ -317,7 +317,7 @@ impl ExtBuilder { pallet_balances::GenesisConfig:: { balances: (1..=1_000) .map(|i| (AccountId(i), 100)) - .chain([(Treasury::account_id(), 1 << 64), (account_id(), 1 << 64)]) + .chain([(Treasury::account_id(), 1 << 126), (account_id(), 1 << 126)]) .collect(), } .assimilate_storage(&mut storage) @@ -371,8 +371,12 @@ pub fn finalize_block(number: BlockNumber) { pub fn new_session() { let now = System::block_number(); let target = now + >::get(); + let collators = Session::validators(); - (now..target).for_each(|_| Efflux::block(1)); + (now..target).zip(collators.into_iter().cycle()).for_each(|(_, who)| { + Staking::note_authors(&[who]); + Efflux::block(1); + }); } pub fn events() -> Vec> { diff --git a/pallet/staking/src/tests.rs b/pallet/staking/src/tests.rs index eb2dce83a..ab75b3bfd 100644 --- a/pallet/staking/src/tests.rs +++ b/pallet/staking/src/tests.rs @@ -95,18 +95,24 @@ fn on_idle_allocate_ring_staking_reward_should_work() { System::reset_events(); AllPalletsWithSystem::on_idle(0, Weight::zero().add_ref_time(128)); - assert_eq!(events().into_iter().filter(|e| matches!(e, Event::Payout { .. })).count(), 128); + assert_eq!( + events().into_iter().filter(|e| matches!(e, Event::RewardAllocated { .. })).count(), + 128 + ); System::reset_events(); AllPalletsWithSystem::on_idle(0, Weight::MAX); - assert_eq!(events().into_iter().filter(|e| matches!(e, Event::Payout { .. })).count(), 384); + assert_eq!( + events().into_iter().filter(|e| matches!(e, Event::RewardAllocated { .. })).count(), + 384 + ); }); } #[test] fn on_idle_unstake_should_work() { ExtBuilder.build().execute_with(|| { - (1..=512).for_each(|i| { + (4..=515).for_each(|i| { >::insert( AccountId(i), Ledger { ring: i as _, deposits: BoundedVec::new() }, @@ -121,7 +127,9 @@ fn on_idle_unstake_should_work() { AllPalletsWithSystem::on_idle(0, Weight::MAX); assert_eq!(>::iter().count(), 0); - (1..512).for_each(|who| { + // Skip 1 to 3 collators. + // Since they have session rewards which make calculation more complex. + (4..515).for_each(|who| { assert_eq!(Balances::free_balance(AccountId(who)), 100 + who as Balance); }); }); @@ -129,7 +137,102 @@ fn on_idle_unstake_should_work() { #[test] fn on_new_session_should_work() { - ExtBuilder.build().execute_with(|| {}); + ExtBuilder.inflation_type(0).build().execute_with(|| { + new_session(); + new_session(); + + assert_eq!(Session::validators(), vec![AccountId(1), AccountId(2), AccountId(3)]); + + NEXT_COLLATOR_ID.with(|v| *v.borrow_mut() = 4); + System::reset_events(); + new_session(); + new_session(); + + assert_eq!(Session::validators(), vec![AccountId(4), AccountId(5), AccountId(6)]); + // payout to treasury * 2 session + // + + // payout to collators * 2 session + // + // 1 * 2 + 3 * 2 = 8 + assert_eq!( + events().into_iter().filter(|e| matches!(e, Event::RewardAllocated { .. })).count(), + 8 + ); + assert_eq!( + (1..=3).map(|who| { Balances::free_balance(AccountId(who)) }).collect::>(), + vec![5059704513256525, 5059704513256525, 2529852256628310] + ); + + NEXT_COLLATOR_ID.with(|v| *v.borrow_mut() = 7); + System::reset_events(); + new_session(); + new_session(); + + assert_eq!(Session::validators(), vec![AccountId(7), AccountId(8), AccountId(9)]); + // payout to treasury * 2 session + // + + // payout to collators * 2 session + // + // 1 * 2 + 3 * 2 = 8 + assert_eq!( + events().into_iter().filter(|e| matches!(e, Event::RewardAllocated { .. })).count(), + 8 + ); + assert_eq!( + (1..=3).map(|who| { Balances::free_balance(AccountId(who)) }).collect::>(), + vec![5059704513256525, 5059704513256525, 2529852256628310] + ); + }); + + // Reset. + NEXT_COLLATOR_ID.with(|v| *v.borrow_mut() = 1); + + ExtBuilder.inflation_type(1).build().execute_with(|| { + new_session(); + new_session(); + + assert_eq!(Session::validators(), vec![AccountId(1), AccountId(2), AccountId(3)]); + + NEXT_COLLATOR_ID.with(|v| *v.borrow_mut() = 4); + System::reset_events(); + new_session(); + new_session(); + + assert_eq!(Session::validators(), vec![AccountId(4), AccountId(5), AccountId(6)]); + // payout to treasury * 2 session + // + + // payout to collators * 2 session + // + // 1 * 2 + 3 * 2 = 8 + assert_eq!( + events().into_iter().filter(|e| matches!(e, Event::RewardAllocated { .. })).count(), + 8 + ); + assert_eq!( + (1..=3).map(|who| { Balances::free_balance(AccountId(who)) }).collect::>(), + vec![20000000000000000000100, 20000000000000000000100, 10000000000000000000100] + ); + + NEXT_COLLATOR_ID.with(|v| *v.borrow_mut() = 7); + System::reset_events(); + new_session(); + new_session(); + + assert_eq!(Session::validators(), vec![AccountId(7), AccountId(8), AccountId(9)]); + // payout to treasury * 2 session + // + + // payout to collators * 2 session + // + // 1 * 2 + 3 * 2 = 8 + assert_eq!( + events().into_iter().filter(|e| matches!(e, Event::RewardAllocated { .. })).count(), + 8 + ); + assert_eq!( + (1..=3).map(|who| { Balances::free_balance(AccountId(who)) }).collect::>(), + vec![20000000000000000000100, 20000000000000000000100, 10000000000000000000100] + ); + }); } #[test] @@ -159,7 +262,7 @@ fn allocate_ring_staking_reward_of_should_work() { System::reset_events(); assert_ok!(Staking::allocate_ring_staking_reward_of(RuntimeOrigin::signed(who), who)); - assert_eq!(events(), vec![Event::Payout { who, amount: 1 }]); + assert_eq!(events(), vec![Event::RewardAllocated { who, amount: 1 }]); }); } diff --git a/runtime/darwinia/src/pallets/staking.rs b/runtime/darwinia/src/pallets/staking.rs index ef0d0f84f..3b118da9d 100644 --- a/runtime/darwinia/src/pallets/staking.rs +++ b/runtime/darwinia/src/pallets/staking.rs @@ -73,7 +73,7 @@ impl darwinia_staking::Stake for KtonStaking { impl darwinia_staking::Config for Runtime { type Currency = Balances; type Deposit = Deposit; - type IssuingManager = darwinia_staking::BalanceIssuing; + type IssuingManager = darwinia_staking::BalancesIssuing; type KtonStaking = darwinia_staking::KtonStaking; type MaxDeposits = ::MaxDeposits; type Ring = RingStaking; diff --git a/runtime/koi/src/pallets/staking.rs b/runtime/koi/src/pallets/staking.rs index e444a9029..ba4403789 100644 --- a/runtime/koi/src/pallets/staking.rs +++ b/runtime/koi/src/pallets/staking.rs @@ -46,7 +46,7 @@ impl darwinia_staking::Stake for RingStaking { impl darwinia_staking::Config for Runtime { type Currency = Balances; type Deposit = Deposit; - type IssuingManager = darwinia_staking::BalanceIssuing; + type IssuingManager = darwinia_staking::BalancesIssuing; type KtonStaking = darwinia_staking::KtonStaking; type MaxDeposits = ::MaxDeposits; type Ring = RingStaking; From 1f64c629489f5f3b222e76c3c3b7a3148767d8fb Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Fri, 18 Oct 2024 11:43:32 +0800 Subject: [PATCH 05/17] Part.5 --- Cargo.lock | 23 -- Cargo.toml | 1 - Makefile.toml | 2 +- node/src/service/mod.rs | 28 +-- pallet/account-migration/src/benchmarking.rs | 8 +- pallet/account-migration/src/lib.rs | 5 +- pallet/deposit/src/lib.rs | 2 +- pallet/staking/src/benchmarking.rs | 5 +- precompile/deposit/Cargo.toml | 59 ----- precompile/deposit/src/lib.rs | 93 -------- precompile/deposit/src/mock.rs | 202 ------------------ precompile/deposit/src/tests.rs | 74 ------- precompile/staking/src/lib.rs | 128 +++-------- runtime/crab/Cargo.toml | 2 - runtime/crab/src/pallets.rs | 2 - runtime/crab/src/pallets/deposit.rs | 26 --- runtime/crab/src/pallets/evm.rs | 2 - runtime/crab/src/pallets/staking.rs | 55 ----- runtime/crab/src/weights/darwinia_deposit.rs | 76 +------ runtime/crab/src/weights/darwinia_staking.rs | 128 +++-------- runtime/darwinia/Cargo.toml | 2 - runtime/darwinia/src/migration.rs | 61 +----- runtime/darwinia/src/pallets.rs | 2 - runtime/darwinia/src/pallets/deposit.rs | 26 --- runtime/darwinia/src/pallets/evm.rs | 2 - runtime/darwinia/src/pallets/staking.rs | 55 ----- runtime/darwinia/src/pallets/system.rs | 13 +- .../darwinia/src/weights/darwinia_deposit.rs | 76 +------ .../darwinia/src/weights/darwinia_staking.rs | 124 +++-------- runtime/koi/Cargo.toml | 2 - runtime/koi/src/pallets.rs | 2 - runtime/koi/src/pallets/deposit.rs | 26 --- runtime/koi/src/pallets/evm.rs | 2 - runtime/koi/src/pallets/staking.rs | 30 --- runtime/koi/src/weights/darwinia_deposit.rs | 74 +------ runtime/koi/src/weights/darwinia_staking.rs | 122 ++--------- 36 files changed, 159 insertions(+), 1381 deletions(-) delete mode 100644 precompile/deposit/Cargo.toml delete mode 100644 precompile/deposit/src/lib.rs delete mode 100644 precompile/deposit/src/mock.rs delete mode 100644 precompile/deposit/src/tests.rs diff --git a/Cargo.lock b/Cargo.lock index 6ab30f853..ecd0923a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1630,7 +1630,6 @@ dependencies = [ "darwinia-deposit", "darwinia-ethtx-forwarder", "darwinia-precompile-assets", - "darwinia-precompile-deposit", "darwinia-precompile-staking", "darwinia-precompile-state-storage", "darwinia-staking", @@ -2842,26 +2841,6 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] -[[package]] -name = "darwinia-precompile-deposit" -version = "6.7.1" -dependencies = [ - "darwinia-deposit", - "fp-evm", - "frame-support", - "frame-system", - "pallet-balances", - "pallet-evm", - "pallet-timestamp", - "parity-scale-codec", - "precompile-utils 0.1.0", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", -] - [[package]] name = "darwinia-precompile-staking" version = "6.7.1" @@ -2923,7 +2902,6 @@ dependencies = [ "darwinia-deposit", "darwinia-ethtx-forwarder", "darwinia-precompile-assets", - "darwinia-precompile-deposit", "darwinia-precompile-staking", "darwinia-precompile-state-storage", "darwinia-staking", @@ -5754,7 +5732,6 @@ dependencies = [ "darwinia-deposit", "darwinia-ethtx-forwarder", "darwinia-precompile-assets", - "darwinia-precompile-deposit", "darwinia-precompile-staking", "darwinia-precompile-state-storage", "darwinia-staking", diff --git a/Cargo.toml b/Cargo.toml index 4c8a9d0db..2aa7189a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,6 @@ darwinia-common-runtime = { path = "runtime/common", default-features darwinia-deposit = { path = "pallet/deposit", default-features = false } darwinia-ethtx-forwarder = { path = "pallet/ethtx-forwarder", default-features = false } darwinia-precompile-assets = { path = "precompile/assets", default-features = false } -darwinia-precompile-deposit = { path = "precompile/deposit", default-features = false } darwinia-precompile-staking = { path = "precompile/staking", default-features = false } darwinia-precompile-state-storage = { path = "precompile/state-storage", default-features = false } darwinia-runtime = { path = "runtime/darwinia" } diff --git a/Makefile.toml b/Makefile.toml index 1febb6aa5..6348706ca 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -19,7 +19,7 @@ args = ["fmt"] [tasks.clippy] env = { "SKIP_WASM_BUILD" = "1" } command = "cargo" -args = ["clippy"] +args = ["clippy", "--all-features"] [tasks.c] alias = "clippy" diff --git a/node/src/service/mod.rs b/node/src/service/mod.rs index a6ddf4513..332d8a4ab 100644 --- a/node/src/service/mod.rs +++ b/node/src/service/mod.rs @@ -398,12 +398,14 @@ where ); // Create a mocked parachain inherent data provider to pass all validations in the - // parachain system. Without this, the pending functionality will fail. - let mut state_proof_builder = - cumulus_test_relay_sproof_builder::RelayStateSproofBuilder::default(); - state_proof_builder.para_id = para_id; - state_proof_builder.current_slot = relay_chain_slot; - state_proof_builder.included_para_head = Some(polkadot_primitives::HeadData(vec![])); + // parachain system. + // Without this, the pending functionality will fail. + let state_proof_builder = cumulus_test_relay_sproof_builder::RelayStateSproofBuilder { + para_id, + current_slot: relay_chain_slot, + included_para_head: Some(polkadot_primitives::HeadData(vec![])), + ..Default::default() + }; let (relay_parent_storage_root, relay_chain_state) = state_proof_builder.into_state_root_and_proof(); let parachain_inherent_data = @@ -924,12 +926,14 @@ where SlotDuration::from_millis(RELAY_CHAIN_SLOT_DURATION_MILLIS as u64), ); // Create a mocked parachain inherent data provider to pass all validations in the - // parachain system. Without this, the pending functionality will fail. - let mut state_proof_builder = - cumulus_test_relay_sproof_builder::RelayStateSproofBuilder::default(); - state_proof_builder.para_id = para_id; - state_proof_builder.current_slot = relay_chain_slot; - state_proof_builder.included_para_head = Some(polkadot_primitives::HeadData(vec![])); + // parachain system. + // Without this, the pending functionality will fail. + let state_proof_builder = cumulus_test_relay_sproof_builder::RelayStateSproofBuilder { + para_id, + current_slot: relay_chain_slot, + included_para_head: Some(polkadot_primitives::HeadData(vec![])), + ..Default::default() + }; let (relay_parent_storage_root, relay_chain_state) = state_proof_builder.into_state_root_and_proof(); let parachain_inherent_data = diff --git a/pallet/account-migration/src/benchmarking.rs b/pallet/account-migration/src/benchmarking.rs index 6dce09416..a1275851a 100644 --- a/pallet/account-migration/src/benchmarking.rs +++ b/pallet/account-migration/src/benchmarking.rs @@ -79,18 +79,14 @@ mod benchmarks { expired_time: Default::default(), in_use: Default::default(), }; - ::MaxDeposits::get() as usize + 512 ], ); >::insert( from, OldLedger { staked_ring: 1, - staked_deposits: BoundedVec::truncate_from(vec![ - Default::default(); - ::MaxDeposits::get() - as usize - ]), + staked_deposits: BoundedVec::truncate_from(vec![Default::default(); 512]), unstaking_ring: BoundedVec::truncate_from(vec![ ( Default::default(), diff --git a/pallet/account-migration/src/lib.rs b/pallet/account-migration/src/lib.rs index 337f9b19d..b9991561a 100644 --- a/pallet/account-migration/src/lib.rs +++ b/pallet/account-migration/src/lib.rs @@ -108,10 +108,7 @@ pub mod pallet { > + pallet_assets::Config + pallet_balances::Config + darwinia_deposit::Config - + darwinia_staking::Config< - Deposit = darwinia_deposit::Pallet, - MaxDeposits = ConstU32<512>, - > + + darwinia_staking::Config { /// Override the [`frame_system::Config::RuntimeEvent`]. type RuntimeEvent: From + IsType<::RuntimeEvent>; diff --git a/pallet/deposit/src/lib.rs b/pallet/deposit/src/lib.rs index 93fc41be4..bb647f4c9 100644 --- a/pallet/deposit/src/lib.rs +++ b/pallet/deposit/src/lib.rs @@ -235,7 +235,7 @@ pub mod pallet { } } - T::Ring::transfer(&account_id(), &who, to_claim.0, AllowDeath)?; + T::Ring::transfer(&account_id(), who, to_claim.0, AllowDeath)?; T::Ring::transfer(&account_id(), &T::Treasury::get(), to_migrate.0, AllowDeath)?; T::DepositMigrator::migrate(who.clone(), to_migrate.0, to_migrate.2)?; diff --git a/pallet/staking/src/benchmarking.rs b/pallet/staking/src/benchmarking.rs index 404fb2486..543c677ea 100644 --- a/pallet/staking/src/benchmarking.rs +++ b/pallet/staking/src/benchmarking.rs @@ -18,7 +18,6 @@ // darwinia use crate::*; -use dc_types::UNIT; // polkadot-sdk use frame_benchmarking::v2; use frame_system::RawOrigin; @@ -28,12 +27,10 @@ use sp_std::prelude::*; mod benchmarks { // darwinia use super::*; - // polkadot-sdk - use frame_support::traits::Currency; #[benchmark] fn unstake_all_for() { - let a = frame_benchmarking::whitelisted_caller(); + let a = frame_benchmarking::whitelisted_caller::(); let a_cloned = a.clone(); // Worst-case scenario: diff --git a/precompile/deposit/Cargo.toml b/precompile/deposit/Cargo.toml deleted file mode 100644 index f478498f1..000000000 --- a/precompile/deposit/Cargo.toml +++ /dev/null @@ -1,59 +0,0 @@ -[package] -authors.workspace = true -description = "Deposit precompile for EVM pallet." -edition.workspace = true -name = "darwinia-precompile-deposit" -readme = "README.md" -version.workspace = true - -[dependencies] -# frontier -fp-evm = { workspace = true } -pallet-evm = { workspace = true } - -# darwinia -darwinia-deposit = { workspace = true } - -# moonbeam -precompile-utils = { workspace = true } - -# polkadot-sdk -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -[dev-dependencies] -# crates.io -codec = { workspace = true, features = ["std"] } -scale-info = { workspace = true, features = ["std"] } - -# moonbeam -precompile-utils = { workspace = true, features = ["std", "testing"] } - -# polkadot-sdk -pallet-balances = { workspace = true, features = ["std"] } -pallet-timestamp = { workspace = true, features = ["std"] } -sp-io = { workspace = true, features = ["std"] } - -[features] -default = ["std"] -std = [ - # frontier - "fp-evm/std", - "pallet-evm/std", - - # darwinia - "darwinia-deposit/std", - - # moonbeam - "precompile-utils/std", - - # polkadot-sdk - "frame-support/std", - "frame-system/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", -] diff --git a/precompile/deposit/src/lib.rs b/precompile/deposit/src/lib.rs deleted file mode 100644 index b1fafa014..000000000 --- a/precompile/deposit/src/lib.rs +++ /dev/null @@ -1,93 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg(test)] -mod mock; -#[cfg(test)] -mod tests; - -// core -use core::marker::PhantomData; -// moonbeam -use precompile_utils::prelude::*; -// polkadot-sdk -use frame_support::{ - dispatch::{GetDispatchInfo, PostDispatchInfo}, - traits::OriginTrait, -}; -use sp_core::{H160, U256}; -use sp_runtime::traits::Dispatchable; - -/// AccountId of the runtime. -type AccountIdOf = ::AccountId; - -pub struct Deposit(PhantomData); - -#[precompile_utils::precompile] -impl Deposit -where - Runtime: darwinia_deposit::Config + pallet_evm::Config, - Runtime::RuntimeCall: From> - + Dispatchable - + GetDispatchInfo, - ::AccountId: From, - <::RuntimeCall as Dispatchable>::RuntimeOrigin: OriginTrait, - ::RuntimeOrigin: From>, - AccountIdOf: From, -{ - #[precompile::public("lock(uint256,uint8)")] - fn lock(handle: &mut impl PrecompileHandle, amount: U256, months: u8) -> EvmResult { - let origin: AccountIdOf = handle.context().caller.into(); - - RuntimeHelper::::try_dispatch( - handle, - Some(origin).into(), - darwinia_deposit::Call::::lock { amount: amount.as_u128(), months }, - )?; - - Ok(true) - } - - #[precompile::public("claim()")] - fn claim(handle: &mut impl PrecompileHandle) -> EvmResult { - let origin: AccountIdOf = handle.context().caller.into(); - - RuntimeHelper::::try_dispatch( - handle, - Some(origin).into(), - darwinia_deposit::Call::::claim {}, - )?; - - Ok(true) - } - - #[precompile::public("claim_with_penalty(uint8)")] - fn claim_with_penalty(handle: &mut impl PrecompileHandle, id: u8) -> EvmResult { - let origin: AccountIdOf = handle.context().caller.into(); - - RuntimeHelper::::try_dispatch( - handle, - Some(origin).into(), - darwinia_deposit::Call::::claim_with_penalty { id: id.into() }, - )?; - - Ok(true) - } -} diff --git a/precompile/deposit/src/mock.rs b/precompile/deposit/src/mock.rs deleted file mode 100644 index c1134fb1f..000000000 --- a/precompile/deposit/src/mock.rs +++ /dev/null @@ -1,202 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -// crates.io -use codec::{Decode, Encode, MaxEncodedLen}; -// darwinia -use crate::*; -// frontier -use precompile_utils::Precompile; -// polkadot-sdk -use frame_support::derive_impl; -use sp_core::{H160, U256}; -use sp_runtime::BuildStorage; - -pub type Balance = u128; -type Moment = u128; -pub type AccountId = H160; -pub type PCall = DepositCall; - -#[derive(Clone, Encode, Decode, Debug, MaxEncodedLen, scale_info::TypeInfo)] -pub enum Account { - Alice, - Bob, - Precompile, -} -#[allow(clippy::from_over_into)] -impl Into for Account { - fn into(self) -> H160 { - match self { - Account::Alice => H160::repeat_byte(0xAA), - Account::Bob => H160::repeat_byte(0xBB), - Account::Precompile => H160::from_low_u64_be(1), - } - } -} - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] -impl frame_system::Config for Runtime { - type AccountData = pallet_balances::AccountData; - type AccountId = AccountId; - type Block = frame_system::mocking::MockBlock; - type Lookup = sp_runtime::traits::IdentityLookup; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] -impl pallet_balances::Config for Runtime { - type AccountStore = System; - type Balance = Balance; - type ExistentialDeposit = (); -} - -#[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig as pallet_timestamp::DefaultConfig)] -impl pallet_timestamp::Config for Runtime { - type MinimumPeriod = (); - type Moment = Moment; -} - -pub enum KtonMinting {} -impl darwinia_deposit::SimpleAsset for KtonMinting { - type AccountId = AccountId; - - fn mint(_: &Self::AccountId, _: Balance) -> sp_runtime::DispatchResult { - Ok(()) - } - - fn burn(_: &Self::AccountId, _: Balance) -> sp_runtime::DispatchResult { - Ok(()) - } -} - -impl darwinia_deposit::Config for Runtime { - type DepositMigrator = (); - type Kton = KtonMinting; - type MaxDeposits = frame_support::traits::ConstU32<16>; - type Ring = Balances; - type RuntimeEvent = RuntimeEvent; - type Treasury = (); - type WeightInfo = (); -} - -pub struct TestPrecompiles(PhantomData); -impl TestPrecompiles -where - R: pallet_evm::Config, -{ - #[allow(clippy::new_without_default)] - pub fn new() -> Self { - Self(Default::default()) - } - - pub fn used_addresses() -> [H160; 1] { - [addr(1)] - } -} -impl fp_evm::PrecompileSet for TestPrecompiles -where - crate::Deposit: fp_evm::Precompile, - R: pallet_evm::Config, -{ - fn execute(&self, handle: &mut impl PrecompileHandle) -> Option> { - match handle.code_address() { - a if a == addr(1) => Some(crate::Deposit::::execute(handle)), - _ => None, - } - } - - fn is_precompile(&self, address: H160, _gas: u64) -> fp_evm::IsPrecompileResult { - fp_evm::IsPrecompileResult::Answer { - is_precompile: Self::used_addresses().contains(&address), - extra_cost: 0, - } - } -} -fn addr(a: u64) -> H160 { - H160::from_low_u64_be(a) -} - -frame_support::parameter_types! { - pub const BlockGasLimit: U256 = U256::MAX; - pub const WeightPerGas: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(20_000, 0); - pub PrecompilesValue: TestPrecompiles = TestPrecompiles::<_>::new(); -} - -impl pallet_evm::Config for Runtime { - type AddressMapping = pallet_evm::IdentityAddressMapping; - type BlockGasLimit = BlockGasLimit; - type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; - type CallOrigin = pallet_evm::EnsureAddressRoot; - type ChainId = frame_support::traits::ConstU64<42>; - type Currency = Balances; - type FeeCalculator = (); - type FindAuthor = (); - type GasLimitPovSizeRatio = (); - type GasWeightMapping = pallet_evm::FixedGasWeightMapping; - type OnChargeTransaction = (); - type OnCreate = (); - type PrecompilesType = TestPrecompiles; - type PrecompilesValue = PrecompilesValue; - type Runner = pallet_evm::runner::stack::Runner; - type RuntimeEvent = RuntimeEvent; - type SuicideQuickClearLimit = (); - type Timestamp = Timestamp; - type WeightInfo = (); - type WeightPerGas = WeightPerGas; - type WithdrawOrigin = pallet_evm::EnsureAddressNever; -} - -frame_support::construct_runtime! { - pub enum Runtime { - System: frame_system, - Balances: pallet_balances, - Timestamp: pallet_timestamp, - Deposit: darwinia_deposit, - EVM: pallet_evm, - } -} - -pub fn efflux(milli_secs: u128) { - Timestamp::set_timestamp(Timestamp::now() + milli_secs); -} - -#[derive(Default)] -pub struct ExtBuilder { - // endowed accounts with balances - balances: Vec<(AccountId, Balance)>, -} - -impl ExtBuilder { - pub fn with_balances(mut self, balances: Vec<(AccountId, Balance)>) -> Self { - self.balances = balances; - self - } - - pub fn build(self) -> sp_io::TestExternalities { - let mut t = >::default() - .build_storage() - .expect("Frame system builds valid default genesis config"); - - pallet_balances::GenesisConfig:: { balances: self.balances } - .assimilate_storage(&mut t) - .expect("Pallet balances storage can be assimilated"); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext - } -} diff --git a/precompile/deposit/src/tests.rs b/precompile/deposit/src/tests.rs deleted file mode 100644 index 45023f7ca..000000000 --- a/precompile/deposit/src/tests.rs +++ /dev/null @@ -1,74 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -// darwinia -use crate::mock::{ - Account::{Alice, Precompile}, - Deposit, *, -}; -use darwinia_deposit::MILLISECS_PER_MONTH; -// moonbeam -use precompile_utils::testing::PrecompileTesterExt; -// polkadot-sdk -use sp_core::H160; - -fn precompiles() -> TestPrecompiles { - PrecompilesValue::get() -} - -#[test] -fn selectors() { - assert!(PCall::lock_selectors().contains(&0x998e4242)); - assert!(PCall::claim_selectors().contains(&0x4e71d92d)); - assert!(PCall::claim_with_penalty_selectors().contains(&0xfa04a9bf)); -} - -#[test] -fn lock_and_claim() { - let alice: H160 = Alice.into(); - ExtBuilder::default().with_balances(vec![(alice, 300)]).build().execute_with(|| { - // lock - precompiles() - .prepare_test(alice, Precompile, PCall::lock { amount: 200.into(), months: 1 }) - .execute_returns(true); - assert!(Deposit::deposit_of(alice).is_some()); - - // claim - efflux(MILLISECS_PER_MONTH); - precompiles().prepare_test(alice, Precompile, PCall::claim {}).execute_returns(true); - assert!(Deposit::deposit_of(alice).is_none()); - }); -} - -#[test] -fn claim_with_penalty() { - let alice: H160 = Alice.into(); - ExtBuilder::default().with_balances(vec![(alice, 300)]).build().execute_with(|| { - // lock - precompiles() - .prepare_test(alice, Precompile, PCall::lock { amount: 200.into(), months: 1 }) - .execute_returns(true); - assert!(Deposit::deposit_of(alice).is_some()); - - // claim with penalty - precompiles() - .prepare_test(alice, Precompile, PCall::claim_with_penalty { id: 0 }) - .execute_returns(true); - assert!(Deposit::deposit_of(alice).is_none()); - }); -} diff --git a/precompile/staking/src/lib.rs b/precompile/staking/src/lib.rs index 68c5bd539..fe23ce12d 100644 --- a/precompile/staking/src/lib.rs +++ b/precompile/staking/src/lib.rs @@ -25,8 +25,6 @@ mod tests; // core use core::marker::PhantomData; -// darwinia -use darwinia_staking::Stake; // moonbeam use precompile_utils::prelude::*; // polkadot-sdk @@ -35,7 +33,7 @@ use frame_support::{ traits::OriginTrait, }; use sp_core::{H160, U256}; -use sp_runtime::{traits::Dispatchable, Perbill}; +use sp_runtime::traits::Dispatchable; use sp_std::prelude::*; pub struct Staking(PhantomData); @@ -50,97 +48,37 @@ where ::RuntimeOrigin: From>, ::AccountId: From, <::RuntimeCall as Dispatchable>::RuntimeOrigin: OriginTrait, - <::Deposit as Stake>::Item: From, { - #[precompile::public("stake(uint256,uint16[])")] - fn stake( - handle: &mut impl PrecompileHandle, - ring_amount: U256, - deposits: Vec, - ) -> EvmResult { - let origin = handle.context().caller.into(); - let deposits = deposits.into_iter().map(|i| i.into()).collect(); - - RuntimeHelper::::try_dispatch( - handle, - Some(origin).into(), - darwinia_staking::Call::::stake { - ring_amount: ring_amount.as_u128(), - deposits, - }, - )?; - Ok(true) - } - - #[precompile::public("unstake(uint256,uint16[])")] - fn unstake( - handle: &mut impl PrecompileHandle, - ring_amount: U256, - deposits: Vec, - ) -> EvmResult { - let origin = handle.context().caller.into(); - let deposits = deposits.into_iter().map(|i| i.into()).collect(); - - RuntimeHelper::::try_dispatch( - handle, - Some(origin).into(), - darwinia_staking::Call::::unstake { - ring_amount: ring_amount.as_u128(), - deposits, - }, - )?; - Ok(true) - } - - #[precompile::public("collect(uint32)")] - fn collect(handle: &mut impl PrecompileHandle, commission: u32) -> EvmResult { - let origin = handle.context().caller.into(); - - RuntimeHelper::::try_dispatch( - handle, - Some(origin).into(), - darwinia_staking::Call::::collect { - commission: Perbill::from_percent(commission), - }, - )?; - Ok(true) - } - - #[precompile::public("nominate(address)")] - fn nominate(handle: &mut impl PrecompileHandle, target: Address) -> EvmResult { - let target: H160 = target.into(); - let origin = handle.context().caller.into(); - - RuntimeHelper::::try_dispatch( - handle, - Some(origin).into(), - darwinia_staking::Call::::nominate { target: target.into() }, - )?; - Ok(true) - } - - #[precompile::public("chill()")] - fn chill(handle: &mut impl PrecompileHandle) -> EvmResult { - let origin = handle.context().caller.into(); - - RuntimeHelper::::try_dispatch( - handle, - Some(origin).into(), - darwinia_staking::Call::::chill {}, - )?; - Ok(true) - } - - #[precompile::public("payout(address)")] - fn payout(handle: &mut impl PrecompileHandle, who: Address) -> EvmResult { - let who: H160 = who.into(); - let origin = handle.context().caller.into(); - - RuntimeHelper::::try_dispatch( - handle, - Some(origin).into(), - darwinia_staking::Call::::payout { who: who.into() }, - )?; - Ok(true) - } + // #[precompile::public("unstake(uint256,uint16[])")] + // fn unstake( + // handle: &mut impl PrecompileHandle, + // ring_amount: U256, + // deposits: Vec, + // ) -> EvmResult { + // let origin = handle.context().caller.into(); + // let deposits = deposits.into_iter().map(|i| i.into()).collect(); + + // RuntimeHelper::::try_dispatch( + // handle, + // Some(origin).into(), + // darwinia_staking::Call::::unstake { + // ring_amount: ring_amount.as_u128(), + // deposits, + // }, + // )?; + // Ok(true) + // } + + // #[precompile::public("payout(address)")] + // fn payout(handle: &mut impl PrecompileHandle, who: Address) -> EvmResult { + // let who: H160 = who.into(); + // let origin = handle.context().caller.into(); + + // RuntimeHelper::::try_dispatch( + // handle, + // Some(origin).into(), + // darwinia_staking::Call::::payout { who: who.into() }, + // )?; + // Ok(true) + // } } diff --git a/runtime/crab/Cargo.toml b/runtime/crab/Cargo.toml index 66e62e2a3..3a2e43b53 100644 --- a/runtime/crab/Cargo.toml +++ b/runtime/crab/Cargo.toml @@ -25,7 +25,6 @@ darwinia-common-runtime = { workspace = true } darwinia-deposit = { workspace = true } darwinia-ethtx-forwarder = { workspace = true } darwinia-precompile-assets = { workspace = true } -darwinia-precompile-deposit = { workspace = true } darwinia-precompile-staking = { workspace = true } darwinia-precompile-state-storage = { workspace = true } darwinia-staking = { workspace = true } @@ -134,7 +133,6 @@ std = [ "darwinia-deposit/std", "darwinia-ethtx-forwarder/std", "darwinia-precompile-assets/std", - "darwinia-precompile-deposit/std", "darwinia-precompile-staking/std", "darwinia-precompile-state-storage/std", "darwinia-staking/std", diff --git a/runtime/crab/src/pallets.rs b/runtime/crab/src/pallets.rs index bfc7549bc..32cf01974 100644 --- a/runtime/crab/src/pallets.rs +++ b/runtime/crab/src/pallets.rs @@ -42,8 +42,6 @@ mod assets; pub use assets::*; mod deposit; -#[cfg(feature = "runtime-benchmarks")] -pub use deposit::*; mod account_migration; diff --git a/runtime/crab/src/pallets/deposit.rs b/runtime/crab/src/pallets/deposit.rs index b54bc48af..77e71c0a2 100644 --- a/runtime/crab/src/pallets/deposit.rs +++ b/runtime/crab/src/pallets/deposit.rs @@ -19,34 +19,8 @@ // darwinia use crate::*; -pub enum KtonMinting {} -impl darwinia_deposit::SimpleAsset for KtonMinting { - type AccountId = AccountId; - - fn mint(beneficiary: &Self::AccountId, amount: Balance) -> sp_runtime::DispatchResult { - Assets::mint( - RuntimeOrigin::signed(KTON_ADMIN), - (AssetIds::CKton as AssetId).into(), - *beneficiary, - amount, - ) - } - - fn burn(who: &Self::AccountId, amount: Balance) -> sp_runtime::DispatchResult { - let asset_id = AssetIds::CKton as _; - - if Assets::balance(asset_id, who) < amount { - Err(>::BalanceLow)?; - } - - Assets::burn(RuntimeOrigin::signed(KTON_ADMIN), asset_id.into(), *who, amount) - } -} - impl darwinia_deposit::Config for Runtime { type DepositMigrator = darwinia_deposit::DepositMigrator; - type Kton = KtonMinting; - type MaxDeposits = ConstU32<512>; type Ring = Balances; type RuntimeEvent = RuntimeEvent; type Treasury = pallet_config::TreasuryAccount; diff --git a/runtime/crab/src/pallets/evm.rs b/runtime/crab/src/pallets/evm.rs index 71bb74bf1..43d641025 100644 --- a/runtime/crab/src/pallets/evm.rs +++ b/runtime/crab/src/pallets/evm.rs @@ -107,8 +107,6 @@ where handle, )), // [0x600, 0x800) reserved for other stable precompiles. - a if a == addr(0x600) => - Some(>::execute(handle)), a if a == addr(0x601) => Some(>::execute(handle)), a if a == addr(0x602) => diff --git a/runtime/crab/src/pallets/staking.rs b/runtime/crab/src/pallets/staking.rs index b119edc4c..355e6923b 100644 --- a/runtime/crab/src/pallets/staking.rs +++ b/runtime/crab/src/pallets/staking.rs @@ -18,71 +18,16 @@ // darwinia use crate::*; -// polkadot-sdk -use frame_support::traits::Currency; darwinia_common_runtime::fast_runtime_or_not!(DURATION, BlockNumber, 5 * MINUTES, 14 * DAYS); -pub enum RingStaking {} -impl darwinia_staking::Stake for RingStaking { - type AccountId = AccountId; - type Item = Balance; - - fn stake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - >::transfer( - who, - &darwinia_staking::account_id(), - item, - frame_support::traits::ExistenceRequirement::AllowDeath, - ) - } - - fn unstake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - >::transfer( - &darwinia_staking::account_id(), - who, - item, - frame_support::traits::ExistenceRequirement::AllowDeath, - ) - } -} -pub enum KtonStaking {} -impl darwinia_staking::Stake for KtonStaking { - type AccountId = AccountId; - type Item = Balance; - - fn stake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - Assets::transfer( - RuntimeOrigin::signed(*who), - (AssetIds::CKton as AssetId).into(), - darwinia_staking::account_id(), - item, - ) - } - - fn unstake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - Assets::transfer( - RuntimeOrigin::signed(darwinia_staking::account_id()), - (AssetIds::CKton as AssetId).into(), - *who, - item, - ) - } -} - impl darwinia_staking::Config for Runtime { type Currency = Balances; - type Deposit = Deposit; type IssuingManager = darwinia_staking::TreasuryIssuing>; type KtonStaking = darwinia_staking::KtonStaking; - type MaxDeposits = ::MaxDeposits; - type Ring = RingStaking; type RingStaking = darwinia_staking::RingStaking; type RuntimeEvent = RuntimeEvent; - type ShouldEndSession = darwinia_staking::ShouldEndSession; type Treasury = pallet_config::TreasuryAccount; type UnixTime = Timestamp; type WeightInfo = weights::darwinia_staking::WeightInfo; } -#[cfg(not(feature = "runtime-benchmarks"))] -impl darwinia_staking::DepositConfig for Runtime {} diff --git a/runtime/crab/src/weights/darwinia_deposit.rs b/runtime/crab/src/weights/darwinia_deposit.rs index 199eb5453..0525ad818 100644 --- a/runtime/crab/src/weights/darwinia_deposit.rs +++ b/runtime/crab/src/weights/darwinia_deposit.rs @@ -55,62 +55,6 @@ use core::marker::PhantomData; /// Weight functions for `darwinia_deposit`. pub struct WeightInfo(PhantomData); impl darwinia_deposit::WeightInfo for WeightInfo { - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - fn lock() -> Weight { - // Proof Size summary in bytes: - // Measured: `26712` - // Estimated: `29615` - // Minimum execution time: 89_000_000 picoseconds. - Weight::from_parts(98_000_000, 0) - .saturating_add(Weight::from_parts(0, 29615)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn claim() -> Weight { - // Proof Size summary in bytes: - // Measured: `26441` - // Estimated: `29615` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(80_000_000, 0) - .saturating_add(Weight::from_parts(0, 29615)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn claim_with_penalty() -> Weight { - // Proof Size summary in bytes: - // Measured: `26763` - // Estimated: `29615` - // Minimum execution time: 91_000_000 picoseconds. - Weight::from_parts(110_000_000, 0) - .saturating_add(Weight::from_parts(0, 29615)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } /// Storage: `Deposit::Deposits` (r:1 w:1) /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// Storage: `Timestamp::Now` (r:1 w:0) @@ -127,15 +71,15 @@ impl darwinia_deposit::WeightInfo for WeightInfo { /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Ethereum::Pending` (r:1 w:1) /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn migrate() -> Weight { + fn migrate_for() -> Weight { // Proof Size summary in bytes: - // Measured: `27325` - // Estimated: `33265` - // Minimum execution time: 3_914_000_000 picoseconds. - Weight::from_parts(4_387_000_000, 0) - .saturating_add(Weight::from_parts(0, 33265)) - .saturating_add(T::DbWeight::get().reads(11)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `27516` + // Estimated: `33456` + // Minimum execution time: 4_057_000 nanoseconds. + Weight::from_parts(4_577_000_000, 0) + .saturating_add(Weight::from_parts(33456, 0)) + .saturating_add(T::DbWeight::get().reads(11_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `Deposit::DepositContract` (r:0 w:1) /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -143,9 +87,9 @@ impl darwinia_deposit::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 2_000 nanoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } diff --git a/runtime/crab/src/weights/darwinia_staking.rs b/runtime/crab/src/weights/darwinia_staking.rs index ab85d14e4..5870a656a 100644 --- a/runtime/crab/src/weights/darwinia_staking.rs +++ b/runtime/crab/src/weights/darwinia_staking.rs @@ -66,81 +66,15 @@ impl darwinia_staking::WeightInfo for WeightInfo { /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 1023]`. - fn stake(x: u32, ) -> Weight { + fn unstake_all_for() -> Weight { // Proof Size summary in bytes: - // Measured: `7021 + x * (25 ±0)` - // Estimated: `29615` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(673_923_539, 0) - .saturating_add(Weight::from_parts(0, 29615)) - // Standard Error: 255_028 - .saturating_add(Weight::from_parts(13_024_071, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `DarwiniaStaking::Ledgers` (r:1 w:1) - /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimitState` (r:1 w:1) - /// Proof: `DarwiniaStaking::RateLimitState` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 1023]`. - fn unstake(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `7348 + x * (26 ±0)` - // Estimated: `29615` - // Minimum execution time: 55_000_000 picoseconds. - Weight::from_parts(691_873_667, 0) - .saturating_add(Weight::from_parts(0, 29615)) - // Standard Error: 257_398 - .saturating_add(Weight::from_parts(13_012_274, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `DarwiniaStaking::Collators` (r:1 w:1) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - fn collect() -> Weight { - // Proof Size summary in bytes: - // Measured: `388` - // Estimated: `3497` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) - .saturating_add(Weight::from_parts(0, 3497)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `DarwiniaStaking::Ledgers` (r:1 w:0) - /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Collators` (r:1 w:0) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Nominators` (r:1 w:1) - /// Proof: `DarwiniaStaking::Nominators` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - fn nominate() -> Weight { - // Proof Size summary in bytes: - // Measured: `600` - // Estimated: `4543` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) - .saturating_add(Weight::from_parts(0, 4543)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `DarwiniaStaking::Nominators` (r:0 w:1) - /// Proof: `DarwiniaStaking::Nominators` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Collators` (r:0 w:1) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - fn chill() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `2330` + // Estimated: `83902` + // Minimum execution time: 535_000 nanoseconds. + Weight::from_parts(629_000_000, 0) + .saturating_add(Weight::from_parts(83902, 0)) + .saturating_add(T::DbWeight::get().reads(35_u64)) + .saturating_add(T::DbWeight::get().writes(34_u64)) } /// Storage: `DarwiniaStaking::ExposureCacheStates` (r:1 w:0) /// Proof: `DarwiniaStaking::ExposureCacheStates` (`max_values`: Some(1), `max_size`: Some(3), added: 498, mode: `MaxEncodedLen`) @@ -148,28 +82,17 @@ impl darwinia_staking::WeightInfo for WeightInfo { /// Proof: `DarwiniaStaking::ExposureCache2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `DarwiniaStaking::PendingRewards` (r:1 w:1) /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:0) + /// Storage: `System::Account` (r:32 w:32) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn payout() -> Weight { - // Proof Size summary in bytes: - // Measured: `1811` - // Estimated: `5276` - // Minimum execution time: 141_000_000 picoseconds. - Weight::from_parts(169_000_000, 0) - .saturating_add(Weight::from_parts(0, 5276)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `DarwiniaStaking::RateLimit` (r:0 w:1) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_rate_limit() -> Weight { + fn allocate_ring_staking_reward_of() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `2330` + // Estimated: `83902` + // Minimum execution time: 535_000 nanoseconds. + Weight::from_parts(629_000_000, 0) + .saturating_add(Weight::from_parts(83902, 0)) + .saturating_add(T::DbWeight::get().reads(35_u64)) + .saturating_add(T::DbWeight::get().writes(34_u64)) } /// Storage: `DarwiniaStaking::RingStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -177,20 +100,21 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 2_000 nanoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } /// Storage: `DarwiniaStaking::KtonStakingContract` (r:0 w:1) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `DarwiniaStaking::KtonStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::KtonStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_kton_staking_contract() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 2_000 nanoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `DarwiniaStaking::CollatorCount` (r:0 w:1) /// Proof: `DarwiniaStaking::CollatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -198,9 +122,9 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 2_000 nanoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } diff --git a/runtime/darwinia/Cargo.toml b/runtime/darwinia/Cargo.toml index fe8b6ef26..33d0aac87 100644 --- a/runtime/darwinia/Cargo.toml +++ b/runtime/darwinia/Cargo.toml @@ -27,7 +27,6 @@ darwinia-common-runtime = { workspace = true } darwinia-deposit = { workspace = true } darwinia-ethtx-forwarder = { workspace = true } darwinia-precompile-assets = { workspace = true } -darwinia-precompile-deposit = { workspace = true } darwinia-precompile-staking = { workspace = true } darwinia-precompile-state-storage = { workspace = true } darwinia-staking = { workspace = true } @@ -143,7 +142,6 @@ std = [ "darwinia-deposit/std", "darwinia-ethtx-forwarder/std", "darwinia-precompile-assets/std", - "darwinia-precompile-deposit/std", "darwinia-precompile-staking/std", "darwinia-precompile-state-storage/std", "darwinia-staking/std", diff --git a/runtime/darwinia/src/migration.rs b/runtime/darwinia/src/migration.rs index ad8fd8fe8..198778bb6 100644 --- a/runtime/darwinia/src/migration.rs +++ b/runtime/darwinia/src/migration.rs @@ -45,64 +45,5 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { } fn migrate() -> frame_support::weights::Weight { - // darwinia - use darwinia_staking::CacheState; - if let Some(s) = migration::get_storage_value::<(CacheState, CacheState, CacheState)>( - b"DarwiniaStaking", - b"ExposureCacheStates", - &[], - ) { - migration::put_storage_value(b"DarwiniaStaking", b"CacheStates", &[], s); - } - - if let Ok(dao) = - array_bytes::hex_n_into::<_, AccountId, 20>("0x08837De0Ae21C270383D9F2de4DB03c7b1314632") - { - let _ = >::transfer_ownership( - RuntimeOrigin::signed(ROOT), - codec::Compact(AssetIds::Kton as AssetId), - dao, - ); - - if let Ok(deposit) = array_bytes::hex_n_into::<_, AccountId, 20>( - "0x46275d29113f065c2aac262f34C7a3d8a8B7377D", - ) { - let _ = >::set_team( - RuntimeOrigin::signed(dao), - codec::Compact(AssetIds::Kton as AssetId), - deposit, - deposit, - dao, - ); - - >::put(deposit); - } - - log::info!("successfully transfer ownership of KTON to KTON DAO"); - } - if let Ok(who) = - array_bytes::hex_n_into::<_, AccountId, 20>("0xa4fFAC7A5Da311D724eD47393848f694Baee7930") - { - >::put(who); - - log::info!("successfully set RING staking contract"); - } - - >::put(darwinia_staking::now::()); - - if let Some(k) = migration::take_storage_value::( - b"DarwiniaStaking", - b"KtonRewardDistributionContract", - &[], - ) { - >::put(k); - - log::info!("successfully set KTON staking contract"); - } - - if let Ok(k) = array_bytes::hex2bytes("0x1da53b775b270400e7e61ed5cbc5a146ab1160471b1418779239ba8e2b847e42d53de13b56da115d3342f0588bc3614108837de0ae21c270383d9f2de4db03c7b1314632314d8c74970d627c9b4f4c42e06688a9f7a2866905a810c4b1a49b8cb0dca3f1bc953905609869b6e9d4fb794cd36c5f") { - let _ = System::kill_storage(RuntimeOrigin::root(), vec![k]); - } - - ::DbWeight::get().reads_writes(7, 10) + ::DbWeight::get().reads_writes(0, 0) } diff --git a/runtime/darwinia/src/pallets.rs b/runtime/darwinia/src/pallets.rs index 15e84e1a7..fdfb521c4 100644 --- a/runtime/darwinia/src/pallets.rs +++ b/runtime/darwinia/src/pallets.rs @@ -42,8 +42,6 @@ mod assets; pub use assets::*; mod deposit; -#[cfg(feature = "runtime-benchmarks")] -pub use deposit::*; mod account_migration; diff --git a/runtime/darwinia/src/pallets/deposit.rs b/runtime/darwinia/src/pallets/deposit.rs index d723c020f..77e71c0a2 100644 --- a/runtime/darwinia/src/pallets/deposit.rs +++ b/runtime/darwinia/src/pallets/deposit.rs @@ -19,34 +19,8 @@ // darwinia use crate::*; -pub enum KtonMinting {} -impl darwinia_deposit::SimpleAsset for KtonMinting { - type AccountId = AccountId; - - fn mint(beneficiary: &Self::AccountId, amount: Balance) -> sp_runtime::DispatchResult { - Assets::mint( - RuntimeOrigin::signed(KTON_ADMIN), - (AssetIds::Kton as AssetId).into(), - *beneficiary, - amount, - ) - } - - fn burn(who: &Self::AccountId, amount: Balance) -> sp_runtime::DispatchResult { - let asset_id = AssetIds::Kton as _; - - if Assets::balance(asset_id, who) < amount { - Err(>::BalanceLow)?; - } - - Assets::burn(RuntimeOrigin::signed(KTON_ADMIN), asset_id.into(), *who, amount) - } -} - impl darwinia_deposit::Config for Runtime { type DepositMigrator = darwinia_deposit::DepositMigrator; - type Kton = KtonMinting; - type MaxDeposits = ConstU32<512>; type Ring = Balances; type RuntimeEvent = RuntimeEvent; type Treasury = pallet_config::TreasuryAccount; diff --git a/runtime/darwinia/src/pallets/evm.rs b/runtime/darwinia/src/pallets/evm.rs index 6b3fbe642..c02f4fbd7 100644 --- a/runtime/darwinia/src/pallets/evm.rs +++ b/runtime/darwinia/src/pallets/evm.rs @@ -109,8 +109,6 @@ where handle, )), // [0x600, 0x800) reserved for other stable precompiles. - a if a == addr(0x600) => - Some(>::execute(handle)), a if a == addr(0x601) => Some(>::execute(handle)), a if a == addr(0x602) => diff --git a/runtime/darwinia/src/pallets/staking.rs b/runtime/darwinia/src/pallets/staking.rs index 3b118da9d..78cfe2de7 100644 --- a/runtime/darwinia/src/pallets/staking.rs +++ b/runtime/darwinia/src/pallets/staking.rs @@ -18,71 +18,16 @@ // darwinia use crate::*; -// polkadot-sdk -use frame_support::traits::Currency; darwinia_common_runtime::fast_runtime_or_not!(DURATION, BlockNumber, 5 * MINUTES, 14 * DAYS); -pub enum RingStaking {} -impl darwinia_staking::Stake for RingStaking { - type AccountId = AccountId; - type Item = Balance; - - fn stake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - >::transfer( - who, - &darwinia_staking::account_id(), - item, - frame_support::traits::ExistenceRequirement::AllowDeath, - ) - } - - fn unstake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - >::transfer( - &darwinia_staking::account_id(), - who, - item, - frame_support::traits::ExistenceRequirement::AllowDeath, - ) - } -} -pub enum KtonStaking {} -impl darwinia_staking::Stake for KtonStaking { - type AccountId = AccountId; - type Item = Balance; - - fn stake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - Assets::transfer( - RuntimeOrigin::signed(*who), - (AssetIds::Kton as AssetId).into(), - darwinia_staking::account_id(), - item, - ) - } - - fn unstake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - Assets::transfer( - RuntimeOrigin::signed(darwinia_staking::account_id()), - (AssetIds::Kton as AssetId).into(), - *who, - item, - ) - } -} - impl darwinia_staking::Config for Runtime { type Currency = Balances; - type Deposit = Deposit; type IssuingManager = darwinia_staking::BalancesIssuing; type KtonStaking = darwinia_staking::KtonStaking; - type MaxDeposits = ::MaxDeposits; - type Ring = RingStaking; type RingStaking = darwinia_staking::RingStaking; type RuntimeEvent = RuntimeEvent; - type ShouldEndSession = darwinia_staking::ShouldEndSession; type Treasury = pallet_config::TreasuryAccount; type UnixTime = Timestamp; type WeightInfo = weights::darwinia_staking::WeightInfo; } -#[cfg(not(feature = "runtime-benchmarks"))] -impl darwinia_staking::DepositConfig for Runtime {} diff --git a/runtime/darwinia/src/pallets/system.rs b/runtime/darwinia/src/pallets/system.rs index f00b1c9e5..7825ab56a 100644 --- a/runtime/darwinia/src/pallets/system.rs +++ b/runtime/darwinia/src/pallets/system.rs @@ -25,22 +25,11 @@ frame_support::parameter_types! { pub const Version: sp_version::RuntimeVersion = VERSION; } -pub enum LockAndStake {} -impl frame_support::traits::Contains for LockAndStake { - fn contains(c: &RuntimeCall) -> bool { - matches!( - c, - RuntimeCall::DarwiniaStaking(darwinia_staking::Call::stake { .. }) - | RuntimeCall::Deposit(darwinia_deposit::Call::lock { .. }) - ) - } -} - #[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountId; - type BaseCallFilter = frame_support::traits::EverythingBut; + type BaseCallFilter = frame_support::traits::Everything; type Block = Block; type BlockLength = pallet_config::RuntimeBlockLength; type BlockWeights = pallet_config::RuntimeBlockWeights; diff --git a/runtime/darwinia/src/weights/darwinia_deposit.rs b/runtime/darwinia/src/weights/darwinia_deposit.rs index 10e8bffe9..c1472c710 100644 --- a/runtime/darwinia/src/weights/darwinia_deposit.rs +++ b/runtime/darwinia/src/weights/darwinia_deposit.rs @@ -55,62 +55,6 @@ use core::marker::PhantomData; /// Weight functions for `darwinia_deposit`. pub struct WeightInfo(PhantomData); impl darwinia_deposit::WeightInfo for WeightInfo { - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - fn lock() -> Weight { - // Proof Size summary in bytes: - // Measured: `26812` - // Estimated: `29615` - // Minimum execution time: 83_000_000 picoseconds. - Weight::from_parts(100_000_000, 0) - .saturating_add(Weight::from_parts(0, 29615)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn claim() -> Weight { - // Proof Size summary in bytes: - // Measured: `26541` - // Estimated: `29615` - // Minimum execution time: 65_000_000 picoseconds. - Weight::from_parts(84_000_000, 0) - .saturating_add(Weight::from_parts(0, 29615)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn claim_with_penalty() -> Weight { - // Proof Size summary in bytes: - // Measured: `26863` - // Estimated: `29615` - // Minimum execution time: 95_000_000 picoseconds. - Weight::from_parts(111_000_000, 0) - .saturating_add(Weight::from_parts(0, 29615)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } /// Storage: `Deposit::Deposits` (r:1 w:1) /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// Storage: `Timestamp::Now` (r:1 w:0) @@ -127,15 +71,15 @@ impl darwinia_deposit::WeightInfo for WeightInfo { /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Ethereum::Pending` (r:1 w:1) /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn migrate() -> Weight { + fn migrate_for() -> Weight { // Proof Size summary in bytes: - // Measured: `27484` - // Estimated: `33424` - // Minimum execution time: 3_936_000_000 picoseconds. - Weight::from_parts(4_548_000_000, 0) - .saturating_add(Weight::from_parts(0, 33424)) - .saturating_add(T::DbWeight::get().reads(11)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `27516` + // Estimated: `33456` + // Minimum execution time: 4_057_000 nanoseconds. + Weight::from_parts(4_577_000_000, 0) + .saturating_add(Weight::from_parts(33456, 0)) + .saturating_add(T::DbWeight::get().reads(11_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `Deposit::DepositContract` (r:0 w:1) /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -143,9 +87,9 @@ impl darwinia_deposit::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 2_000 nanoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } diff --git a/runtime/darwinia/src/weights/darwinia_staking.rs b/runtime/darwinia/src/weights/darwinia_staking.rs index cddebe04b..c29085ee7 100644 --- a/runtime/darwinia/src/weights/darwinia_staking.rs +++ b/runtime/darwinia/src/weights/darwinia_staking.rs @@ -66,81 +66,15 @@ impl darwinia_staking::WeightInfo for WeightInfo { /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 1023]`. - fn stake(x: u32, ) -> Weight { + fn unstake_all_for() -> Weight { // Proof Size summary in bytes: - // Measured: `7088 + x * (25 ±0)` - // Estimated: `29615` - // Minimum execution time: 52_000_000 picoseconds. - Weight::from_parts(770_181_918, 0) - .saturating_add(Weight::from_parts(0, 29615)) - // Standard Error: 262_777 - .saturating_add(Weight::from_parts(13_019_225, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `DarwiniaStaking::Ledgers` (r:1 w:1) - /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimitState` (r:1 w:1) - /// Proof: `DarwiniaStaking::RateLimitState` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 1023]`. - fn unstake(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `7415 + x * (26 ±0)` - // Estimated: `29615` - // Minimum execution time: 51_000_000 picoseconds. - Weight::from_parts(755_853_947, 0) - .saturating_add(Weight::from_parts(0, 29615)) - // Standard Error: 261_936 - .saturating_add(Weight::from_parts(13_061_272, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `DarwiniaStaking::Collators` (r:1 w:1) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - fn collect() -> Weight { - // Proof Size summary in bytes: - // Measured: `388` - // Estimated: `3497` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) - .saturating_add(Weight::from_parts(0, 3497)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `DarwiniaStaking::Ledgers` (r:1 w:0) - /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Collators` (r:1 w:0) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Nominators` (r:1 w:1) - /// Proof: `DarwiniaStaking::Nominators` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - fn nominate() -> Weight { - // Proof Size summary in bytes: - // Measured: `600` - // Estimated: `4543` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) - .saturating_add(Weight::from_parts(0, 4543)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `DarwiniaStaking::Nominators` (r:0 w:1) - /// Proof: `DarwiniaStaking::Nominators` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Collators` (r:0 w:1) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - fn chill() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `2330` + // Estimated: `83902` + // Minimum execution time: 535_000 nanoseconds. + Weight::from_parts(629_000_000, 0) + .saturating_add(Weight::from_parts(83902, 0)) + .saturating_add(T::DbWeight::get().reads(35_u64)) + .saturating_add(T::DbWeight::get().writes(34_u64)) } /// Storage: `DarwiniaStaking::ExposureCacheStates` (r:1 w:0) /// Proof: `DarwiniaStaking::ExposureCacheStates` (`max_values`: Some(1), `max_size`: Some(3), added: 498, mode: `MaxEncodedLen`) @@ -150,26 +84,15 @@ impl darwinia_staking::WeightInfo for WeightInfo { /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:32 w:32) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn payout() -> Weight { + fn allocate_ring_staking_reward_of() -> Weight { // Proof Size summary in bytes: - // Measured: `2184` + // Measured: `2330` // Estimated: `83902` - // Minimum execution time: 527_000_000 picoseconds. - Weight::from_parts(616_000_000, 0) - .saturating_add(Weight::from_parts(0, 83902)) - .saturating_add(T::DbWeight::get().reads(35)) - .saturating_add(T::DbWeight::get().writes(34)) - } - /// Storage: `DarwiniaStaking::RateLimit` (r:0 w:1) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_rate_limit() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 535_000 nanoseconds. + Weight::from_parts(629_000_000, 0) + .saturating_add(Weight::from_parts(83902, 0)) + .saturating_add(T::DbWeight::get().reads(35_u64)) + .saturating_add(T::DbWeight::get().writes(34_u64)) } /// Storage: `DarwiniaStaking::RingStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -177,20 +100,21 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 2_000 nanoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } /// Storage: `DarwiniaStaking::KtonStakingContract` (r:0 w:1) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `DarwiniaStaking::KtonStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::KtonStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_kton_staking_contract() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 2_000 nanoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `DarwiniaStaking::CollatorCount` (r:0 w:1) /// Proof: `DarwiniaStaking::CollatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -198,9 +122,9 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 2_000 nanoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } diff --git a/runtime/koi/Cargo.toml b/runtime/koi/Cargo.toml index 104a3fa00..1339f2167 100644 --- a/runtime/koi/Cargo.toml +++ b/runtime/koi/Cargo.toml @@ -24,7 +24,6 @@ darwinia-common-runtime = { workspace = true } darwinia-deposit = { workspace = true } darwinia-ethtx-forwarder = { workspace = true } darwinia-precompile-assets = { workspace = true } -darwinia-precompile-deposit = { workspace = true } darwinia-precompile-staking = { workspace = true } darwinia-precompile-state-storage = { workspace = true } darwinia-staking = { workspace = true } @@ -139,7 +138,6 @@ std = [ "darwinia-deposit/std", "darwinia-ethtx-forwarder/std", "darwinia-precompile-assets/std", - "darwinia-precompile-deposit/std", "darwinia-precompile-staking/std", "darwinia-precompile-state-storage/std", "darwinia-staking/std", diff --git a/runtime/koi/src/pallets.rs b/runtime/koi/src/pallets.rs index 3fd287d88..2e5b21d77 100644 --- a/runtime/koi/src/pallets.rs +++ b/runtime/koi/src/pallets.rs @@ -42,8 +42,6 @@ mod assets; pub use assets::*; mod deposit; -#[cfg(feature = "runtime-benchmarks")] -pub use deposit::*; // Consensus stuff. mod authorship; diff --git a/runtime/koi/src/pallets/deposit.rs b/runtime/koi/src/pallets/deposit.rs index fc5b2673e..77e71c0a2 100644 --- a/runtime/koi/src/pallets/deposit.rs +++ b/runtime/koi/src/pallets/deposit.rs @@ -19,34 +19,8 @@ // darwinia use crate::*; -pub enum KtonMinting {} -impl darwinia_deposit::SimpleAsset for KtonMinting { - type AccountId = AccountId; - - fn mint(beneficiary: &Self::AccountId, amount: Balance) -> sp_runtime::DispatchResult { - Assets::mint( - RuntimeOrigin::signed(KTON_ADMIN), - (AssetIds::KKton as AssetId).into(), - *beneficiary, - amount, - ) - } - - fn burn(who: &Self::AccountId, amount: Balance) -> sp_runtime::DispatchResult { - let asset_id = AssetIds::KKton as _; - - if Assets::balance(asset_id, who) < amount { - Err(>::BalanceLow)?; - } - - Assets::burn(RuntimeOrigin::signed(KTON_ADMIN), asset_id.into(), *who, amount) - } -} - impl darwinia_deposit::Config for Runtime { type DepositMigrator = darwinia_deposit::DepositMigrator; - type Kton = KtonMinting; - type MaxDeposits = ConstU32<512>; type Ring = Balances; type RuntimeEvent = RuntimeEvent; type Treasury = pallet_config::TreasuryAccount; diff --git a/runtime/koi/src/pallets/evm.rs b/runtime/koi/src/pallets/evm.rs index c2e4f158f..986dd748c 100644 --- a/runtime/koi/src/pallets/evm.rs +++ b/runtime/koi/src/pallets/evm.rs @@ -127,8 +127,6 @@ where handle, )), // [0x600, 0x800) reserved for other stable precompiles. - a if a == addr(0x600) => - Some(>::execute(handle)), a if a == addr(0x601) => Some(>::execute(handle)), a if a == addr(0x602) => diff --git a/runtime/koi/src/pallets/staking.rs b/runtime/koi/src/pallets/staking.rs index ba4403789..835785187 100644 --- a/runtime/koi/src/pallets/staking.rs +++ b/runtime/koi/src/pallets/staking.rs @@ -19,43 +19,13 @@ // darwinia use crate::*; -pub enum RingStaking {} -impl darwinia_staking::Stake for RingStaking { - type AccountId = AccountId; - type Item = Balance; - - fn stake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - >::transfer( - who, - &darwinia_staking::account_id(), - item, - frame_support::traits::ExistenceRequirement::AllowDeath, - ) - } - - fn unstake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - >::transfer( - &darwinia_staking::account_id(), - who, - item, - frame_support::traits::ExistenceRequirement::AllowDeath, - ) - } -} - impl darwinia_staking::Config for Runtime { type Currency = Balances; - type Deposit = Deposit; type IssuingManager = darwinia_staking::BalancesIssuing; type KtonStaking = darwinia_staking::KtonStaking; - type MaxDeposits = ::MaxDeposits; - type Ring = RingStaking; type RingStaking = darwinia_staking::RingStaking; type RuntimeEvent = RuntimeEvent; - type ShouldEndSession = darwinia_staking::ShouldEndSession; type Treasury = pallet_config::TreasuryAccount; type UnixTime = Timestamp; type WeightInfo = weights::darwinia_staking::WeightInfo; } -#[cfg(not(feature = "runtime-benchmarks"))] -impl darwinia_staking::DepositConfig for Runtime {} diff --git a/runtime/koi/src/weights/darwinia_deposit.rs b/runtime/koi/src/weights/darwinia_deposit.rs index 172164848..9c663a2a9 100644 --- a/runtime/koi/src/weights/darwinia_deposit.rs +++ b/runtime/koi/src/weights/darwinia_deposit.rs @@ -55,62 +55,6 @@ use core::marker::PhantomData; /// Weight functions for `darwinia_deposit`. pub struct WeightInfo(PhantomData); impl darwinia_deposit::WeightInfo for WeightInfo { - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - fn lock() -> Weight { - // Proof Size summary in bytes: - // Measured: `26812` - // Estimated: `29615` - // Minimum execution time: 81_000_000 picoseconds. - Weight::from_parts(92_000_000, 0) - .saturating_add(Weight::from_parts(0, 29615)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn claim() -> Weight { - // Proof Size summary in bytes: - // Measured: `26541` - // Estimated: `29615` - // Minimum execution time: 66_000_000 picoseconds. - Weight::from_parts(70_000_000, 0) - .saturating_add(Weight::from_parts(0, 29615)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:1 w:1) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn claim_with_penalty() -> Weight { - // Proof Size summary in bytes: - // Measured: `26863` - // Estimated: `29615` - // Minimum execution time: 90_000_000 picoseconds. - Weight::from_parts(98_000_000, 0) - .saturating_add(Weight::from_parts(0, 29615)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } /// Storage: `Deposit::Deposits` (r:1 w:1) /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// Storage: `Timestamp::Now` (r:1 w:0) @@ -127,15 +71,15 @@ impl darwinia_deposit::WeightInfo for WeightInfo { /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Ethereum::Pending` (r:1 w:1) /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn migrate() -> Weight { + fn migrate_for() -> Weight { // Proof Size summary in bytes: // Measured: `27516` // Estimated: `33456` - // Minimum execution time: 4_027_000_000 picoseconds. - Weight::from_parts(4_420_000_000, 0) - .saturating_add(Weight::from_parts(0, 33456)) - .saturating_add(T::DbWeight::get().reads(11)) - .saturating_add(T::DbWeight::get().writes(4)) + // Minimum execution time: 4_057_000 nanoseconds. + Weight::from_parts(4_577_000_000, 0) + .saturating_add(Weight::from_parts(33456, 0)) + .saturating_add(T::DbWeight::get().reads(11_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `Deposit::DepositContract` (r:0 w:1) /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -143,9 +87,9 @@ impl darwinia_deposit::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 2_000 nanoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } diff --git a/runtime/koi/src/weights/darwinia_staking.rs b/runtime/koi/src/weights/darwinia_staking.rs index 365b6fc7b..15e2fae46 100644 --- a/runtime/koi/src/weights/darwinia_staking.rs +++ b/runtime/koi/src/weights/darwinia_staking.rs @@ -66,81 +66,15 @@ impl darwinia_staking::WeightInfo for WeightInfo { /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 1023]`. - fn stake(x: u32, ) -> Weight { + fn unstake_all_for() -> Weight { // Proof Size summary in bytes: - // Measured: `7088 + x * (25 ±0)` - // Estimated: `29615` - // Minimum execution time: 48_000_000 picoseconds. - Weight::from_parts(713_221_476, 0) - .saturating_add(Weight::from_parts(0, 29615)) - // Standard Error: 256_283 - .saturating_add(Weight::from_parts(12_886_306, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `DarwiniaStaking::Ledgers` (r:1 w:1) - /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimitState` (r:1 w:1) - /// Proof: `DarwiniaStaking::RateLimitState` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 1023]`. - fn unstake(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `7415 + x * (26 ±0)` - // Estimated: `29615` - // Minimum execution time: 50_000_000 picoseconds. - Weight::from_parts(754_642_664, 0) - .saturating_add(Weight::from_parts(0, 29615)) - // Standard Error: 263_617 - .saturating_add(Weight::from_parts(13_048_816, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `DarwiniaStaking::Collators` (r:1 w:1) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - fn collect() -> Weight { - // Proof Size summary in bytes: - // Measured: `388` - // Estimated: `3497` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) - .saturating_add(Weight::from_parts(0, 3497)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `DarwiniaStaking::Ledgers` (r:1 w:0) - /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Collators` (r:1 w:0) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Nominators` (r:1 w:1) - /// Proof: `DarwiniaStaking::Nominators` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - fn nominate() -> Weight { - // Proof Size summary in bytes: - // Measured: `600` - // Estimated: `4543` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) - .saturating_add(Weight::from_parts(0, 4543)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `DarwiniaStaking::Nominators` (r:0 w:1) - /// Proof: `DarwiniaStaking::Nominators` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::Collators` (r:0 w:1) - /// Proof: `DarwiniaStaking::Collators` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `MaxEncodedLen`) - fn chill() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `2330` + // Estimated: `83902` + // Minimum execution time: 535_000 nanoseconds. + Weight::from_parts(629_000_000, 0) + .saturating_add(Weight::from_parts(83902, 0)) + .saturating_add(T::DbWeight::get().reads(35_u64)) + .saturating_add(T::DbWeight::get().writes(34_u64)) } /// Storage: `DarwiniaStaking::ExposureCacheStates` (r:1 w:0) /// Proof: `DarwiniaStaking::ExposureCacheStates` (`max_values`: Some(1), `max_size`: Some(3), added: 498, mode: `MaxEncodedLen`) @@ -150,26 +84,15 @@ impl darwinia_staking::WeightInfo for WeightInfo { /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:32 w:32) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - fn payout() -> Weight { + fn allocate_ring_staking_reward_of() -> Weight { // Proof Size summary in bytes: // Measured: `2330` // Estimated: `83902` - // Minimum execution time: 534_000_000 picoseconds. - Weight::from_parts(626_000_000, 0) - .saturating_add(Weight::from_parts(0, 83902)) - .saturating_add(T::DbWeight::get().reads(35)) - .saturating_add(T::DbWeight::get().writes(34)) - } - /// Storage: `DarwiniaStaking::RateLimit` (r:0 w:1) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - fn set_rate_limit() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 535_000 nanoseconds. + Weight::from_parts(629_000_000, 0) + .saturating_add(Weight::from_parts(83902, 0)) + .saturating_add(T::DbWeight::get().reads(35_u64)) + .saturating_add(T::DbWeight::get().writes(34_u64)) } /// Storage: `DarwiniaStaking::RingStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -177,20 +100,21 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 2_000 nanoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } /// Storage: `DarwiniaStaking::KtonStakingContract` (r:0 w:1) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `DarwiniaStaking::KtonStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::KtonStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn set_kton_staking_contract() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 2_000 nanoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `DarwiniaStaking::CollatorCount` (r:0 w:1) /// Proof: `DarwiniaStaking::CollatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -198,9 +122,9 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 2_000 nanoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } From 630781b23c46acc2813851b948dc914bc5eb54b1 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Fri, 18 Oct 2024 17:22:42 +0800 Subject: [PATCH 06/17] Part.6 --- Cargo.lock | 25 --- Cargo.toml | 1 - pallet/account-migration/src/mock.rs | 33 ---- pallet/staking/src/benchmarking.rs | 9 +- pallet/staking/src/mock.rs | 8 +- precompile/staking/Cargo.toml | 72 -------- precompile/staking/src/lib.rs | 84 --------- precompile/staking/src/mock.rs | 248 --------------------------- precompile/staking/src/tests.rs | 133 -------------- runtime/crab/Cargo.toml | 3 - runtime/crab/src/pallets/evm.rs | 2 - runtime/darwinia/Cargo.toml | 3 - runtime/darwinia/src/pallets/evm.rs | 2 - runtime/koi/Cargo.toml | 3 - runtime/koi/src/pallets/evm.rs | 2 - 15 files changed, 9 insertions(+), 619 deletions(-) delete mode 100644 precompile/staking/Cargo.toml delete mode 100644 precompile/staking/src/lib.rs delete mode 100644 precompile/staking/src/mock.rs delete mode 100644 precompile/staking/src/tests.rs diff --git a/Cargo.lock b/Cargo.lock index ecd0923a3..e531d68e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1630,7 +1630,6 @@ dependencies = [ "darwinia-deposit", "darwinia-ethtx-forwarder", "darwinia-precompile-assets", - "darwinia-precompile-staking", "darwinia-precompile-state-storage", "darwinia-staking", "dc-primitives", @@ -2841,28 +2840,6 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", ] -[[package]] -name = "darwinia-precompile-staking" -version = "6.7.1" -dependencies = [ - "darwinia-deposit", - "darwinia-staking", - "dc-primitives", - "fp-evm", - "frame-support", - "frame-system", - "pallet-balances", - "pallet-evm", - "pallet-timestamp", - "parity-scale-codec", - "precompile-utils 0.1.0", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", -] - [[package]] name = "darwinia-precompile-state-storage" version = "6.7.1" @@ -2902,7 +2879,6 @@ dependencies = [ "darwinia-deposit", "darwinia-ethtx-forwarder", "darwinia-precompile-assets", - "darwinia-precompile-staking", "darwinia-precompile-state-storage", "darwinia-staking", "dc-inflation", @@ -5732,7 +5708,6 @@ dependencies = [ "darwinia-deposit", "darwinia-ethtx-forwarder", "darwinia-precompile-assets", - "darwinia-precompile-staking", "darwinia-precompile-state-storage", "darwinia-staking", "dc-primitives", diff --git a/Cargo.toml b/Cargo.toml index 2aa7189a8..b8c98fedc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,6 @@ darwinia-common-runtime = { path = "runtime/common", default-features darwinia-deposit = { path = "pallet/deposit", default-features = false } darwinia-ethtx-forwarder = { path = "pallet/ethtx-forwarder", default-features = false } darwinia-precompile-assets = { path = "precompile/assets", default-features = false } -darwinia-precompile-staking = { path = "precompile/staking", default-features = false } darwinia-precompile-state-storage = { path = "precompile/state-storage", default-features = false } darwinia-runtime = { path = "runtime/darwinia" } darwinia-staking = { path = "pallet/staking", default-features = false } diff --git a/pallet/account-migration/src/mock.rs b/pallet/account-migration/src/mock.rs index d8ccd8f61..77f1580a1 100644 --- a/pallet/account-migration/src/mock.rs +++ b/pallet/account-migration/src/mock.rs @@ -23,31 +23,6 @@ use frame_support::derive_impl; use sp_io::TestExternalities; use sp_runtime::BuildStorage; -pub struct Dummy; -impl darwinia_deposit::SimpleAsset for Dummy { - type AccountId = AccountId; - - fn mint(_: &Self::AccountId, _: Balance) -> sp_runtime::DispatchResult { - Ok(()) - } - - fn burn(_: &Self::AccountId, _: Balance) -> sp_runtime::DispatchResult { - Ok(()) - } -} -impl darwinia_staking::Stake for Dummy { - type AccountId = AccountId; - type Item = Balance; - - fn stake(_: &Self::AccountId, _: Self::Item) -> sp_runtime::DispatchResult { - Ok(()) - } - - fn unstake(_: &Self::AccountId, _: Self::Item) -> sp_runtime::DispatchResult { - Ok(()) - } -} - #[sp_version::runtime_version] pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion { spec_name: sp_runtime::create_runtime_str!("Darwinia2"), @@ -125,8 +100,6 @@ frame_support::parameter_types! { impl darwinia_deposit::Config for Runtime { type DepositMigrator = (); - type Kton = Dummy; - type MaxDeposits = frame_support::traits::ConstU32<512>; type Ring = Balances; type RuntimeEvent = RuntimeEvent; type Treasury = (); @@ -135,20 +108,14 @@ impl darwinia_deposit::Config for Runtime { impl darwinia_staking::Config for Runtime { type Currency = Balances; - type Deposit = Deposit; type IssuingManager = (); type KtonStaking = (); - type MaxDeposits = frame_support::traits::ConstU32<512>; - type Ring = Dummy; type RingStaking = (); type RuntimeEvent = RuntimeEvent; - type ShouldEndSession = (); type Treasury = (); type UnixTime = Timestamp; type WeightInfo = (); } -#[cfg(not(feature = "runtime-benchmarks"))] -impl darwinia_staking::DepositConfig for Runtime {} impl crate::Config for Runtime { type RuntimeEvent = RuntimeEvent; diff --git a/pallet/staking/src/benchmarking.rs b/pallet/staking/src/benchmarking.rs index 543c677ea..3a82a14f2 100644 --- a/pallet/staking/src/benchmarking.rs +++ b/pallet/staking/src/benchmarking.rs @@ -33,9 +33,8 @@ mod benchmarks { let a = frame_benchmarking::whitelisted_caller::(); let a_cloned = a.clone(); - // Worst-case scenario: - // - // The total number of deposit items has reached `darwinia_deposits::Config::MaxDeposits`. + >::insert(&a, Ledger { ring: 1, deposits: BoundedVec::new() }); + #[extrinsic_call] _(RawOrigin::Signed(a), a_cloned); } @@ -45,6 +44,8 @@ mod benchmarks { let a = frame_benchmarking::whitelisted_caller::(); let a_cloned = a.clone(); + >::insert(&a, 1); + #[extrinsic_call] _(RawOrigin::Signed(a), a_cloned); } @@ -78,7 +79,7 @@ mod benchmarks { frame_benchmarking::impl_benchmark_test_suite!( Pallet, - crate::mock::ExtBuilder::default().build(), + crate::mock::ExtBuilder.build(), crate::mock::Runtime ); } diff --git a/pallet/staking/src/mock.rs b/pallet/staking/src/mock.rs index 593b92236..b4c27d008 100644 --- a/pallet/staking/src/mock.rs +++ b/pallet/staking/src/mock.rs @@ -144,7 +144,7 @@ impl pallet_session::Config for Runtime { frame_support::parameter_types! { pub const TreasuryPalletId: frame_support::PalletId = frame_support::PalletId(*b"da/trsry"); - pub TreasuryAcct: AccountId = Treasury::account_id(); + pub TreasuryAccount: AccountId = Treasury::account_id(); } #[cfg(feature = "runtime-benchmarks")] pub struct DummyBenchmarkHelper; @@ -175,7 +175,7 @@ impl pallet_treasury::Config for Runtime { type MaxApprovals = (); type OnSlash = (); type PalletId = TreasuryPalletId; - type Paymaster = frame_support::traits::tokens::PayFromAccount; + type Paymaster = frame_support::traits::tokens::PayFromAccount; type PayoutPeriod = (); type ProposalBond = (); type ProposalBondMaximum = (); @@ -257,7 +257,7 @@ pub enum KtonStaking {} impl crate::Reward for KtonStaking { fn allocate(_: Option, amount: Balance) { let _ = Balances::transfer_keep_alive( - RuntimeOrigin::signed(TreasuryAcct::get()), + RuntimeOrigin::signed(TreasuryAccount::get()), >::get().unwrap(), amount, ); @@ -269,7 +269,7 @@ impl crate::Config for Runtime { type KtonStaking = KtonStaking; type RingStaking = RingStaking; type RuntimeEvent = RuntimeEvent; - type Treasury = TreasuryAcct; + type Treasury = TreasuryAccount; type UnixTime = Timestamp; type WeightInfo = (); } diff --git a/precompile/staking/Cargo.toml b/precompile/staking/Cargo.toml deleted file mode 100644 index fc1d2c781..000000000 --- a/precompile/staking/Cargo.toml +++ /dev/null @@ -1,72 +0,0 @@ -[package] -authors.workspace = true -description = "Staking precompile for EVM pallet." -edition.workspace = true -name = "darwinia-precompile-staking" -readme = "README.md" -version.workspace = true - -[dependencies] -# frontier -fp-evm = { workspace = true } -pallet-evm = { workspace = true } - -# darwinia -darwinia-staking = { workspace = true } - -# moonbeam -precompile-utils = { workspace = true } - -# polkadot-sdk -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -[dev-dependencies] -# crates.io -codec = { workspace = true, features = ["std"] } -scale-info = { workspace = true, features = ["std"] } - -# darwinia -darwinia-deposit = { workspace = true, features = ["std"] } -dc-primitives = { workspace = true, features = ["std"] } - -# moonbeam -precompile-utils = { workspace = true, features = ["std", "testing"] } - -# polkadot-sdk -frame-system = { workspace = true, features = ["std"] } -pallet-balances = { workspace = true, features = ["std"] } -pallet-timestamp = { workspace = true, features = ["std"] } -sp-io = { workspace = true, features = ["std"] } - -[features] -default = ["std"] -std = [ - # frontier - "fp-evm/std", - "pallet-evm/std", - - # darwinia - "darwinia-staking/std", - - # moonbeam - "precompile-utils/std", - - # polkadot-sdk - "frame-support/std", - "frame-system/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", -] - -runtime-benchmarks = [ - # darwinia - "darwinia-staking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", -] diff --git a/precompile/staking/src/lib.rs b/precompile/staking/src/lib.rs deleted file mode 100644 index fe23ce12d..000000000 --- a/precompile/staking/src/lib.rs +++ /dev/null @@ -1,84 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg(test)] -mod mock; -#[cfg(test)] -mod tests; - -// core -use core::marker::PhantomData; -// moonbeam -use precompile_utils::prelude::*; -// polkadot-sdk -use frame_support::{ - dispatch::{GetDispatchInfo, PostDispatchInfo}, - traits::OriginTrait, -}; -use sp_core::{H160, U256}; -use sp_runtime::traits::Dispatchable; -use sp_std::prelude::*; - -pub struct Staking(PhantomData); - -#[precompile_utils::precompile] -impl Staking -where - Runtime: darwinia_staking::Config + pallet_evm::Config, - Runtime::RuntimeCall: GetDispatchInfo - + Dispatchable - + From>, - ::RuntimeOrigin: From>, - ::AccountId: From, - <::RuntimeCall as Dispatchable>::RuntimeOrigin: OriginTrait, -{ - // #[precompile::public("unstake(uint256,uint16[])")] - // fn unstake( - // handle: &mut impl PrecompileHandle, - // ring_amount: U256, - // deposits: Vec, - // ) -> EvmResult { - // let origin = handle.context().caller.into(); - // let deposits = deposits.into_iter().map(|i| i.into()).collect(); - - // RuntimeHelper::::try_dispatch( - // handle, - // Some(origin).into(), - // darwinia_staking::Call::::unstake { - // ring_amount: ring_amount.as_u128(), - // deposits, - // }, - // )?; - // Ok(true) - // } - - // #[precompile::public("payout(address)")] - // fn payout(handle: &mut impl PrecompileHandle, who: Address) -> EvmResult { - // let who: H160 = who.into(); - // let origin = handle.context().caller.into(); - - // RuntimeHelper::::try_dispatch( - // handle, - // Some(origin).into(), - // darwinia_staking::Call::::payout { who: who.into() }, - // )?; - // Ok(true) - // } -} diff --git a/precompile/staking/src/mock.rs b/precompile/staking/src/mock.rs deleted file mode 100644 index 721957a12..000000000 --- a/precompile/staking/src/mock.rs +++ /dev/null @@ -1,248 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -// crates.io -use codec::{Decode, Encode, MaxEncodedLen}; -use scale_info::TypeInfo; -// frontier -use precompile_utils::Precompile; -// darwinia -use crate::*; -use dc_primitives::{AccountId, Balance, Moment}; -// polkadot-sdk -use frame_support::derive_impl; -use sp_core::{H160, U256}; -use sp_runtime::BuildStorage; - -#[derive(Clone, Encode, Decode, Debug, MaxEncodedLen, TypeInfo)] -pub enum Account { - Alice, - Bob, - Precompile, -} -impl Account { - pub fn addr(&self) -> AccountId { - match self { - Account::Alice => H160::repeat_byte(0xAA), - Account::Bob => H160::repeat_byte(0xBB), - Account::Precompile => H160::from_low_u64_be(1), - } - .into() - } -} - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] -impl frame_system::Config for Runtime { - type AccountData = pallet_balances::AccountData; - type AccountId = AccountId; - type Block = frame_system::mocking::MockBlock; - type Lookup = sp_runtime::traits::IdentityLookup; -} - -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] -impl pallet_balances::Config for Runtime { - type AccountStore = System; - type Balance = Balance; - type ExistentialDeposit = (); -} - -#[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig as pallet_timestamp::DefaultConfig)] -impl pallet_timestamp::Config for Runtime { - type MinimumPeriod = (); - type Moment = Moment; -} - -frame_support::parameter_types! { - pub TreasuryAcct: AccountId = H160::zero().into(); -} -pub enum KtonMinting {} -impl darwinia_deposit::SimpleAsset for KtonMinting { - type AccountId = AccountId; - - fn mint(_: &Self::AccountId, _: Balance) -> sp_runtime::DispatchResult { - Ok(()) - } - - fn burn(_: &Self::AccountId, _: Balance) -> sp_runtime::DispatchResult { - Ok(()) - } -} -impl darwinia_deposit::Config for Runtime { - type DepositMigrator = (); - type Kton = KtonMinting; - type MaxDeposits = frame_support::traits::ConstU32<512>; - type Ring = Balances; - type RuntimeEvent = RuntimeEvent; - type Treasury = TreasuryAcct; - type WeightInfo = (); -} - -pub struct TestPrecompiles(PhantomData); -impl TestPrecompiles -where - R: pallet_evm::Config, -{ - #[allow(clippy::new_without_default)] - pub fn new() -> Self { - Self(Default::default()) - } - - pub fn used_addresses() -> [H160; 1] { - [addr(1)] - } -} -impl fp_evm::PrecompileSet for TestPrecompiles -where - crate::Staking: fp_evm::Precompile, - R: pallet_evm::Config, -{ - fn execute(&self, handle: &mut impl PrecompileHandle) -> Option> { - match handle.code_address() { - a if a == addr(1) => Some(crate::Staking::::execute(handle)), - _ => None, - } - } - - fn is_precompile(&self, address: H160, _gas: u64) -> fp_evm::IsPrecompileResult { - fp_evm::IsPrecompileResult::Answer { - is_precompile: Self::used_addresses().contains(&address), - extra_cost: 0, - } - } -} -fn addr(a: u64) -> H160 { - H160::from_low_u64_be(a) -} - -pub type PCall = StakingCall; - -frame_support::parameter_types! { - pub const BlockGasLimit: U256 = U256::MAX; - pub const WeightPerGas: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(20_000, 0); - pub PrecompilesValue: TestPrecompiles = TestPrecompiles::<_>::new(); -} - -impl pallet_evm::Config for Runtime { - type AddressMapping = pallet_evm::IdentityAddressMapping; - type BlockGasLimit = BlockGasLimit; - type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; - type CallOrigin = pallet_evm::EnsureAddressRoot; - type ChainId = frame_support::traits::ConstU64<42>; - type Currency = Balances; - type FeeCalculator = (); - type FindAuthor = (); - type GasLimitPovSizeRatio = (); - type GasWeightMapping = pallet_evm::FixedGasWeightMapping; - type OnChargeTransaction = (); - type OnCreate = (); - type PrecompilesType = TestPrecompiles; - type PrecompilesValue = PrecompilesValue; - type Runner = pallet_evm::runner::stack::Runner; - type RuntimeEvent = RuntimeEvent; - type SuicideQuickClearLimit = (); - type Timestamp = Timestamp; - type WeightInfo = (); - type WeightPerGas = WeightPerGas; - type WithdrawOrigin = pallet_evm::EnsureAddressNever; -} - -pub enum RingStaking {} -impl darwinia_staking::Stake for RingStaking { - type AccountId = AccountId; - type Item = Balance; - - fn stake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - >::transfer( - who, - &darwinia_staking::account_id(), - item, - frame_support::traits::ExistenceRequirement::AllowDeath, - ) - } - - fn unstake(who: &Self::AccountId, item: Self::Item) -> sp_runtime::DispatchResult { - >::transfer( - &darwinia_staking::account_id(), - who, - item, - frame_support::traits::ExistenceRequirement::AllowDeath, - ) - } -} -impl darwinia_staking::Config for Runtime { - type Currency = Balances; - type Deposit = Deposit; - type IssuingManager = (); - type KtonStaking = (); - type MaxDeposits = ::MaxDeposits; - type Ring = RingStaking; - type RingStaking = (); - type RuntimeEvent = RuntimeEvent; - type ShouldEndSession = (); - type Treasury = TreasuryAcct; - type UnixTime = Timestamp; - type WeightInfo = (); -} -#[cfg(not(feature = "runtime-benchmarks"))] -impl darwinia_staking::DepositConfig for Runtime {} - -frame_support::construct_runtime! { - pub enum Runtime { - System: frame_system, - Balances: pallet_balances, - Timestamp: pallet_timestamp, - Deposit: darwinia_deposit, - EVM: pallet_evm, - Staking: darwinia_staking, - } -} - -#[derive(Default)] -pub struct ExtBuilder { - // endowed accounts with balances - balances: Vec<(AccountId, Balance)>, -} - -impl ExtBuilder { - pub fn with_balances(mut self, balances: Vec<(AccountId, Balance)>) -> Self { - self.balances = balances; - self - } - - pub fn build(self) -> sp_io::TestExternalities { - let mut storage = - >::default().build_storage().unwrap(); - - pallet_balances::GenesisConfig:: { balances: self.balances } - .assimilate_storage(&mut storage) - .unwrap(); - darwinia_staking::GenesisConfig:: { - rate_limit: 500, - collator_count: 1, - ..Default::default() - } - .assimilate_storage(&mut storage) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(storage); - - ext.execute_with(|| System::set_block_number(1)); - - ext - } -} diff --git a/precompile/staking/src/tests.rs b/precompile/staking/src/tests.rs deleted file mode 100644 index e2c5ec7c6..000000000 --- a/precompile/staking/src/tests.rs +++ /dev/null @@ -1,133 +0,0 @@ -// This file is part of Darwinia. -// -// Copyright (C) Darwinia Network -// SPDX-License-Identifier: GPL-3.0 -// -// Darwinia 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. -// -// Darwinia 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 Darwinia. If not, see . - -// darwinia -use crate::mock::{ - Account::{Alice, Bob, Precompile}, - ExtBuilder, PCall, PrecompilesValue, Runtime, Staking, TestPrecompiles, -}; -use sp_runtime::Perbill; -// moonbeam -use precompile_utils::testing::PrecompileTesterExt; -// polkadot-sdk -use sp_core::H160; - -fn precompiles() -> TestPrecompiles { - PrecompilesValue::get() -} - -#[test] -fn selectors() { - assert!(PCall::stake_selectors().contains(&0x88FD3D50)); - assert!(PCall::unstake_selectors().contains(&0xE198447)); - assert!(PCall::nominate_selectors().contains(&0xb332180b)); - assert!(PCall::collect_selectors().contains(&0x10a66536)); - assert!(PCall::chill_selectors().contains(&0x2b8a3ae6)); - assert!(PCall::payout_selectors().contains(&0x0b7e9c44)); -} - -#[test] -fn stake_unstake_restake() { - let alice = Alice.addr(); - let precompile = Precompile.addr(); - - ExtBuilder::default().with_balances(vec![(alice, 300)]).build().execute_with(|| { - // stake - precompiles() - .prepare_test( - alice, - precompile, - PCall::stake { ring_amount: 200.into(), deposits: Vec::new() }, - ) - .execute_returns(true); - assert_eq!(Staking::ledger_of(alice).unwrap().ring, 200); - - // unstake - precompiles() - .prepare_test( - alice, - precompile, - PCall::unstake { ring_amount: 200.into(), deposits: Vec::new() }, - ) - .execute_returns(true); - assert!(Staking::ledger_of(alice).is_none()); - }); -} - -#[test] -fn nominate() { - let alice = Alice.addr(); - let bob = Bob.addr(); - let precompile = Precompile.addr(); - - ExtBuilder::default().with_balances(vec![(alice, 300), (bob, 300)]).build().execute_with( - || { - // alice stake first as collator - precompiles() - .prepare_test( - alice, - precompile, - PCall::stake { ring_amount: 200.into(), deposits: Vec::new() }, - ) - .execute_returns(true); - - // check the collator commission - precompiles() - .prepare_test(alice, precompile, PCall::collect { commission: 30 }) - .execute_returns(true); - assert_eq!(Staking::collator_of(alice).unwrap(), Perbill::from_percent(30)); - - // bob stake as nominator - precompiles() - .prepare_test( - bob, - precompile, - PCall::stake { ring_amount: 200.into(), deposits: Vec::new() }, - ) - .execute_returns(true); - - // check nominate result - precompiles() - .prepare_test(bob, precompile, PCall::nominate { target: H160::from(alice).into() }) - .execute_returns(true); - assert_eq!(Staking::nominator_of(bob).unwrap(), alice); - - // check alice(collator) chill - precompiles().prepare_test(alice, precompile, PCall::chill {}).execute_returns(true); - assert!(Staking::collator_of(alice).is_none()); - - // check bob(nominator) chill - precompiles().prepare_test(bob, precompile, PCall::chill {}).execute_returns(true); - assert!(Staking::nominator_of(bob).is_none()); - }, - ); -} - -#[test] -fn payout() { - let alice = Alice.addr(); - let precompile = Precompile.addr(); - - ExtBuilder::default().build().execute_with(|| { - precompiles() - .prepare_test(alice, precompile, PCall::payout { who: H160::from(alice).into() }) - .execute_reverts(|out| { - out == b"Dispatched call failed with error: Module(ModuleError { index: 5, error: [6, 0, 0, 0], message: Some(\"NoReward\") })" - }); - }); -} diff --git a/runtime/crab/Cargo.toml b/runtime/crab/Cargo.toml index 3a2e43b53..26cb39890 100644 --- a/runtime/crab/Cargo.toml +++ b/runtime/crab/Cargo.toml @@ -25,7 +25,6 @@ darwinia-common-runtime = { workspace = true } darwinia-deposit = { workspace = true } darwinia-ethtx-forwarder = { workspace = true } darwinia-precompile-assets = { workspace = true } -darwinia-precompile-staking = { workspace = true } darwinia-precompile-state-storage = { workspace = true } darwinia-staking = { workspace = true } dc-primitives = { workspace = true } @@ -133,7 +132,6 @@ std = [ "darwinia-deposit/std", "darwinia-ethtx-forwarder/std", "darwinia-precompile-assets/std", - "darwinia-precompile-staking/std", "darwinia-precompile-state-storage/std", "darwinia-staking/std", "dc-primitives/std", @@ -227,7 +225,6 @@ runtime-benchmarks = [ "darwinia-deposit/runtime-benchmarks", "darwinia-ethtx-forwarder/runtime-benchmarks", "darwinia-precompile-assets/runtime-benchmarks", - "darwinia-precompile-staking/runtime-benchmarks", "darwinia-staking/runtime-benchmarks", # frontier diff --git a/runtime/crab/src/pallets/evm.rs b/runtime/crab/src/pallets/evm.rs index 43d641025..49161c68c 100644 --- a/runtime/crab/src/pallets/evm.rs +++ b/runtime/crab/src/pallets/evm.rs @@ -107,8 +107,6 @@ where handle, )), // [0x600, 0x800) reserved for other stable precompiles. - a if a == addr(0x601) => - Some(>::execute(handle)), a if a == addr(0x602) => Some(>::execute(handle)), // [0x800..) reserved for the experimental precompiles. diff --git a/runtime/darwinia/Cargo.toml b/runtime/darwinia/Cargo.toml index 33d0aac87..81099de3d 100644 --- a/runtime/darwinia/Cargo.toml +++ b/runtime/darwinia/Cargo.toml @@ -27,7 +27,6 @@ darwinia-common-runtime = { workspace = true } darwinia-deposit = { workspace = true } darwinia-ethtx-forwarder = { workspace = true } darwinia-precompile-assets = { workspace = true } -darwinia-precompile-staking = { workspace = true } darwinia-precompile-state-storage = { workspace = true } darwinia-staking = { workspace = true } dc-inflation = { workspace = true } @@ -142,7 +141,6 @@ std = [ "darwinia-deposit/std", "darwinia-ethtx-forwarder/std", "darwinia-precompile-assets/std", - "darwinia-precompile-staking/std", "darwinia-precompile-state-storage/std", "darwinia-staking/std", "dc-inflation/std", @@ -246,7 +244,6 @@ runtime-benchmarks = [ "darwinia-deposit/runtime-benchmarks", "darwinia-ethtx-forwarder/runtime-benchmarks", "darwinia-precompile-assets/runtime-benchmarks", - "darwinia-precompile-staking/runtime-benchmarks", "darwinia-staking/runtime-benchmarks", # frontier diff --git a/runtime/darwinia/src/pallets/evm.rs b/runtime/darwinia/src/pallets/evm.rs index c02f4fbd7..3cedbe980 100644 --- a/runtime/darwinia/src/pallets/evm.rs +++ b/runtime/darwinia/src/pallets/evm.rs @@ -109,8 +109,6 @@ where handle, )), // [0x600, 0x800) reserved for other stable precompiles. - a if a == addr(0x601) => - Some(>::execute(handle)), a if a == addr(0x602) => Some(>::execute(handle)), // [0x800..) reserved for the experimental precompiles. diff --git a/runtime/koi/Cargo.toml b/runtime/koi/Cargo.toml index 1339f2167..422eed5c5 100644 --- a/runtime/koi/Cargo.toml +++ b/runtime/koi/Cargo.toml @@ -24,7 +24,6 @@ darwinia-common-runtime = { workspace = true } darwinia-deposit = { workspace = true } darwinia-ethtx-forwarder = { workspace = true } darwinia-precompile-assets = { workspace = true } -darwinia-precompile-staking = { workspace = true } darwinia-precompile-state-storage = { workspace = true } darwinia-staking = { workspace = true } dc-primitives = { workspace = true } @@ -138,7 +137,6 @@ std = [ "darwinia-deposit/std", "darwinia-ethtx-forwarder/std", "darwinia-precompile-assets/std", - "darwinia-precompile-staking/std", "darwinia-precompile-state-storage/std", "darwinia-staking/std", "dc-primitives/std", @@ -237,7 +235,6 @@ runtime-benchmarks = [ "darwinia-deposit/runtime-benchmarks", "darwinia-ethtx-forwarder/runtime-benchmarks", "darwinia-precompile-assets/runtime-benchmarks", - "darwinia-precompile-staking/runtime-benchmarks", "darwinia-staking/runtime-benchmarks", # frontier diff --git a/runtime/koi/src/pallets/evm.rs b/runtime/koi/src/pallets/evm.rs index 986dd748c..f84df7a22 100644 --- a/runtime/koi/src/pallets/evm.rs +++ b/runtime/koi/src/pallets/evm.rs @@ -127,8 +127,6 @@ where handle, )), // [0x600, 0x800) reserved for other stable precompiles. - a if a == addr(0x601) => - Some(>::execute(handle)), a if a == addr(0x602) => Some(>::execute(handle)), // [0x800..) reserved for the experimental precompiles. From c445b18c70325851c3c37a7636cac4e3c88a5162 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 21 Oct 2024 11:09:53 +0800 Subject: [PATCH 07/17] Benchmark --- Makefile.toml | 8 +-- node/src/chain_spec/crab.rs | 8 +-- node/src/chain_spec/koi.rs | 4 +- pallet/deposit/src/benchmarking.rs | 12 +++- pallet/deposit/src/lib.rs | 27 +++++---- pallet/deposit/src/weights.rs | 55 ++++++----------- pallet/ethtx-forwarder/src/lib.rs | 20 ++++--- pallet/staking/src/benchmarking.rs | 1 + pallet/staking/src/weights.rs | 89 ++++++++++++---------------- runtime/crab/src/pallets/tx_pause.rs | 18 +++--- runtime/koi/src/pallets/tx_pause.rs | 18 +++--- 11 files changed, 118 insertions(+), 142 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 6348706ca..156b51da5 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -1,9 +1,9 @@ [config] default_to_workspace = false -# skip_core_tasks = true -# skip_git_env_info = true -# skip_rust_env_info = true -# skip_crate_env_info = true +skip_core_tasks = true +skip_git_env_info = true +skip_rust_env_info = true +skip_crate_env_info = true [env] CHAIN = "all" diff --git a/node/src/chain_spec/crab.rs b/node/src/chain_spec/crab.rs index 552ce1b65..7bb8fbaa3 100644 --- a/node/src/chain_spec/crab.rs +++ b/node/src/chain_spec/crab.rs @@ -64,9 +64,7 @@ pub fn development_config() -> ChainSpec { "darwiniaStaking": { "now": SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis(), "elapsedTime": 0, - "rateLimit": 20_000_000 * UNIT, - "collatorCount": collators.len(), - "collators": collators.iter().map(|(a, _)| (a, UNIT)).collect::>() + "collatorCount": collators.len() }, "session": { "keys": collators.into_iter().map(|(a, sks)| (a, a, sks)).collect::>() @@ -222,9 +220,7 @@ pub fn genesis_config() -> ChainSpec { "darwiniaStaking": { "now": SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis(), "elapsedTime": 0, - "rateLimit": 20_000_000 * UNIT, - "collatorCount": 6, - "collators": collators.iter().map(|(a, _)| (a, 1_000 * UNIT)).collect::>() + "collatorCount": 6 }, "session": { "keys": collators.iter().map(|(a, sks)| (a, a, sks)).collect::>() diff --git a/node/src/chain_spec/koi.rs b/node/src/chain_spec/koi.rs index 1241a253e..10fb36896 100644 --- a/node/src/chain_spec/koi.rs +++ b/node/src/chain_spec/koi.rs @@ -61,9 +61,7 @@ pub fn development_config() -> ChainSpec { "darwiniaStaking": { "now": SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis(), "elapsedTime": 0, - "rateLimit": 20_000_000 * UNIT, - "collatorCount": collators.len(), - "collators": collators.iter().map(|(a, _)| (a, UNIT)).collect::>() + "collatorCount": collators.len() }, "session": { "keys": collators.into_iter().map(|(a, sks)| (a, a, sks)).collect::>() diff --git a/pallet/deposit/src/benchmarking.rs b/pallet/deposit/src/benchmarking.rs index c7c47752a..8af05e85e 100644 --- a/pallet/deposit/src/benchmarking.rs +++ b/pallet/deposit/src/benchmarking.rs @@ -35,8 +35,8 @@ mod benchmarks { >::set_deposit_contract(RawOrigin::Root.into(), a.clone()).unwrap(); - T::Ring::make_free_balance_be(&a, 512); T::Ring::make_free_balance_be(&account_id(), 512); + T::Ring::make_free_balance_be(&T::Treasury::get(), 2 << 127); // Worst-case scenario: // @@ -45,8 +45,14 @@ mod benchmarks { let mut v = BoundedVec::new(); (0..512).for_each(|id| { - v.try_push(Deposit { id, value: 1, start_time: 0, expired_time: 0, in_use: false }) - .unwrap(); + v.try_push(Deposit { + id, + value: 1, + start_time: 0, + expired_time: Moment::MAX, + in_use: false, + }) + .unwrap(); }); v diff --git a/pallet/deposit/src/lib.rs b/pallet/deposit/src/lib.rs index bb647f4c9..35c892c82 100644 --- a/pallet/deposit/src/lib.rs +++ b/pallet/deposit/src/lib.rs @@ -235,18 +235,21 @@ pub mod pallet { } } - T::Ring::transfer(&account_id(), who, to_claim.0, AllowDeath)?; - T::Ring::transfer(&account_id(), &T::Treasury::get(), to_migrate.0, AllowDeath)?; - T::DepositMigrator::migrate(who.clone(), to_migrate.0, to_migrate.2)?; - - Self::deposit_event(Event::DepositsClaimed { - owner: who.clone(), - deposits: to_claim.1, - }); - Self::deposit_event(Event::DepositsMigrated { - owner: who.clone(), - deposits: to_migrate.1, - }); + if to_claim.0 != 0 { + T::Ring::transfer(&account_id(), who, to_claim.0, AllowDeath)?; + Self::deposit_event(Event::DepositsClaimed { + owner: who.clone(), + deposits: to_claim.1, + }); + } + if to_migrate.0 != 0 { + T::Ring::transfer(&account_id(), &T::Treasury::get(), to_migrate.0, AllowDeath)?; + T::DepositMigrator::migrate(who.clone(), to_migrate.0, to_migrate.2)?; + Self::deposit_event(Event::DepositsMigrated { + owner: who.clone(), + deposits: to_migrate.1, + }); + } Ok(deposits.collect()) } diff --git a/pallet/deposit/src/weights.rs b/pallet/deposit/src/weights.rs index ced0977ed..bb0ba5586 100644 --- a/pallet/deposit/src/weights.rs +++ b/pallet/deposit/src/weights.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for darwinia_deposit //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("koi-dev"), DB CACHE: 1024 // Executed Command: @@ -63,27 +64,17 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:3 w:2) + /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::DepositContract` (r:1 w:0) - /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) - /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) - /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// Storage: `EVM::AccountCodes` (r:2 w:0) - /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Digest` (r:1 w:0) - /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Ethereum::Pending` (r:1 w:1) - /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn migrate_for() -> Weight { // Proof Size summary in bytes: - // Measured: `27516` - // Estimated: `33456` - // Minimum execution time: 4_057_000 nanoseconds. - Weight::from_parts(4_577_000_000, 0) - .saturating_add(Weight::from_parts(33456, 0)) - .saturating_add(T::DbWeight::get().reads(11_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `26491` + // Estimated: `29615` + // Minimum execution time: 65_000 nanoseconds. + Weight::from_parts(67_000_000, 0) + .saturating_add(Weight::from_parts(29615, 0)) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `Deposit::DepositContract` (r:0 w:1) /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -104,27 +95,17 @@ impl WeightInfo for () { /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:3 w:2) + /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::DepositContract` (r:1 w:0) - /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) - /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) - /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// Storage: `EVM::AccountCodes` (r:2 w:0) - /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Digest` (r:1 w:0) - /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Ethereum::Pending` (r:1 w:1) - /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn migrate_for() -> Weight { // Proof Size summary in bytes: - // Measured: `27516` - // Estimated: `33456` - // Minimum execution time: 4_057_000 nanoseconds. - Weight::from_parts(4_577_000_000, 0) - .saturating_add(Weight::from_parts(33456, 0)) - .saturating_add(RocksDbWeight::get().reads(11_u64)) - .saturating_add(RocksDbWeight::get().writes(4_u64)) + // Measured: `26491` + // Estimated: `29615` + // Minimum execution time: 65_000 nanoseconds. + Weight::from_parts(67_000_000, 0) + .saturating_add(Weight::from_parts(29615, 0)) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `Deposit::DepositContract` (r:0 w:1) /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) diff --git a/pallet/ethtx-forwarder/src/lib.rs b/pallet/ethtx-forwarder/src/lib.rs index 6ff411df7..f73fb06c5 100644 --- a/pallet/ethtx-forwarder/src/lib.rs +++ b/pallet/ethtx-forwarder/src/lib.rs @@ -186,8 +186,8 @@ impl Pallet { action: request.action, value: request.value, input: request.input, - // copied from: - // https://github.com/rust-ethereum/ethereum/blob/24739cc8ba6e9d8ee30ada8ec92161e4c48d578e/src/transaction.rs#L798 + // Copied from: + // - https://github.com/rust-ethereum/ethereum/blob/24739cc8ba6e9d8ee30ada8ec92161e4c48d578e/src/transaction.rs#L798 signature: TransactionSignature::new( 38, H256([ @@ -211,8 +211,8 @@ impl Pallet { value: request.value, input: request.input, access_list: Default::default(), - // copied from: - // https://github.com/rust-ethereum/ethereum/blob/24739cc8ba6e9d8ee30ada8ec92161e4c48d578e/src/transaction.rs#L873-L875 + // Copied from: + // - https://github.com/rust-ethereum/ethereum/blob/24739cc8ba6e9d8ee30ada8ec92161e4c48d578e/src/transaction.rs#L873-L875 odd_y_parity: false, // 36b241b061a36a32ab7fe86c7aa9eb592dd59018cd0443adc0903590c16b02b0 r: H256([ @@ -237,8 +237,8 @@ impl Pallet { value: request.value, input: request.input, access_list: Default::default(), - // copied from: - // https://github.com/rust-ethereum/ethereum/blob/24739cc8ba6e9d8ee30ada8ec92161e4c48d578e/src/transaction.rs#L873-L875 + // Copied from: + // - https://github.com/rust-ethereum/ethereum/blob/24739cc8ba6e9d8ee30ada8ec92161e4c48d578e/src/transaction.rs#L873-L875 odd_y_parity: false, // 36b241b061a36a32ab7fe86c7aa9eb592dd59018cd0443adc0903590c16b02b0 r: H256([ @@ -280,7 +280,11 @@ impl Pallet { .validate_in_block_for(&who) .and_then(|v| v.with_base_fee()) .and_then(|v| v.with_balance_for(&who)) - .map_err(|e| >::ValidationError(e))?; + .map_err(|e| { + log::error!("transaction validation failed due to {e:?}"); + + >::ValidationError(e) + })?; Ok(transaction) } @@ -358,7 +362,7 @@ pub enum TxType { } // TODO: replace it with upstream error type -#[derive(Encode, Decode, TypeInfo, PalletError)] +#[derive(Debug, Encode, Decode, TypeInfo, PalletError)] pub enum TxErrorWrapper { GasLimitTooLow, GasLimitTooHigh, diff --git a/pallet/staking/src/benchmarking.rs b/pallet/staking/src/benchmarking.rs index 3a82a14f2..ae388fc25 100644 --- a/pallet/staking/src/benchmarking.rs +++ b/pallet/staking/src/benchmarking.rs @@ -33,6 +33,7 @@ mod benchmarks { let a = frame_benchmarking::whitelisted_caller::(); let a_cloned = a.clone(); + T::Currency::make_free_balance_be(&account_id(), 1); >::insert(&a, Ledger { ring: 1, deposits: BoundedVec::new() }); #[extrinsic_call] diff --git a/pallet/staking/src/weights.rs b/pallet/staking/src/weights.rs index 5c619a2db..4b457a6a8 100644 --- a/pallet/staking/src/weights.rs +++ b/pallet/staking/src/weights.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for darwinia_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("koi-dev"), DB CACHE: 1024 // Executed Command: @@ -66,40 +67,29 @@ impl WeightInfo for SubstrateWeight { /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimitState` (r:1 w:1) - /// Proof: `DarwiniaStaking::RateLimitState` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 1023]`. fn unstake_all_for() -> Weight { // Proof Size summary in bytes: - // Measured: `2330` - // Estimated: `83902` - // Minimum execution time: 535_000 nanoseconds. - Weight::from_parts(629_000_000, 0) - .saturating_add(Weight::from_parts(83902, 0)) - .saturating_add(T::DbWeight::get().reads(35_u64)) - .saturating_add(T::DbWeight::get().writes(34_u64)) + // Measured: `406` + // Estimated: `4543` + // Minimum execution time: 51_000 nanoseconds. + Weight::from_parts(52_000_000, 0) + .saturating_add(Weight::from_parts(4543, 0)) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: `DarwiniaStaking::ExposureCacheStates` (r:1 w:0) - /// Proof: `DarwiniaStaking::ExposureCacheStates` (`max_values`: Some(1), `max_size`: Some(3), added: 498, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::ExposureCache2` (r:1 w:1) - /// Proof: `DarwiniaStaking::ExposureCache2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `DarwiniaStaking::PendingRewards` (r:1 w:1) /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:32 w:32) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `DarwiniaStaking::RingStakingContract` (r:1 w:0) + /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn allocate_ring_staking_reward_of() -> Weight { // Proof Size summary in bytes: - // Measured: `2330` - // Estimated: `83902` - // Minimum execution time: 535_000 nanoseconds. - Weight::from_parts(629_000_000, 0) - .saturating_add(Weight::from_parts(83902, 0)) - .saturating_add(T::DbWeight::get().reads(35_u64)) - .saturating_add(T::DbWeight::get().writes(34_u64)) + // Measured: `271` + // Estimated: `3736` + // Minimum execution time: 13_000 nanoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(3736, 0)) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `DarwiniaStaking::RingStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -130,7 +120,7 @@ impl WeightInfo for SubstrateWeight { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_000 nanoseconds. - Weight::from_parts(3_000_000, 0) + Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -142,32 +132,29 @@ impl WeightInfo for () { /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimitState` (r:1 w:1) - /// Proof: `DarwiniaStaking::RateLimitState` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 1023]`. fn unstake_all_for() -> Weight { // Proof Size summary in bytes: - // Measured: `2330` - // Estimated: `83902` - // Minimum execution time: 535_000 nanoseconds. - Weight::from_parts(629_000_000, 0) - .saturating_add(Weight::from_parts(83902, 0)) - .saturating_add(RocksDbWeight::get().reads(35_u64)) - .saturating_add(RocksDbWeight::get().writes(34_u64)) + // Measured: `406` + // Estimated: `4543` + // Minimum execution time: 51_000 nanoseconds. + Weight::from_parts(52_000_000, 0) + .saturating_add(Weight::from_parts(4543, 0)) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } + /// Storage: `DarwiniaStaking::PendingRewards` (r:1 w:1) + /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `DarwiniaStaking::RingStakingContract` (r:1 w:0) + /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn allocate_ring_staking_reward_of() -> Weight { // Proof Size summary in bytes: - // Measured: `2330` - // Estimated: `83902` - // Minimum execution time: 535_000 nanoseconds. - Weight::from_parts(629_000_000, 0) - .saturating_add(Weight::from_parts(83902, 0)) - .saturating_add(RocksDbWeight::get().reads(35_u64)) - .saturating_add(RocksDbWeight::get().writes(34_u64)) + // Measured: `271` + // Estimated: `3736` + // Minimum execution time: 13_000 nanoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(3736, 0)) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `DarwiniaStaking::RingStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -198,7 +185,7 @@ impl WeightInfo for () { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_000 nanoseconds. - Weight::from_parts(3_000_000, 0) + Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/runtime/crab/src/pallets/tx_pause.rs b/runtime/crab/src/pallets/tx_pause.rs index 3a7c19db4..a27c4857c 100644 --- a/runtime/crab/src/pallets/tx_pause.rs +++ b/runtime/crab/src/pallets/tx_pause.rs @@ -21,15 +21,15 @@ use crate::*; pub struct TxPauseWhitelistedCalls; // This conflicts with runtime test. -// #[cfg(feature = "runtime-benchmarks")] -// impl frame_support::traits::Contains> -// for TxPauseWhitelistedCalls -// { -// fn contains(_: &pallet_tx_pause::RuntimeCallNameOf) -> bool { -// false -// } -// } -// #[cfg(not(feature = "runtime-benchmarks"))] +#[cfg(feature = "runtime-benchmarks")] +impl frame_support::traits::Contains> + for TxPauseWhitelistedCalls +{ + fn contains(_: &pallet_tx_pause::RuntimeCallNameOf) -> bool { + false + } +} +#[cfg(not(feature = "runtime-benchmarks"))] impl frame_support::traits::Contains> for TxPauseWhitelistedCalls { diff --git a/runtime/koi/src/pallets/tx_pause.rs b/runtime/koi/src/pallets/tx_pause.rs index 4ff419cf8..c5134c69f 100644 --- a/runtime/koi/src/pallets/tx_pause.rs +++ b/runtime/koi/src/pallets/tx_pause.rs @@ -21,15 +21,15 @@ use crate::*; pub struct TxPauseWhitelistedCalls; // This conflicts with runtime test. -// #[cfg(feature = "runtime-benchmarks")] -// impl frame_support::traits::Contains> -// for TxPauseWhitelistedCalls -// { -// fn contains(_: &pallet_tx_pause::RuntimeCallNameOf) -> bool { -// false -// } -// } -// #[cfg(not(feature = "runtime-benchmarks"))] +#[cfg(feature = "runtime-benchmarks")] +impl frame_support::traits::Contains> + for TxPauseWhitelistedCalls +{ + fn contains(_: &pallet_tx_pause::RuntimeCallNameOf) -> bool { + false + } +} +#[cfg(not(feature = "runtime-benchmarks"))] impl frame_support::traits::Contains> for TxPauseWhitelistedCalls { From eca55b3e63480a04eb674862fd9d781288ce9c79 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 21 Oct 2024 12:46:38 +0800 Subject: [PATCH 08/17] Benchmark --- node/src/chain_spec/darwinia.rs | 8 +- node/src/chain_spec/koi.rs | 4 +- pallet/deposit/src/benchmarking.rs | 4 +- pallet/deposit/src/weights.rs | 52 +++++--- .../cumulus_pallet_parachain_system.rs | 9 +- .../src/weights/cumulus_pallet_xcmp_queue.rs | 21 ++-- .../src/weights/darwinia_account_migration.rs | 54 ++++++--- runtime/crab/src/weights/darwinia_deposit.rs | 21 ++-- runtime/crab/src/weights/darwinia_staking.rs | 60 ++++------ runtime/crab/src/weights/frame_system.rs | 43 +++---- runtime/crab/src/weights/pallet_assets.rs | 95 +++++++-------- runtime/crab/src/weights/pallet_balances.rs | 33 +++--- runtime/crab/src/weights/pallet_collective.rs | 103 ++++++++-------- .../src/weights/pallet_conviction_voting.rs | 39 +++--- .../crab/src/weights/pallet_message_queue.rs | 31 ++--- runtime/crab/src/weights/pallet_preimage.rs | 61 +++++----- runtime/crab/src/weights/pallet_proxy.rs | 85 +++++++------- runtime/crab/src/weights/pallet_referenda.rs | 91 +++++++------- runtime/crab/src/weights/pallet_scheduler.rs | 41 +++---- runtime/crab/src/weights/pallet_session.rs | 7 +- runtime/crab/src/weights/pallet_timestamp.rs | 3 +- runtime/crab/src/weights/pallet_treasury.rs | 25 ++-- runtime/crab/src/weights/pallet_tx_pause.rs | 9 +- runtime/crab/src/weights/pallet_utility.rs | 23 ++-- runtime/crab/src/weights/pallet_whitelist.rs | 21 ++-- .../cumulus_pallet_parachain_system.rs | 7 +- .../src/weights/cumulus_pallet_xcmp_queue.rs | 15 +-- .../src/weights/darwinia_account_migration.rs | 60 ++++++---- .../darwinia/src/weights/darwinia_deposit.rs | 21 ++-- .../darwinia/src/weights/darwinia_staking.rs | 60 ++++------ runtime/darwinia/src/weights/frame_system.rs | 39 +++--- .../src/weights/pallet_asset_manager.rs | 29 ++--- runtime/darwinia/src/weights/pallet_assets.rs | 101 ++++++++-------- .../darwinia/src/weights/pallet_balances.rs | 31 ++--- .../darwinia/src/weights/pallet_collective.rs | 105 +++++++++-------- .../src/weights/pallet_conviction_voting.rs | 33 +++--- .../src/weights/pallet_message_queue.rs | 17 +-- .../darwinia/src/weights/pallet_preimage.rs | 57 ++++----- runtime/darwinia/src/weights/pallet_proxy.rs | 87 +++++++------- .../darwinia/src/weights/pallet_referenda.rs | 93 +++++++-------- .../darwinia/src/weights/pallet_scheduler.rs | 53 +++++---- .../darwinia/src/weights/pallet_session.rs | 5 +- .../darwinia/src/weights/pallet_timestamp.rs | 7 +- .../darwinia/src/weights/pallet_treasury.rs | 43 +++---- .../darwinia/src/weights/pallet_utility.rs | 25 ++-- .../darwinia/src/weights/pallet_whitelist.rs | 23 ++-- .../cumulus_pallet_parachain_system.rs | 9 +- .../src/weights/cumulus_pallet_xcmp_queue.rs | 15 +-- runtime/koi/src/weights/darwinia_deposit.rs | 17 +-- runtime/koi/src/weights/darwinia_staking.rs | 62 ++++------ runtime/koi/src/weights/frame_system.rs | 37 +++--- .../koi/src/weights/pallet_asset_manager.rs | 31 ++--- runtime/koi/src/weights/pallet_assets.rs | 105 +++++++++-------- runtime/koi/src/weights/pallet_balances.rs | 31 ++--- runtime/koi/src/weights/pallet_collective.rs | 111 +++++++++--------- .../src/weights/pallet_conviction_voting.rs | 39 +++--- .../koi/src/weights/pallet_message_queue.rs | 25 ++-- runtime/koi/src/weights/pallet_preimage.rs | 65 +++++----- runtime/koi/src/weights/pallet_proxy.rs | 81 ++++++------- runtime/koi/src/weights/pallet_referenda.rs | 85 +++++++------- runtime/koi/src/weights/pallet_scheduler.rs | 47 ++++---- runtime/koi/src/weights/pallet_session.rs | 7 +- runtime/koi/src/weights/pallet_timestamp.rs | 3 +- runtime/koi/src/weights/pallet_treasury.rs | 35 +++--- runtime/koi/src/weights/pallet_tx_pause.rs | 7 +- runtime/koi/src/weights/pallet_utility.rs | 25 ++-- runtime/koi/src/weights/pallet_whitelist.rs | 23 ++-- 67 files changed, 1399 insertions(+), 1315 deletions(-) diff --git a/node/src/chain_spec/darwinia.rs b/node/src/chain_spec/darwinia.rs index 159174f51..9048ce4dc 100644 --- a/node/src/chain_spec/darwinia.rs +++ b/node/src/chain_spec/darwinia.rs @@ -64,9 +64,7 @@ pub fn development_config() -> ChainSpec { "darwiniaStaking": { "now": SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis(), "elapsedTime": 0, - "rateLimit": 20_000_000 * UNIT, - "collatorCount": collators.len(), - "collators": collators.iter().map(|(a, _)| (a, UNIT)).collect::>() + "collatorCount": collators.len() }, "session": { "keys": collators.into_iter().map(|(a, sks)| (a, a, sks)).collect::>() @@ -211,9 +209,7 @@ pub fn genesis_config() -> ChainSpec { "darwiniaStaking": { "now": SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis(), "elapsedTime": 0, - "rateLimit": 20_000_000 * UNIT, - "collatorCount": 5, - "collators": collators.iter().map(|(a, _)| (a, 1_000 * UNIT)).collect::>() + "collatorCount": 5 }, "session": { "keys": collators.iter().map(|(a, sks)| (a, a, sks)).collect::>() diff --git a/node/src/chain_spec/koi.rs b/node/src/chain_spec/koi.rs index 10fb36896..df7d0daca 100644 --- a/node/src/chain_spec/koi.rs +++ b/node/src/chain_spec/koi.rs @@ -164,9 +164,7 @@ pub fn genesis_config() -> ChainSpec { "darwiniaStaking": { "now": SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis(), "elapsedTime": 0, - "rateLimit": 20_000_000 * UNIT, - "collatorCount": 3, - "collators": collators.iter().map(|(a, _)| (a, UNIT)).collect::>() + "collatorCount": 3 }, "session": { "keys": collators.iter().map(|(a, sks)| (a, a, sks)).collect::>() diff --git a/pallet/deposit/src/benchmarking.rs b/pallet/deposit/src/benchmarking.rs index 8af05e85e..70a1df34e 100644 --- a/pallet/deposit/src/benchmarking.rs +++ b/pallet/deposit/src/benchmarking.rs @@ -35,8 +35,8 @@ mod benchmarks { >::set_deposit_contract(RawOrigin::Root.into(), a.clone()).unwrap(); - T::Ring::make_free_balance_be(&account_id(), 512); - T::Ring::make_free_balance_be(&T::Treasury::get(), 2 << 127); + T::Ring::make_free_balance_be(&account_id(), 2 << 126); + T::Ring::make_free_balance_be(&T::Treasury::get(), 2 << 126); // Worst-case scenario: // diff --git a/pallet/deposit/src/weights.rs b/pallet/deposit/src/weights.rs index bb0ba5586..27991ed4b 100644 --- a/pallet/deposit/src/weights.rs +++ b/pallet/deposit/src/weights.rs @@ -64,17 +64,27 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:3 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Deposit::DepositContract` (r:1 w:0) + /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) + /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodes` (r:2 w:0) + /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:0) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Ethereum::Pending` (r:1 w:1) + /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn migrate_for() -> Weight { // Proof Size summary in bytes: - // Measured: `26491` - // Estimated: `29615` - // Minimum execution time: 65_000 nanoseconds. - Weight::from_parts(67_000_000, 0) - .saturating_add(Weight::from_parts(29615, 0)) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) + // Measured: `27516` + // Estimated: `33456` + // Minimum execution time: 220_000 nanoseconds. + Weight::from_parts(225_000_000, 0) + .saturating_add(Weight::from_parts(33456, 0)) + .saturating_add(T::DbWeight::get().reads(11_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `Deposit::DepositContract` (r:0 w:1) /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -95,17 +105,27 @@ impl WeightInfo for () { /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// Storage: `Timestamp::Now` (r:1 w:0) /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:3 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `Deposit::DepositContract` (r:1 w:0) + /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) + /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) + /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `EVM::AccountCodes` (r:2 w:0) + /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:0) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Ethereum::Pending` (r:1 w:1) + /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn migrate_for() -> Weight { // Proof Size summary in bytes: - // Measured: `26491` - // Estimated: `29615` - // Minimum execution time: 65_000 nanoseconds. - Weight::from_parts(67_000_000, 0) - .saturating_add(Weight::from_parts(29615, 0)) - .saturating_add(RocksDbWeight::get().reads(3_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) + // Measured: `27516` + // Estimated: `33456` + // Minimum execution time: 220_000 nanoseconds. + Weight::from_parts(225_000_000, 0) + .saturating_add(Weight::from_parts(33456, 0)) + .saturating_add(RocksDbWeight::get().reads(11_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) } /// Storage: `Deposit::DepositContract` (r:0 w:1) /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) diff --git a/runtime/crab/src/weights/cumulus_pallet_parachain_system.rs b/runtime/crab/src/weights/cumulus_pallet_parachain_system.rs index b7291e855..4fd8a44e0 100644 --- a/runtime/crab/src/weights/cumulus_pallet_parachain_system.rs +++ b/runtime/crab/src/weights/cumulus_pallet_parachain_system.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `cumulus_pallet_parachain_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -71,10 +72,10 @@ impl cumulus_pallet_parachain_system::WeightInfo for We // Measured: `48` // Estimated: `3517` // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + Weight::from_parts(806_123_245, 0) .saturating_add(Weight::from_parts(0, 3517)) - // Standard Error: 59_482 - .saturating_add(Weight::from_parts(104_042_533, 0).saturating_mul(n.into())) + // Standard Error: 840_467 + .saturating_add(Weight::from_parts(101_126_518, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/runtime/crab/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/crab/src/weights/cumulus_pallet_xcmp_queue.rs index 32cf82370..9adc483e2 100644 --- a/runtime/crab/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/crab/src/weights/cumulus_pallet_xcmp_queue.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -82,7 +83,7 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `48` // Estimated: `3517` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -93,8 +94,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `42` // Estimated: `1527` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -106,7 +107,7 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `77` // Estimated: `1562` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 1562)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -116,7 +117,7 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) @@ -137,8 +138,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65677` // Estimated: `69142` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(49_000_000, 0) + // Minimum execution time: 46_000_000 picoseconds. + Weight::from_parts(48_000_000, 0) .saturating_add(Weight::from_parts(0, 69142)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -151,8 +152,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65676` // Estimated: `69141` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(29_000_000, 0) .saturating_add(Weight::from_parts(0, 69141)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/crab/src/weights/darwinia_account_migration.rs b/runtime/crab/src/weights/darwinia_account_migration.rs index 944bc8df1..e8b765606 100644 --- a/runtime/crab/src/weights/darwinia_account_migration.rs +++ b/runtime/crab/src/weights/darwinia_account_migration.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `darwinia_account_migration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -61,19 +62,27 @@ impl darwinia_account_migration::WeightInfo for WeightI /// Proof: `AccountMigration::KtonAccounts` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:0 w:1) + /// Storage: `AccountMigration::Ledgers` (r:1 w:1) + /// Proof: `AccountMigration::Ledgers` (`max_values`: None, `max_size`: Some(24664), added: 27139, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `AccountMigration::Deposits` (r:1 w:1) + /// Proof: `AccountMigration::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `DarwiniaStaking::Ledgers` (r:0 w:1) + /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:0 w:1) /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Deposit::Deposits` (r:0 w:1) + /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) fn migrate() -> Weight { // Proof Size summary in bytes: - // Measured: `591` - // Estimated: `3631` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(27_000_000, 0) - .saturating_add(Weight::from_parts(0, 3631)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `28313` + // Estimated: `31778` + // Minimum execution time: 116_000_000 picoseconds. + Weight::from_parts(122_000_000, 0) + .saturating_add(Weight::from_parts(0, 31778)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(11)) } /// Storage: `AccountMigration::Multisigs` (r:0 w:1) /// Proof: `AccountMigration::Multisigs` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -83,25 +92,34 @@ impl darwinia_account_migration::WeightInfo for WeightI /// Proof: `AccountMigration::KtonAccounts` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:0 w:1) + /// Storage: `AccountMigration::Ledgers` (r:1 w:1) + /// Proof: `AccountMigration::Ledgers` (`max_values`: None, `max_size`: Some(24664), added: 27139, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `AccountMigration::Deposits` (r:1 w:1) + /// Proof: `AccountMigration::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `DarwiniaStaking::Ledgers` (r:0 w:1) + /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:0 w:1) /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Deposit::Deposits` (r:0 w:1) + /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 99]`. /// The range of component `y` is `[0, 99]`. /// The range of component `z` is `[0, 99]`. fn migrate_multisig(x: u32, _y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0 + x * (18 ±0) + z * (18 ±0)` + // Estimated: `2 + x * (160 ±0) + z * (160 ±0)` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(10_423_814, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_489 - .saturating_add(Weight::from_parts(36_894, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 18).saturating_mul(x.into())) - .saturating_add(Weight::from_parts(0, 18).saturating_mul(z.into())) + Weight::from_parts(19_114_315, 0) + .saturating_add(Weight::from_parts(0, 2)) + // Standard Error: 10_526 + .saturating_add(Weight::from_parts(18_756, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 160).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 160).saturating_mul(z.into())) } /// Storage: `AccountMigration::Multisigs` (r:1 w:1) /// Proof: `AccountMigration::Multisigs` (`max_values`: None, `max_size`: None, mode: `Measured`) diff --git a/runtime/crab/src/weights/darwinia_deposit.rs b/runtime/crab/src/weights/darwinia_deposit.rs index 0525ad818..fa3bed9ec 100644 --- a/runtime/crab/src/weights/darwinia_deposit.rs +++ b/runtime/crab/src/weights/darwinia_deposit.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `darwinia_deposit` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -73,13 +74,13 @@ impl darwinia_deposit::WeightInfo for WeightInfo { /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn migrate_for() -> Weight { // Proof Size summary in bytes: - // Measured: `27516` - // Estimated: `33456` - // Minimum execution time: 4_057_000 nanoseconds. - Weight::from_parts(4_577_000_000, 0) - .saturating_add(Weight::from_parts(33456, 0)) - .saturating_add(T::DbWeight::get().reads(11_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `27325` + // Estimated: `33265` + // Minimum execution time: 223_000_000 picoseconds. + Weight::from_parts(236_000_000, 0) + .saturating_add(Weight::from_parts(0, 33265)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Deposit::DepositContract` (r:0 w:1) /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -87,9 +88,9 @@ impl darwinia_deposit::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/crab/src/weights/darwinia_staking.rs b/runtime/crab/src/weights/darwinia_staking.rs index 5870a656a..e9309a0bf 100644 --- a/runtime/crab/src/weights/darwinia_staking.rs +++ b/runtime/crab/src/weights/darwinia_staking.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `darwinia_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -59,40 +60,29 @@ impl darwinia_staking::WeightInfo for WeightInfo { /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimitState` (r:1 w:1) - /// Proof: `DarwiniaStaking::RateLimitState` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 1023]`. fn unstake_all_for() -> Weight { // Proof Size summary in bytes: - // Measured: `2330` - // Estimated: `83902` - // Minimum execution time: 535_000 nanoseconds. - Weight::from_parts(629_000_000, 0) - .saturating_add(Weight::from_parts(83902, 0)) - .saturating_add(T::DbWeight::get().reads(35_u64)) - .saturating_add(T::DbWeight::get().writes(34_u64)) + // Measured: `406` + // Estimated: `4543` + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(55_000_000, 0) + .saturating_add(Weight::from_parts(0, 4543)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `DarwiniaStaking::ExposureCacheStates` (r:1 w:0) - /// Proof: `DarwiniaStaking::ExposureCacheStates` (`max_values`: Some(1), `max_size`: Some(3), added: 498, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::ExposureCache2` (r:1 w:1) - /// Proof: `DarwiniaStaking::ExposureCache2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `DarwiniaStaking::PendingRewards` (r:1 w:1) /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:32 w:32) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `DarwiniaStaking::RingStakingContract` (r:1 w:0) + /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn allocate_ring_staking_reward_of() -> Weight { // Proof Size summary in bytes: - // Measured: `2330` - // Estimated: `83902` - // Minimum execution time: 535_000 nanoseconds. - Weight::from_parts(629_000_000, 0) - .saturating_add(Weight::from_parts(83902, 0)) - .saturating_add(T::DbWeight::get().reads(35_u64)) - .saturating_add(T::DbWeight::get().writes(34_u64)) + // Measured: `271` + // Estimated: `3736` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3736)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `DarwiniaStaking::RingStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -100,10 +90,10 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `DarwiniaStaking::KtonStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::KtonStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -111,10 +101,10 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `DarwiniaStaking::CollatorCount` (r:0 w:1) /// Proof: `DarwiniaStaking::CollatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -122,9 +112,9 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/crab/src/weights/frame_system.rs b/runtime/crab/src/weights/frame_system.rs index c3b3b0ac0..9262a794a 100644 --- a/runtime/crab/src/weights/frame_system.rs +++ b/runtime/crab/src/weights/frame_system.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -60,11 +61,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_000_000 picoseconds. - Weight::from_parts(4_970_413, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_495_352, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(156, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(150, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { @@ -72,10 +73,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + Weight::from_parts(5_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(1_000, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(956, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -86,7 +87,7 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `1485` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -107,8 +108,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164` // Estimated: `1649` - // Minimum execution time: 69_455_000_000 picoseconds. - Weight::from_parts(74_530_000_000, 0) + // Minimum execution time: 68_542_000_000 picoseconds. + Weight::from_parts(70_917_000_000, 0) .saturating_add(Weight::from_parts(0, 1649)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -120,11 +121,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 1_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_908 - .saturating_add(Weight::from_parts(800_499, 0).saturating_mul(i.into())) + // Standard Error: 862 + .saturating_add(Weight::from_parts(747_082, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -137,8 +138,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_502 - .saturating_add(Weight::from_parts(558_522, 0).saturating_mul(i.into())) + // Standard Error: 916 + .saturating_add(Weight::from_parts(537_428, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -148,11 +149,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `97 + p * (69 ±0)` // Estimated: `100 + p * (70 ±0)` - // Minimum execution time: 4_000_000 picoseconds. + // Minimum execution time: 3_000_000 picoseconds. Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 100)) - // Standard Error: 3_203 - .saturating_add(Weight::from_parts(1_046_988, 0).saturating_mul(p.into())) + // Standard Error: 1_213 + .saturating_add(Weight::from_parts(987_472, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) @@ -164,7 +165,7 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -186,8 +187,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `186` // Estimated: `1671` - // Minimum execution time: 75_039_000_000 picoseconds. - Weight::from_parts(79_857_000_000, 0) + // Minimum execution time: 72_166_000_000 picoseconds. + Weight::from_parts(75_512_000_000, 0) .saturating_add(Weight::from_parts(0, 1671)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/runtime/crab/src/weights/pallet_assets.rs b/runtime/crab/src/weights/pallet_assets.rs index 8c55b3e3d..021a15aa8 100644 --- a/runtime/crab/src/weights/pallet_assets.rs +++ b/runtime/crab/src/weights/pallet_assets.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -100,13 +101,13 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `509 + c * (183 ±0)` + // Measured: `479 + c * (183 ±0)` // Estimated: `3631 + c * (2591 ±0)` - // Minimum execution time: 13_000_000 picoseconds. + // Minimum execution time: 14_000_000 picoseconds. Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 18_699 - .saturating_add(Weight::from_parts(11_439_479, 0).saturating_mul(c.into())) + // Standard Error: 15_915 + .saturating_add(Weight::from_parts(11_014_465, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -122,11 +123,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `458 + a * (74 ±0)` // Estimated: `3631 + a * (2603 ±0)` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(24_398_483, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 10_481 - .saturating_add(Weight::from_parts(4_273_951, 0).saturating_mul(a.into())) + // Standard Error: 20_380 + .saturating_add(Weight::from_parts(4_075_795, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -142,7 +143,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `350` // Estimated: `3631` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -156,7 +157,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `350` // Estimated: `3631` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(23_000_000, 0) + Weight::from_parts(21_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -169,8 +170,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `410` // Estimated: `3631` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -186,7 +187,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `501` // Estimated: `6168` // Minimum execution time: 37_000_000 picoseconds. - Weight::from_parts(44_000_000, 0) + Weight::from_parts(38_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -201,8 +202,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `501` // Estimated: `6168` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(34_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -218,7 +219,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `501` // Estimated: `6168` // Minimum execution time: 36_000_000 picoseconds. - Weight::from_parts(38_000_000, 0) + Weight::from_parts(37_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -232,7 +233,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `410` // Estimated: `3631` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -245,8 +246,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `410` // Estimated: `3631` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -312,12 +313,12 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `350` // Estimated: `3631` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_861_969, 0) + Weight::from_parts(12_247_339, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 3_361 - .saturating_add(Weight::from_parts(2_967, 0).saturating_mul(n.into())) - // Standard Error: 3_361 - .saturating_add(Weight::from_parts(1_998, 0).saturating_mul(s.into())) + // Standard Error: 1_280 + .saturating_add(Weight::from_parts(7_748, 0).saturating_mul(n.into())) + // Standard Error: 1_280 + .saturating_add(Weight::from_parts(3_004, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -329,7 +330,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `478` // Estimated: `3631` - // Minimum execution time: 12_000_000 picoseconds. + // Minimum execution time: 13_000_000 picoseconds. Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) @@ -345,11 +346,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `237` // Estimated: `3631` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_154_297, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_765_587, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 2_748 - .saturating_add(Weight::from_parts(8_426, 0).saturating_mul(s.into())) + // Standard Error: 929 + .saturating_add(Weight::from_parts(5_162, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -362,7 +363,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `478` // Estimated: `3631` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -373,7 +374,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `307` // Estimated: `3631` - // Minimum execution time: 10_000_000 picoseconds. + // Minimum execution time: 9_000_000 picoseconds. Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(1)) @@ -387,8 +388,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `307` // Estimated: `3631` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -403,10 +404,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `599` + // Measured: `600` // Estimated: `6168` - // Minimum execution time: 44_000_000 picoseconds. - Weight::from_parts(51_000_000, 0) + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(45_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -420,7 +421,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `457` // Estimated: `3631` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(20_000_000, 0) + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -434,7 +435,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `457` // Estimated: `3631` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -461,8 +462,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `478` // Estimated: `3631` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(29_000_000, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -475,7 +476,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `3631` - // Minimum execution time: 26_000_000 picoseconds. + // Minimum execution time: 27_000_000 picoseconds. Weight::from_parts(27_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) @@ -491,8 +492,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `556` // Estimated: `3631` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(36_000_000, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -505,7 +506,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `448` // Estimated: `3631` - // Minimum execution time: 25_000_000 picoseconds. + // Minimum execution time: 26_000_000 picoseconds. Weight::from_parts(27_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) @@ -519,8 +520,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `410` // Estimated: `3631` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/crab/src/weights/pallet_balances.rs b/runtime/crab/src/weights/pallet_balances.rs index 8be80ee34..c5007bf5d 100644 --- a/runtime/crab/src/weights/pallet_balances.rs +++ b/runtime/crab/src/weights/pallet_balances.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -61,8 +62,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `39` // Estimated: `3581` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(45_000_000, 0) + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(46_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -73,8 +74,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `39` // Estimated: `3581` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(46_000_000, 0) + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(39_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -86,7 +87,7 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `162` // Estimated: `3581` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -98,7 +99,7 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `162` // Estimated: `3581` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(23_000_000, 0) + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -109,8 +110,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `201` // Estimated: `6172` - // Minimum execution time: 48_000_000 picoseconds. - Weight::from_parts(54_000_000, 0) + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(48_000_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -121,8 +122,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `39` // Estimated: `3581` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(48_000_000, 0) + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(50_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -144,13 +145,13 @@ impl pallet_balances::WeightInfo for WeightInfo { /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(u: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `91 + u * (124 ±0)` + // Measured: `57 + u * (124 ±0)` // Estimated: `990 + u * (2591 ±0)` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 22_072 - .saturating_add(Weight::from_parts(13_949_592, 0).saturating_mul(u.into())) + // Standard Error: 16_703 + .saturating_add(Weight::from_parts(13_210_192, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2591).saturating_mul(u.into())) @@ -162,7 +163,7 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `1501` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 1501)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/runtime/crab/src/weights/pallet_collective.rs b/runtime/crab/src/weights/pallet_collective.rs index 7f2cbee6b..f073977aa 100644 --- a/runtime/crab/src/weights/pallet_collective.rs +++ b/runtime/crab/src/weights/pallet_collective.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -71,12 +72,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `0 + m * (2021 ±0) + p * (2026 ±0)` // Estimated: `12200 + m * (1231 ±14) + p * (3660 ±14)` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 12200)) - // Standard Error: 45_518 - .saturating_add(Weight::from_parts(2_595_649, 0).saturating_mul(m.into())) - // Standard Error: 45_518 - .saturating_add(Weight::from_parts(5_807_718, 0).saturating_mul(p.into())) + // Standard Error: 40_472 + .saturating_add(Weight::from_parts(2_434_454, 0).saturating_mul(m.into())) + // Standard Error: 40_472 + .saturating_add(Weight::from_parts(5_554_206, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -95,12 +96,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `73 + m * (20 ±0)` // Estimated: `3997 + m * (20 ±0)` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(12_540_883, 0) + Weight::from_parts(13_695_192, 0) .saturating_add(Weight::from_parts(0, 3997)) - // Standard Error: 184 - .saturating_add(Weight::from_parts(1_851, 0).saturating_mul(b.into())) - // Standard Error: 1_900 - .saturating_add(Weight::from_parts(24_908, 0).saturating_mul(m.into())) + // Standard Error: 36 + .saturating_add(Weight::from_parts(1_074, 0).saturating_mul(b.into())) + // Standard Error: 377 + .saturating_add(Weight::from_parts(3_552, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) } @@ -117,12 +118,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `73 + m * (20 ±0)` // Estimated: `3997 + m * (20 ±0)` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_238_739, 0) + Weight::from_parts(15_104_139, 0) .saturating_add(Weight::from_parts(0, 3997)) - // Standard Error: 196 - .saturating_add(Weight::from_parts(922, 0).saturating_mul(b.into())) - // Standard Error: 2_030 - .saturating_add(Weight::from_parts(9_101, 0).saturating_mul(m.into())) + // Standard Error: 38 + .saturating_add(Weight::from_parts(1_292, 0).saturating_mul(b.into())) + // Standard Error: 399 + .saturating_add(Weight::from_parts(7_575, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) } @@ -143,13 +144,15 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `357 + m * (20 ±0) + p * (36 ±0)` // Estimated: `3751 + m * (21 ±0) + p * (36 ±0)` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(22_299_777, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(17_902_081, 0) .saturating_add(Weight::from_parts(0, 3751)) - // Standard Error: 291 - .saturating_add(Weight::from_parts(507, 0).saturating_mul(b.into())) - // Standard Error: 2_998 - .saturating_add(Weight::from_parts(130_068, 0).saturating_mul(p.into())) + // Standard Error: 74 + .saturating_add(Weight::from_parts(1_263, 0).saturating_mul(b.into())) + // Standard Error: 779 + .saturating_add(Weight::from_parts(12_809, 0).saturating_mul(m.into())) + // Standard Error: 769 + .saturating_add(Weight::from_parts(120_893, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 21).saturating_mul(m.into())) @@ -165,10 +168,10 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `832 + m * (40 ±0)` // Estimated: `4296 + m * (40 ±0)` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(17_457_013, 0) + Weight::from_parts(15_467_537, 0) .saturating_add(Weight::from_parts(0, 4296)) - // Standard Error: 3_368 - .saturating_add(Weight::from_parts(25_662, 0).saturating_mul(m.into())) + // Standard Error: 1_372 + .saturating_add(Weight::from_parts(12_004, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) @@ -188,12 +191,10 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `409 + m * (40 ±0) + p * (36 ±0)` // Estimated: `3854 + m * (41 ±0) + p * (36 ±0)` // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(20_865_732, 0) + Weight::from_parts(20_389_928, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 3_715 - .saturating_add(Weight::from_parts(11_192, 0).saturating_mul(m.into())) - // Standard Error: 3_623 - .saturating_add(Weight::from_parts(136_799, 0).saturating_mul(p.into())) + // Standard Error: 1_522 + .saturating_add(Weight::from_parts(118_551, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 41).saturating_mul(m.into())) @@ -216,11 +217,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `715 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` // Estimated: `4032 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(36_446_790, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(31_233_463, 0) .saturating_add(Weight::from_parts(0, 4032)) - // Standard Error: 5_509 - .saturating_add(Weight::from_parts(182_123, 0).saturating_mul(p.into())) + // Standard Error: 138 + .saturating_add(Weight::from_parts(1_093, 0).saturating_mul(b.into())) + // Standard Error: 1_427 + .saturating_add(Weight::from_parts(141_573, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) @@ -243,11 +246,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `429 + m * (40 ±0) + p * (36 ±0)` // Estimated: `3874 + m * (41 ±0) + p * (36 ±0)` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(25_330_921, 0) + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(20_808_745, 0) .saturating_add(Weight::from_parts(0, 3874)) - // Standard Error: 4_098 - .saturating_add(Weight::from_parts(120_401, 0).saturating_mul(p.into())) + // Standard Error: 865 + .saturating_add(Weight::from_parts(10_979, 0).saturating_mul(m.into())) + // Standard Error: 843 + .saturating_add(Weight::from_parts(121_696, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 41).saturating_mul(m.into())) @@ -273,14 +278,14 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `735 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` // Estimated: `4052 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(31_661_426, 0) + Weight::from_parts(33_662_051, 0) .saturating_add(Weight::from_parts(0, 4052)) - // Standard Error: 570 - .saturating_add(Weight::from_parts(3_701, 0).saturating_mul(b.into())) - // Standard Error: 6_032 - .saturating_add(Weight::from_parts(21_727, 0).saturating_mul(m.into())) - // Standard Error: 5_880 - .saturating_add(Weight::from_parts(196_199, 0).saturating_mul(p.into())) + // Standard Error: 120 + .saturating_add(Weight::from_parts(731, 0).saturating_mul(b.into())) + // Standard Error: 1_278 + .saturating_add(Weight::from_parts(8_140, 0).saturating_mul(m.into())) + // Standard Error: 1_246 + .saturating_add(Weight::from_parts(133_698, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) @@ -298,11 +303,11 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `226 + p * (32 ±0)` // Estimated: `1711 + p * (32 ±0)` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_462_960, 0) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(11_925_961, 0) .saturating_add(Weight::from_parts(0, 1711)) - // Standard Error: 2_892 - .saturating_add(Weight::from_parts(121_652, 0).saturating_mul(p.into())) + // Standard Error: 793 + .saturating_add(Weight::from_parts(112_755, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/runtime/crab/src/weights/pallet_conviction_voting.rs b/runtime/crab/src/weights/pallet_conviction_voting.rs index 357351a7e..9fb9ee077 100644 --- a/runtime/crab/src/weights/pallet_conviction_voting.rs +++ b/runtime/crab/src/weights/pallet_conviction_voting.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_conviction_voting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -71,8 +72,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13458` // Estimated: `42428` - // Minimum execution time: 88_000_000 picoseconds. - Weight::from_parts(109_000_000, 0) + // Minimum execution time: 87_000_000 picoseconds. + Weight::from_parts(90_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -93,8 +94,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `14179` // Estimated: `83866` - // Minimum execution time: 131_000_000 picoseconds. - Weight::from_parts(145_000_000, 0) + // Minimum execution time: 118_000_000 picoseconds. + Weight::from_parts(122_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -109,8 +110,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13928` // Estimated: `83866` - // Minimum execution time: 103_000_000 picoseconds. - Weight::from_parts(119_000_000, 0) + // Minimum execution time: 95_000_000 picoseconds. + Weight::from_parts(101_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -123,8 +124,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13052` // Estimated: `30694` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(60_000_000, 0) + // Minimum execution time: 48_000_000 picoseconds. + Weight::from_parts(51_000_000, 0) .saturating_add(Weight::from_parts(0, 30694)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -146,11 +147,11 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `7020 + r * (447 ±0)` // Estimated: `83866 + r * (3387 ±0)` - // Minimum execution time: 50_000_000 picoseconds. - Weight::from_parts(91_282_789, 0) + // Minimum execution time: 49_000_000 picoseconds. + Weight::from_parts(97_869_057, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 346_446 - .saturating_add(Weight::from_parts(37_516_946, 0).saturating_mul(r.into())) + // Standard Error: 366_165 + .saturating_add(Weight::from_parts(34_752_401, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -168,11 +169,11 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `6876 + r * (447 ±0)` // Estimated: `83866 + r * (3387 ±0)` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(55_128_879, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(85_029_564, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 314_940 - .saturating_add(Weight::from_parts(37_330_071, 0).saturating_mul(r.into())) + // Standard Error: 285_050 + .saturating_add(Weight::from_parts(34_171_495, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -191,8 +192,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `12038` // Estimated: `30694` - // Minimum execution time: 71_000_000 picoseconds. - Weight::from_parts(82_000_000, 0) + // Minimum execution time: 76_000_000 picoseconds. + Weight::from_parts(79_000_000, 0) .saturating_add(Weight::from_parts(0, 30694)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/crab/src/weights/pallet_message_queue.rs b/runtime/crab/src/weights/pallet_message_queue.rs index bec801e1a..8f6b068e5 100644 --- a/runtime/crab/src/weights/pallet_message_queue.rs +++ b/runtime/crab/src/weights/pallet_message_queue.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -63,8 +64,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `223` // Estimated: `6044` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -90,7 +91,7 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `6` // Estimated: `3517` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -101,8 +102,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -127,8 +128,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 79_000_000 picoseconds. - Weight::from_parts(92_000_000, 0) + // Minimum execution time: 77_000_000 picoseconds. + Weight::from_parts(78_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,7 +142,7 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `171` // Estimated: `3517` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + Weight::from_parts(7_000_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -154,8 +155,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(43_000_000, 0) + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(44_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -168,8 +169,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(54_000_000, 0) + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(53_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -182,8 +183,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 48_000_000 picoseconds. - Weight::from_parts(59_000_000, 0) + // Minimum execution time: 49_000_000 picoseconds. + Weight::from_parts(56_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/crab/src/weights/pallet_preimage.rs b/runtime/crab/src/weights/pallet_preimage.rs index 170dae6cc..7a05a6763 100644 --- a/runtime/crab/src/weights/pallet_preimage.rs +++ b/runtime/crab/src/weights/pallet_preimage.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -68,11 +69,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3544` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(50_000_000, 0) + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(46_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(1_118, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_112, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -88,10 +89,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `3544` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(1_120, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_109, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -107,10 +108,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `3544` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(1_126, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_103, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -126,8 +127,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `219` // Estimated: `3544` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(52_000_000, 0) + // Minimum execution time: 48_000_000 picoseconds. + Weight::from_parts(50_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -142,8 +143,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3544` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(22_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -157,7 +158,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `176` // Estimated: `3544` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(22_000_000, 0) + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -170,8 +171,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3544` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -184,8 +185,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3544` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -198,8 +199,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3544` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -215,7 +216,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `144` // Estimated: `3544` // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(23_000_000, 0) + Weight::from_parts(19_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -229,7 +230,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `3544` // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -243,7 +244,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `3544` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -259,13 +260,13 @@ impl pallet_preimage::WeightInfo for WeightInfo { /// The range of component `n` is `[1, 1024]`. fn ensure_updated(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `181 + n * (203 ±0)` + // Measured: `149 + n * (203 ±0)` // Estimated: `990 + n * (2591 ±0)` - // Minimum execution time: 55_000_000 picoseconds. - Weight::from_parts(58_000_000, 0) + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(54_000_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 47_893 - .saturating_add(Weight::from_parts(57_129_527, 0).saturating_mul(n.into())) + // Standard Error: 33_431 + .saturating_add(Weight::from_parts(53_086_984, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2591).saturating_mul(n.into())) diff --git a/runtime/crab/src/weights/pallet_proxy.rs b/runtime/crab/src/weights/pallet_proxy.rs index d99a916e8..f98f5df42 100644 --- a/runtime/crab/src/weights/pallet_proxy.rs +++ b/runtime/crab/src/weights/pallet_proxy.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -64,11 +65,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `153 + p * (25 ±0)` // Estimated: `4310` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_868_651, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_511_335, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 6_453 - .saturating_add(Weight::from_parts(55_112, 0).saturating_mul(p.into())) + // Standard Error: 2_001 + .saturating_add(Weight::from_parts(17_697, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -85,13 +86,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `405 + a * (56 ±0) + p * (25 ±0)` // Estimated: `5302` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(34_034_765, 0) + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(31_723_038, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 11_517 - .saturating_add(Weight::from_parts(130_688, 0).saturating_mul(a.into())) - // Standard Error: 11_900 - .saturating_add(Weight::from_parts(26_788, 0).saturating_mul(p.into())) + // Standard Error: 2_270 + .saturating_add(Weight::from_parts(108_906, 0).saturating_mul(a.into())) + // Standard Error: 2_345 + .saturating_add(Weight::from_parts(12_512, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -101,17 +102,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { + fn remove_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `329 + a * (56 ±0)` // Estimated: `5302` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(20_696_926, 0) + Weight::from_parts(20_276_598, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 6_889 - .saturating_add(Weight::from_parts(138_259, 0).saturating_mul(a.into())) - // Standard Error: 7_118 - .saturating_add(Weight::from_parts(23_118, 0).saturating_mul(p.into())) + // Standard Error: 2_327 + .saturating_add(Weight::from_parts(114_252, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -126,10 +125,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `329 + a * (56 ±0)` // Estimated: `5302` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(21_877_742, 0) + Weight::from_parts(20_787_200, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 7_182 - .saturating_add(Weight::from_parts(138_873, 0).saturating_mul(a.into())) + // Standard Error: 2_014 + .saturating_add(Weight::from_parts(111_362, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -145,13 +144,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `345 + a * (56 ±0) + p * (25 ±0)` // Estimated: `5302` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(27_954_010, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(25_801_041, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 8_644 - .saturating_add(Weight::from_parts(139_219, 0).saturating_mul(a.into())) - // Standard Error: 8_931 - .saturating_add(Weight::from_parts(13_609, 0).saturating_mul(p.into())) + // Standard Error: 2_000 + .saturating_add(Weight::from_parts(140_358, 0).saturating_mul(a.into())) + // Standard Error: 2_066 + .saturating_add(Weight::from_parts(20_005, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -162,11 +161,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `149 + p * (25 ±0)` // Estimated: `4310` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(21_897_500, 0) + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(20_588_342, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 8_123 - .saturating_add(Weight::from_parts(29_671, 0).saturating_mul(p.into())) + // Standard Error: 1_827 + .saturating_add(Weight::from_parts(45_983, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -178,38 +177,38 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `149 + p * (25 ±0)` // Estimated: `4310` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(22_418_603, 0) + Weight::from_parts(21_022_947, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 7_503 - .saturating_add(Weight::from_parts(14_007, 0).saturating_mul(p.into())) + // Standard Error: 2_673 + .saturating_add(Weight::from_parts(10_892, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn remove_proxies(_p: u32, ) -> Weight { + fn remove_proxies(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `149 + p * (25 ±0)` // Estimated: `4310` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(22_214_453, 0) + Weight::from_parts(20_186_224, 0) .saturating_add(Weight::from_parts(0, 4310)) + // Standard Error: 1_984 + .saturating_add(Weight::from_parts(30_784, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn create_pure(p: u32, ) -> Weight { + fn create_pure(_p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `161` // Estimated: `4310` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(22_971_370, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(22_149_368, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 8_048 - .saturating_add(Weight::from_parts(25_556, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -221,10 +220,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `174 + p * (25 ±0)` // Estimated: `4310` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(22_291_424, 0) + Weight::from_parts(20_752_447, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 7_580 - .saturating_add(Weight::from_parts(1_967, 0).saturating_mul(p.into())) + // Standard Error: 1_708 + .saturating_add(Weight::from_parts(12_228, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/crab/src/weights/pallet_referenda.rs b/runtime/crab/src/weights/pallet_referenda.rs index 07b3722cd..b552c8dee 100644 --- a/runtime/crab/src/weights/pallet_referenda.rs +++ b/runtime/crab/src/weights/pallet_referenda.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -65,8 +66,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `275` // Estimated: `42428` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(41_000_000, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -79,8 +80,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `516` // Estimated: `83866` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(45_000_000, 0) + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(39_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -95,10 +96,10 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn place_decision_deposit_queued() -> Weight { // Proof Size summary in bytes: - // Measured: `3309` + // Measured: `3276` // Estimated: `42428` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(49_000_000, 0) + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -113,10 +114,10 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn place_decision_deposit_not_queued() -> Weight { // Proof Size summary in bytes: - // Measured: `3329` + // Measured: `3296` // Estimated: `42428` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(51_000_000, 0) + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(44_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -131,8 +132,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `516` // Estimated: `83866` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(53_000_000, 0) + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(46_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -147,8 +148,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `516` // Estimated: `83866` - // Minimum execution time: 44_000_000 picoseconds. - Weight::from_parts(45_000_000, 0) + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(44_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -159,8 +160,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `425` // Estimated: `4377` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(27_000_000, 0) + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(26_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -171,8 +172,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `384` // Estimated: `4377` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -185,8 +186,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `390` // Estimated: `83866` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(29_000_000, 0) + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(26_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -203,8 +204,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `846` // Estimated: `83866` - // Minimum execution time: 83_000_000 picoseconds. - Weight::from_parts(87_000_000, 0) + // Minimum execution time: 84_000_000 picoseconds. + Weight::from_parts(85_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -217,8 +218,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `207` // Estimated: `5477` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -231,10 +232,10 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn one_fewer_deciding_failing() -> Weight { // Proof Size summary in bytes: - // Measured: `3209` + // Measured: `3162` // Estimated: `42428` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(34_000_000, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(29_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -247,10 +248,10 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn one_fewer_deciding_passing() -> Weight { // Proof Size summary in bytes: - // Measured: `3195` + // Measured: `3162` // Estimated: `42428` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(35_000_000, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -263,8 +264,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3020` // Estimated: `5477` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -277,8 +278,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3020` // Estimated: `5477` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -310,7 +311,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `3044` // Estimated: `5477` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -366,7 +367,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `390` // Estimated: `42428` // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + Weight::from_parts(23_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -382,7 +383,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `390` // Estimated: `42428` // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(24_000_000, 0) + Weight::from_parts(25_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -396,7 +397,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `443` // Estimated: `42428` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(25_000_000, 0) + Weight::from_parts(21_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -409,7 +410,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `426` // Estimated: `42428` - // Minimum execution time: 19_000_000 picoseconds. + // Minimum execution time: 20_000_000 picoseconds. Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) @@ -454,7 +455,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `447` // Estimated: `83866` // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(34_000_000, 0) + Weight::from_parts(29_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -467,8 +468,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `443` // Estimated: `42428` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -485,8 +486,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `443` // Estimated: `4377` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(20_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/crab/src/weights/pallet_scheduler.rs b/runtime/crab/src/weights/pallet_scheduler.rs index 00e8f0842..4ac7f02e8 100644 --- a/runtime/crab/src/weights/pallet_scheduler.rs +++ b/runtime/crab/src/weights/pallet_scheduler.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -75,10 +76,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `78 + s * (177 ±0)` // Estimated: `42428` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(6_061_103, 0) + Weight::from_parts(5_568_551, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_856 - .saturating_add(Weight::from_parts(389_514, 0).saturating_mul(s.into())) + // Standard Error: 1_629 + .saturating_add(Weight::from_parts(381_298, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -101,11 +102,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `179 + s * (1 ±0)` // Estimated: `3644 + s * (1 ±0)` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3644)) // Standard Error: 2 - .saturating_add(Weight::from_parts(486, 0).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(503, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) @@ -116,7 +117,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. + // Minimum execution time: 4_000_000 picoseconds. Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -156,10 +157,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `78 + s * (177 ±0)` // Estimated: `42428` // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(11_517_176, 0) + Weight::from_parts(10_972_705, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 5_666 - .saturating_add(Weight::from_parts(402_645, 0).saturating_mul(s.into())) + // Standard Error: 1_476 + .saturating_add(Weight::from_parts(372_787, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -173,10 +174,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `78 + s * (177 ±0)` // Estimated: `42428` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(11_836_816, 0) + Weight::from_parts(11_434_122, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 7_709 - .saturating_add(Weight::from_parts(653_066, 0).saturating_mul(s.into())) + // Standard Error: 1_274 + .saturating_add(Weight::from_parts(605_406, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -190,10 +191,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `255 + s * (185 ±0)` // Estimated: `42428` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(15_472_235, 0) + Weight::from_parts(14_639_058, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 7_183 - .saturating_add(Weight::from_parts(429_623, 0).saturating_mul(s.into())) + // Standard Error: 2_168 + .saturating_add(Weight::from_parts(383_222, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -207,10 +208,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `281 + s * (185 ±0)` // Estimated: `42428` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(13_326_693, 0) + Weight::from_parts(13_807_102, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 7_954 - .saturating_add(Weight::from_parts(699_188, 0).saturating_mul(s.into())) + // Standard Error: 1_277 + .saturating_add(Weight::from_parts(617_603, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/crab/src/weights/pallet_session.rs b/runtime/crab/src/weights/pallet_session.rs index 648610786..1d1c933c1 100644 --- a/runtime/crab/src/weights/pallet_session.rs +++ b/runtime/crab/src/weights/pallet_session.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -64,7 +65,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `246` // Estimated: `3711` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3711)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -78,7 +79,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `228` // Estimated: `3693` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/crab/src/weights/pallet_timestamp.rs b/runtime/crab/src/weights/pallet_timestamp.rs index 4933c5da1..40c21da33 100644 --- a/runtime/crab/src/weights/pallet_timestamp.rs +++ b/runtime/crab/src/weights/pallet_timestamp.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_treasury.rs b/runtime/crab/src/weights/pallet_treasury.rs index deaa9b1ad..1e74dd119 100644 --- a/runtime/crab/src/weights/pallet_treasury.rs +++ b/runtime/crab/src/weights/pallet_treasury.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -65,7 +66,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `1887` - // Minimum execution time: 9_000_000 picoseconds. + // Minimum execution time: 10_000_000 picoseconds. Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(2)) @@ -109,10 +110,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Measured: `470 + p * (8 ±0)` // Estimated: `3549` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(10_154_898, 0) + Weight::from_parts(9_253_861, 0) .saturating_add(Weight::from_parts(0, 3549)) - // Standard Error: 2_396 - .saturating_add(Weight::from_parts(34_416, 0).saturating_mul(p.into())) + // Standard Error: 1_097 + .saturating_add(Weight::from_parts(19_301, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -144,10 +145,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Measured: `219 + p * (97 ±0)` // Estimated: `3581 + p * (2559 ±0)` // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(18_314_921, 0) + Weight::from_parts(39_475_278, 0) .saturating_add(Weight::from_parts(0, 3581)) - // Standard Error: 32_528 - .saturating_add(Weight::from_parts(2_782_967, 0).saturating_mul(p.into())) + // Standard Error: 142_377 + .saturating_add(Weight::from_parts(2_515_355, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -162,7 +163,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `1489` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -175,7 +176,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `315` // Estimated: `6172` - // Minimum execution time: 48_000_000 picoseconds. + // Minimum execution time: 50_000_000 picoseconds. Weight::from_parts(50_000_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(3)) @@ -188,7 +189,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Measured: `148` // Estimated: `3522` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3522)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -200,7 +201,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Measured: `148` // Estimated: `3522` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3522)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/crab/src/weights/pallet_tx_pause.rs b/runtime/crab/src/weights/pallet_tx_pause.rs index 9da3fe68f..27786c303 100644 --- a/runtime/crab/src/weights/pallet_tx_pause.rs +++ b/runtime/crab/src/weights/pallet_tx_pause.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_tx_pause` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -62,7 +63,7 @@ impl pallet_tx_pause::WeightInfo for WeightInfo { // Measured: `4` // Estimated: `3997` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 3997)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -73,8 +74,8 @@ impl pallet_tx_pause::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `566` // Estimated: `3997` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3997)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/crab/src/weights/pallet_utility.rs b/runtime/crab/src/weights/pallet_utility.rs index b2d7dfdb7..84ff392be 100644 --- a/runtime/crab/src/weights/pallet_utility.rs +++ b/runtime/crab/src/weights/pallet_utility.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -63,10 +64,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `4` // Estimated: `3997` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(20_124_325, 0) + Weight::from_parts(13_306_303, 0) .saturating_add(Weight::from_parts(0, 3997)) - // Standard Error: 20_837 - .saturating_add(Weight::from_parts(4_967_840, 0).saturating_mul(c.into())) + // Standard Error: 2_735 + .saturating_add(Weight::from_parts(4_665_598, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `TxPause::PausedCalls` (r:1 w:0) @@ -75,7 +76,7 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3997` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 6_000_000 picoseconds. Weight::from_parts(7_000_000, 0) .saturating_add(Weight::from_parts(0, 3997)) .saturating_add(T::DbWeight::get().reads(1)) @@ -88,10 +89,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `4` // Estimated: `3997` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(11_330_409, 0) + Weight::from_parts(9_648_556, 0) .saturating_add(Weight::from_parts(0, 3997)) - // Standard Error: 19_792 - .saturating_add(Weight::from_parts(5_257_682, 0).saturating_mul(c.into())) + // Standard Error: 2_882 + .saturating_add(Weight::from_parts(4_894_709, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) } fn dispatch_as() -> Weight { @@ -110,10 +111,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `4` // Estimated: `3997` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(2_679_311, 0) + Weight::from_parts(3_751_663, 0) .saturating_add(Weight::from_parts(0, 3997)) - // Standard Error: 21_388 - .saturating_add(Weight::from_parts(5_053_368, 0).saturating_mul(c.into())) + // Standard Error: 3_706 + .saturating_add(Weight::from_parts(4_700_288, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) } } diff --git a/runtime/crab/src/weights/pallet_whitelist.rs b/runtime/crab/src/weights/pallet_whitelist.rs index 142bb54ba..fe54a7ddd 100644 --- a/runtime/crab/src/weights/pallet_whitelist.rs +++ b/runtime/crab/src/weights/pallet_whitelist.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_whitelist` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: @@ -65,7 +66,7 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `48` // Estimated: `3544` - // Minimum execution time: 14_000_000 picoseconds. + // Minimum execution time: 15_000_000 picoseconds. Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(3)) @@ -81,8 +82,8 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `176` // Estimated: `3544` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -101,10 +102,10 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Measured: `252 + n * (1 ±0)` // Estimated: `3716 + n * (1 ±0)` // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(23_000_000, 0) + Weight::from_parts(24_000_000, 0) .saturating_add(Weight::from_parts(0, 3716)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(506, 0).saturating_mul(n.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(503, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -121,10 +122,10 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Measured: `176` // Estimated: `3544` // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(19_545_715, 0) + Weight::from_parts(18_253_001, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 34 - .saturating_add(Weight::from_parts(949, 0).saturating_mul(n.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_001, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/darwinia/src/weights/cumulus_pallet_parachain_system.rs b/runtime/darwinia/src/weights/cumulus_pallet_parachain_system.rs index eef5c2bcb..424b50398 100644 --- a/runtime/darwinia/src/weights/cumulus_pallet_parachain_system.rs +++ b/runtime/darwinia/src/weights/cumulus_pallet_parachain_system.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `cumulus_pallet_parachain_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -73,8 +74,8 @@ impl cumulus_pallet_parachain_system::WeightInfo for We // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 3517)) - // Standard Error: 57_770 - .saturating_add(Weight::from_parts(104_402_544, 0).saturating_mul(n.into())) + // Standard Error: 40_190 + .saturating_add(Weight::from_parts(100_461_192, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/runtime/darwinia/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/darwinia/src/weights/cumulus_pallet_xcmp_queue.rs index ef97eb03c..1cac3b804 100644 --- a/runtime/darwinia/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/darwinia/src/weights/cumulus_pallet_xcmp_queue.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -82,7 +83,7 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `48` // Estimated: `3517` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -116,7 +117,7 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `0` // Estimated: `0` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) @@ -137,8 +138,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65677` // Estimated: `69142` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(46_000_000, 0) + // Minimum execution time: 46_000_000 picoseconds. + Weight::from_parts(47_000_000, 0) .saturating_add(Weight::from_parts(0, 69142)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -151,8 +152,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65676` // Estimated: `69141` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(29_000_000, 0) .saturating_add(Weight::from_parts(0, 69141)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/darwinia/src/weights/darwinia_account_migration.rs b/runtime/darwinia/src/weights/darwinia_account_migration.rs index e74294041..6316b7135 100644 --- a/runtime/darwinia/src/weights/darwinia_account_migration.rs +++ b/runtime/darwinia/src/weights/darwinia_account_migration.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `darwinia_account_migration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -61,19 +62,27 @@ impl darwinia_account_migration::WeightInfo for WeightI /// Proof: `AccountMigration::KtonAccounts` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:0 w:1) + /// Storage: `AccountMigration::Ledgers` (r:1 w:1) + /// Proof: `AccountMigration::Ledgers` (`max_values`: None, `max_size`: Some(24664), added: 27139, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `AccountMigration::Deposits` (r:1 w:1) + /// Proof: `AccountMigration::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `DarwiniaStaking::Ledgers` (r:0 w:1) + /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:0 w:1) /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Deposit::Deposits` (r:0 w:1) + /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) fn migrate() -> Weight { // Proof Size summary in bytes: - // Measured: `591` - // Estimated: `3631` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(27_000_000, 0) - .saturating_add(Weight::from_parts(0, 3631)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `28346` + // Estimated: `31811` + // Minimum execution time: 118_000_000 picoseconds. + Weight::from_parts(125_000_000, 0) + .saturating_add(Weight::from_parts(0, 31811)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(11)) } /// Storage: `AccountMigration::Multisigs` (r:0 w:1) /// Proof: `AccountMigration::Multisigs` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -83,25 +92,34 @@ impl darwinia_account_migration::WeightInfo for WeightI /// Proof: `AccountMigration::KtonAccounts` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `Assets::Asset` (r:1 w:1) /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:0 w:1) + /// Storage: `AccountMigration::Ledgers` (r:1 w:1) + /// Proof: `AccountMigration::Ledgers` (`max_values`: None, `max_size`: Some(24664), added: 27139, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:3) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `AccountMigration::Deposits` (r:1 w:1) + /// Proof: `AccountMigration::Deposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `DarwiniaStaking::Ledgers` (r:0 w:1) + /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) /// Storage: `Assets::Account` (r:0 w:1) /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) + /// Storage: `Deposit::Deposits` (r:0 w:1) + /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 99]`. /// The range of component `y` is `[0, 99]`. /// The range of component `z` is `[0, 99]`. fn migrate_multisig(x: u32, _y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0 + x * (18 ±0) + z * (18 ±0)` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(10_220_315, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_252 - .saturating_add(Weight::from_parts(41_724, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 18).saturating_mul(x.into())) - .saturating_add(Weight::from_parts(0, 18).saturating_mul(z.into())) + // Estimated: `2 + x * (161 ±0) + z * (161 ±0)` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(19_462_486, 0) + .saturating_add(Weight::from_parts(0, 2)) + // Standard Error: 10_480 + .saturating_add(Weight::from_parts(19_792, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 161).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 161).saturating_mul(z.into())) } /// Storage: `AccountMigration::Multisigs` (r:1 w:1) /// Proof: `AccountMigration::Multisigs` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -111,8 +129,8 @@ impl darwinia_account_migration::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `3499` // Estimated: `6964` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 6964)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/darwinia/src/weights/darwinia_deposit.rs b/runtime/darwinia/src/weights/darwinia_deposit.rs index c1472c710..b6a705b84 100644 --- a/runtime/darwinia/src/weights/darwinia_deposit.rs +++ b/runtime/darwinia/src/weights/darwinia_deposit.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `darwinia_deposit` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -73,13 +74,13 @@ impl darwinia_deposit::WeightInfo for WeightInfo { /// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn migrate_for() -> Weight { // Proof Size summary in bytes: - // Measured: `27516` - // Estimated: `33456` - // Minimum execution time: 4_057_000 nanoseconds. - Weight::from_parts(4_577_000_000, 0) - .saturating_add(Weight::from_parts(33456, 0)) - .saturating_add(T::DbWeight::get().reads(11_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `27484` + // Estimated: `33424` + // Minimum execution time: 229_000_000 picoseconds. + Weight::from_parts(233_000_000, 0) + .saturating_add(Weight::from_parts(0, 33424)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Deposit::DepositContract` (r:0 w:1) /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -87,9 +88,9 @@ impl darwinia_deposit::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/darwinia/src/weights/darwinia_staking.rs b/runtime/darwinia/src/weights/darwinia_staking.rs index c29085ee7..59da82154 100644 --- a/runtime/darwinia/src/weights/darwinia_staking.rs +++ b/runtime/darwinia/src/weights/darwinia_staking.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `darwinia_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -59,40 +60,29 @@ impl darwinia_staking::WeightInfo for WeightInfo { /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimitState` (r:1 w:1) - /// Proof: `DarwiniaStaking::RateLimitState` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 1023]`. fn unstake_all_for() -> Weight { // Proof Size summary in bytes: - // Measured: `2330` - // Estimated: `83902` - // Minimum execution time: 535_000 nanoseconds. - Weight::from_parts(629_000_000, 0) - .saturating_add(Weight::from_parts(83902, 0)) - .saturating_add(T::DbWeight::get().reads(35_u64)) - .saturating_add(T::DbWeight::get().writes(34_u64)) + // Measured: `406` + // Estimated: `4543` + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(55_000_000, 0) + .saturating_add(Weight::from_parts(0, 4543)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `DarwiniaStaking::ExposureCacheStates` (r:1 w:0) - /// Proof: `DarwiniaStaking::ExposureCacheStates` (`max_values`: Some(1), `max_size`: Some(3), added: 498, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::ExposureCache2` (r:1 w:1) - /// Proof: `DarwiniaStaking::ExposureCache2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `DarwiniaStaking::PendingRewards` (r:1 w:1) /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:32 w:32) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `DarwiniaStaking::RingStakingContract` (r:1 w:0) + /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn allocate_ring_staking_reward_of() -> Weight { // Proof Size summary in bytes: - // Measured: `2330` - // Estimated: `83902` - // Minimum execution time: 535_000 nanoseconds. - Weight::from_parts(629_000_000, 0) - .saturating_add(Weight::from_parts(83902, 0)) - .saturating_add(T::DbWeight::get().reads(35_u64)) - .saturating_add(T::DbWeight::get().writes(34_u64)) + // Measured: `271` + // Estimated: `3736` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3736)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `DarwiniaStaking::RingStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -100,10 +90,10 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `DarwiniaStaking::KtonStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::KtonStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -111,10 +101,10 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `DarwiniaStaking::CollatorCount` (r:0 w:1) /// Proof: `DarwiniaStaking::CollatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -122,9 +112,9 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/darwinia/src/weights/frame_system.rs b/runtime/darwinia/src/weights/frame_system.rs index 3febf6169..7afb23bf2 100644 --- a/runtime/darwinia/src/weights/frame_system.rs +++ b/runtime/darwinia/src/weights/frame_system.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -60,22 +61,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_000_000 picoseconds. - Weight::from_parts(2_022_883, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_743_822, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(158, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(149, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. + // Minimum execution time: 5_000_000 picoseconds. Weight::from_parts(5_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(1_004, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(953, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -107,8 +108,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `198` // Estimated: `1683` - // Minimum execution time: 68_735_000_000 picoseconds. - Weight::from_parts(75_159_000_000, 0) + // Minimum execution time: 67_705_000_000 picoseconds. + Weight::from_parts(71_630_000_000, 0) .saturating_add(Weight::from_parts(0, 1683)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -123,8 +124,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_238 - .saturating_add(Weight::from_parts(796_198, 0).saturating_mul(i.into())) + // Standard Error: 2_602 + .saturating_add(Weight::from_parts(763_849, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -134,11 +135,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 1_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_484 - .saturating_add(Weight::from_parts(567_851, 0).saturating_mul(i.into())) + // Standard Error: 851 + .saturating_add(Weight::from_parts(538_465, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -151,8 +152,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 3_000_000 picoseconds. Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 102)) - // Standard Error: 3_104 - .saturating_add(Weight::from_parts(1_048_017, 0).saturating_mul(p.into())) + // Standard Error: 1_226 + .saturating_add(Weight::from_parts(990_199, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) @@ -164,7 +165,7 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -186,8 +187,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `220` // Estimated: `1705` - // Minimum execution time: 70_228_000_000 picoseconds. - Weight::from_parts(79_493_000_000, 0) + // Minimum execution time: 67_521_000_000 picoseconds. + Weight::from_parts(76_287_000_000, 0) .saturating_add(Weight::from_parts(0, 1705)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/runtime/darwinia/src/weights/pallet_asset_manager.rs b/runtime/darwinia/src/weights/pallet_asset_manager.rs index e4081918f..12688d4d0 100644 --- a/runtime/darwinia/src/weights/pallet_asset_manager.rs +++ b/runtime/darwinia/src/weights/pallet_asset_manager.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_asset_manager` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -84,11 +85,11 @@ impl pallet_asset_manager::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `595 + x * (9 ±0)` // Estimated: `3983 + x * (10 ±0)` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(17_795_668, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_177_208, 0) .saturating_add(Weight::from_parts(0, 3983)) - // Standard Error: 5_207 - .saturating_add(Weight::from_parts(392_816, 0).saturating_mul(x.into())) + // Standard Error: 2_681 + .saturating_add(Weight::from_parts(359_761, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(x.into())) @@ -107,10 +108,10 @@ impl pallet_asset_manager::WeightInfo for WeightInfo // Measured: `968 + x * (13 ±0)` // Estimated: `4303 + x * (14 ±0)` // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(28_440_466, 0) + Weight::from_parts(26_284_970, 0) .saturating_add(Weight::from_parts(0, 4303)) - // Standard Error: 6_795 - .saturating_add(Weight::from_parts(386_150, 0).saturating_mul(x.into())) + // Standard Error: 2_793 + .saturating_add(Weight::from_parts(370_531, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(6)) .saturating_add(Weight::from_parts(0, 14).saturating_mul(x.into())) @@ -125,10 +126,10 @@ impl pallet_asset_manager::WeightInfo for WeightInfo // Measured: `196 + x * (5 ±0)` // Estimated: `1678 + x * (5 ±0)` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(11_889_301, 0) + Weight::from_parts(10_702_161, 0) .saturating_add(Weight::from_parts(0, 1678)) - // Standard Error: 4_468 - .saturating_add(Weight::from_parts(336_614, 0).saturating_mul(x.into())) + // Standard Error: 2_312 + .saturating_add(Weight::from_parts(323_872, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 5).saturating_mul(x.into())) @@ -147,10 +148,10 @@ impl pallet_asset_manager::WeightInfo for WeightInfo // Measured: `486 + x * (10 ±0)` // Estimated: `3949 + x * (10 ±0)` // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(20_650_636, 0) + Weight::from_parts(18_830_428, 0) .saturating_add(Weight::from_parts(0, 3949)) - // Standard Error: 5_638 - .saturating_add(Weight::from_parts(331_744, 0).saturating_mul(x.into())) + // Standard Error: 3_006 + .saturating_add(Weight::from_parts(329_557, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(x.into())) diff --git a/runtime/darwinia/src/weights/pallet_assets.rs b/runtime/darwinia/src/weights/pallet_assets.rs index 1e2943cb0..077c652db 100644 --- a/runtime/darwinia/src/weights/pallet_assets.rs +++ b/runtime/darwinia/src/weights/pallet_assets.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -61,7 +62,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `157` // Estimated: `3631` - // Minimum execution time: 10_000_000 picoseconds. + // Minimum execution time: 9_000_000 picoseconds. Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(1)) @@ -100,13 +101,13 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `577 + c * (183 ±0)` + // Measured: `543 + c * (183 ±0)` // Estimated: `3631 + c * (2591 ±0)` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 19_912 - .saturating_add(Weight::from_parts(11_438_394, 0).saturating_mul(c.into())) + // Standard Error: 12_460 + .saturating_add(Weight::from_parts(10_929_710, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -123,10 +124,10 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `458 + a * (74 ±0)` // Estimated: `3631 + a * (2603 ±0)` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + Weight::from_parts(39_637_390, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 9_699 - .saturating_add(Weight::from_parts(4_253_783, 0).saturating_mul(a.into())) + // Standard Error: 22_886 + .saturating_add(Weight::from_parts(4_059_990, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -156,7 +157,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `350` // Estimated: `3631` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + Weight::from_parts(22_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -169,8 +170,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `410` // Estimated: `3631` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(32_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -185,8 +186,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `501` // Estimated: `6168` - // Minimum execution time: 36_000_000 picoseconds. - Weight::from_parts(42_000_000, 0) + // Minimum execution time: 37_000_000 picoseconds. + Weight::from_parts(39_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -201,8 +202,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `501` // Estimated: `6168` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 34_000_000 picoseconds. + Weight::from_parts(35_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -217,8 +218,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `501` // Estimated: `6168` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(45_000_000, 0) + // Minimum execution time: 36_000_000 picoseconds. + Weight::from_parts(38_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -231,8 +232,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `410` // Estimated: `3631` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -245,8 +246,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `410` // Estimated: `3631` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -258,7 +259,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `307` // Estimated: `3631` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -296,7 +297,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `307` // Estimated: `3631` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -312,12 +313,12 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `350` // Estimated: `3631` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_129_697, 0) + Weight::from_parts(13_194_851, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 2_810 - .saturating_add(Weight::from_parts(15_482, 0).saturating_mul(n.into())) - // Standard Error: 2_810 - .saturating_add(Weight::from_parts(23_441, 0).saturating_mul(s.into())) + // Standard Error: 1_044 + .saturating_add(Weight::from_parts(38, 0).saturating_mul(n.into())) + // Standard Error: 1_044 + .saturating_add(Weight::from_parts(716, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -330,7 +331,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `478` // Estimated: `3631` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -346,12 +347,12 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `237` // Estimated: `3631` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(10_891_526, 0) + Weight::from_parts(11_589_578, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 2_723 - .saturating_add(Weight::from_parts(24_590, 0).saturating_mul(n.into())) - // Standard Error: 2_723 - .saturating_add(Weight::from_parts(14_605, 0).saturating_mul(s.into())) + // Standard Error: 1_021 + .saturating_add(Weight::from_parts(3_615, 0).saturating_mul(n.into())) + // Standard Error: 1_021 + .saturating_add(Weight::from_parts(1_307, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -363,8 +364,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `478` // Estimated: `3631` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -390,7 +391,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `307` // Estimated: `3631` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -405,10 +406,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `599` + // Measured: `600` // Estimated: `6168` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(47_000_000, 0) + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -422,7 +423,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `457` // Estimated: `3631` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -436,7 +437,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `457` // Estimated: `3631` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + Weight::from_parts(19_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -463,7 +464,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `478` // Estimated: `3631` - // Minimum execution time: 29_000_000 picoseconds. + // Minimum execution time: 30_000_000 picoseconds. Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(3)) @@ -477,8 +478,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `3631` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(28_000_000, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(29_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -493,8 +494,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `556` // Estimated: `3631` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(28_000_000, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -507,8 +508,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `448` // Estimated: `3631` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(28_000_000, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/darwinia/src/weights/pallet_balances.rs b/runtime/darwinia/src/weights/pallet_balances.rs index 9c332b819..8324d30da 100644 --- a/runtime/darwinia/src/weights/pallet_balances.rs +++ b/runtime/darwinia/src/weights/pallet_balances.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -62,7 +63,7 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `39` // Estimated: `3581` // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(53_000_000, 0) + Weight::from_parts(47_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -73,8 +74,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `39` // Estimated: `3581` - // Minimum execution time: 40_000_000 picoseconds. - Weight::from_parts(43_000_000, 0) + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(39_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -85,8 +86,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `195` // Estimated: `3581` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -109,8 +110,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `234` // Estimated: `6172` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(47_000_000, 0) + // Minimum execution time: 48_000_000 picoseconds. + Weight::from_parts(49_000_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -121,8 +122,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `39` // Estimated: `3581` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(48_000_000, 0) + // Minimum execution time: 48_000_000 picoseconds. + Weight::from_parts(49_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -144,13 +145,13 @@ impl pallet_balances::WeightInfo for WeightInfo { /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(u: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `190 + u * (124 ±0)` + // Measured: `150 + u * (124 ±0)` // Estimated: `990 + u * (2591 ±0)` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 21_312 - .saturating_add(Weight::from_parts(13_977_832, 0).saturating_mul(u.into())) + // Standard Error: 19_025 + .saturating_add(Weight::from_parts(13_309_259, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2591).saturating_mul(u.into())) diff --git a/runtime/darwinia/src/weights/pallet_collective.rs b/runtime/darwinia/src/weights/pallet_collective.rs index a2bba17a5..bcbc851a6 100644 --- a/runtime/darwinia/src/weights/pallet_collective.rs +++ b/runtime/darwinia/src/weights/pallet_collective.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -70,13 +71,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + m * (2021 ±0) + p * (2026 ±0)` // Estimated: `12200 + m * (1231 ±14) + p * (3660 ±14)` - // Minimum execution time: 10_000_000 picoseconds. + // Minimum execution time: 11_000_000 picoseconds. Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 12200)) - // Standard Error: 50_693 - .saturating_add(Weight::from_parts(2_697_813, 0).saturating_mul(m.into())) - // Standard Error: 50_693 - .saturating_add(Weight::from_parts(5_731_591, 0).saturating_mul(p.into())) + // Standard Error: 63_745 + .saturating_add(Weight::from_parts(2_666_766, 0).saturating_mul(m.into())) + // Standard Error: 63_745 + .saturating_add(Weight::from_parts(5_183_869, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -93,12 +94,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `69 + m * (20 ±0)` // Estimated: `1554 + m * (20 ±0)` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_240_775, 0) + Weight::from_parts(11_569_530, 0) .saturating_add(Weight::from_parts(0, 1554)) - // Standard Error: 142 - .saturating_add(Weight::from_parts(854, 0).saturating_mul(b.into())) - // Standard Error: 1_472 - .saturating_add(Weight::from_parts(3_463, 0).saturating_mul(m.into())) + // Standard Error: 36 + .saturating_add(Weight::from_parts(1_237, 0).saturating_mul(b.into())) + // Standard Error: 379 + .saturating_add(Weight::from_parts(1_436, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) } @@ -113,12 +114,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `69 + m * (20 ±0)` // Estimated: `3534 + m * (20 ±0)` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_648_786, 0) + Weight::from_parts(12_993_859, 0) .saturating_add(Weight::from_parts(0, 3534)) - // Standard Error: 181 - .saturating_add(Weight::from_parts(678, 0).saturating_mul(b.into())) - // Standard Error: 1_869 - .saturating_add(Weight::from_parts(2_211, 0).saturating_mul(m.into())) + // Standard Error: 47 + .saturating_add(Weight::from_parts(1_173, 0).saturating_mul(b.into())) + // Standard Error: 486 + .saturating_add(Weight::from_parts(7_926, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) } @@ -135,19 +136,17 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 100]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + fn propose_proposed(_b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `357 + m * (20 ±0) + p * (36 ±0)` // Estimated: `3751 + m * (21 ±0) + p * (36 ±0)` // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(19_890_728, 0) + Weight::from_parts(20_878_785, 0) .saturating_add(Weight::from_parts(0, 3751)) - // Standard Error: 319 - .saturating_add(Weight::from_parts(1_542, 0).saturating_mul(b.into())) - // Standard Error: 3_329 - .saturating_add(Weight::from_parts(5_709, 0).saturating_mul(m.into())) - // Standard Error: 3_287 - .saturating_add(Weight::from_parts(144_012, 0).saturating_mul(p.into())) + // Standard Error: 1_233 + .saturating_add(Weight::from_parts(8_042, 0).saturating_mul(m.into())) + // Standard Error: 1_217 + .saturating_add(Weight::from_parts(122_710, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 21).saturating_mul(m.into())) @@ -163,10 +162,10 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `832 + m * (40 ±0)` // Estimated: `4296 + m * (40 ±0)` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(18_419_291, 0) + Weight::from_parts(15_663_114, 0) .saturating_add(Weight::from_parts(0, 4296)) - // Standard Error: 3_323 - .saturating_add(Weight::from_parts(11_124, 0).saturating_mul(m.into())) + // Standard Error: 937 + .saturating_add(Weight::from_parts(9_090, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) @@ -186,12 +185,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `409 + m * (40 ±0) + p * (36 ±0)` // Estimated: `3854 + m * (41 ±0) + p * (36 ±0)` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(21_904_391, 0) + Weight::from_parts(19_733_115, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 3_844 - .saturating_add(Weight::from_parts(3_705, 0).saturating_mul(m.into())) - // Standard Error: 3_748 - .saturating_add(Weight::from_parts(138_780, 0).saturating_mul(p.into())) + // Standard Error: 826 + .saturating_add(Weight::from_parts(2_791, 0).saturating_mul(m.into())) + // Standard Error: 806 + .saturating_add(Weight::from_parts(122_389, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 41).saturating_mul(m.into())) @@ -212,13 +211,15 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `711 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` // Estimated: `4028 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(31_689_539, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(27_874_122, 0) .saturating_add(Weight::from_parts(0, 4028)) - // Standard Error: 466 - .saturating_add(Weight::from_parts(349, 0).saturating_mul(b.into())) - // Standard Error: 4_809 - .saturating_add(Weight::from_parts(168_485, 0).saturating_mul(p.into())) + // Standard Error: 134 + .saturating_add(Weight::from_parts(1_095, 0).saturating_mul(b.into())) + // Standard Error: 1_420 + .saturating_add(Weight::from_parts(6_041, 0).saturating_mul(m.into())) + // Standard Error: 1_384 + .saturating_add(Weight::from_parts(136_940, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) @@ -242,12 +243,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `429 + m * (40 ±0) + p * (36 ±0)` // Estimated: `3874 + m * (41 ±0) + p * (36 ±0)` // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(22_644_454, 0) + Weight::from_parts(21_845_753, 0) .saturating_add(Weight::from_parts(0, 3874)) - // Standard Error: 3_882 - .saturating_add(Weight::from_parts(16_481, 0).saturating_mul(m.into())) - // Standard Error: 3_785 - .saturating_add(Weight::from_parts(142_766, 0).saturating_mul(p.into())) + // Standard Error: 925 + .saturating_add(Weight::from_parts(3_034, 0).saturating_mul(m.into())) + // Standard Error: 902 + .saturating_add(Weight::from_parts(118_242, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 41).saturating_mul(m.into())) @@ -270,13 +271,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `731 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` // Estimated: `4048 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(34_238_646, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(30_263_927, 0) .saturating_add(Weight::from_parts(0, 4048)) - // Standard Error: 479 - .saturating_add(Weight::from_parts(516, 0).saturating_mul(b.into())) - // Standard Error: 4_942 - .saturating_add(Weight::from_parts(177_711, 0).saturating_mul(p.into())) + // Standard Error: 149 + .saturating_add(Weight::from_parts(953, 0).saturating_mul(b.into())) + // Standard Error: 1_539 + .saturating_add(Weight::from_parts(146_062, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) @@ -295,10 +296,10 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `226 + p * (32 ±0)` // Estimated: `1711 + p * (32 ±0)` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_804_007, 0) + Weight::from_parts(11_788_664, 0) .saturating_add(Weight::from_parts(0, 1711)) - // Standard Error: 2_831 - .saturating_add(Weight::from_parts(128_548, 0).saturating_mul(p.into())) + // Standard Error: 832 + .saturating_add(Weight::from_parts(113_821, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/runtime/darwinia/src/weights/pallet_conviction_voting.rs b/runtime/darwinia/src/weights/pallet_conviction_voting.rs index 3fc1ec2c1..65064fe75 100644 --- a/runtime/darwinia/src/weights/pallet_conviction_voting.rs +++ b/runtime/darwinia/src/weights/pallet_conviction_voting.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_conviction_voting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -71,8 +72,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13458` // Estimated: `42428` - // Minimum execution time: 90_000_000 picoseconds. - Weight::from_parts(100_000_000, 0) + // Minimum execution time: 87_000_000 picoseconds. + Weight::from_parts(90_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -94,7 +95,7 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Measured: `14179` // Estimated: `83866` // Minimum execution time: 124_000_000 picoseconds. - Weight::from_parts(149_000_000, 0) + Weight::from_parts(127_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -110,7 +111,7 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Measured: `13928` // Estimated: `83866` // Minimum execution time: 96_000_000 picoseconds. - Weight::from_parts(111_000_000, 0) + Weight::from_parts(101_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -123,8 +124,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13052` // Estimated: `30694` - // Minimum execution time: 49_000_000 picoseconds. - Weight::from_parts(57_000_000, 0) + // Minimum execution time: 48_000_000 picoseconds. + Weight::from_parts(50_000_000, 0) .saturating_add(Weight::from_parts(0, 30694)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -146,11 +147,11 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `7020 + r * (447 ±0)` // Estimated: `83866 + r * (3387 ±0)` - // Minimum execution time: 48_000_000 picoseconds. - Weight::from_parts(107_491_225, 0) + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(169_715_477, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 345_022 - .saturating_add(Weight::from_parts(37_023_763, 0).saturating_mul(r.into())) + // Standard Error: 344_025 + .saturating_add(Weight::from_parts(33_257_361, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -168,11 +169,11 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `6876 + r * (447 ±0)` // Estimated: `83866 + r * (3387 ±0)` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(49_135_530, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(80_046_584, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 355_033 - .saturating_add(Weight::from_parts(37_751_665, 0).saturating_mul(r.into())) + // Standard Error: 360_070 + .saturating_add(Weight::from_parts(34_073_453, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -192,7 +193,7 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Measured: `12038` // Estimated: `30694` // Minimum execution time: 74_000_000 picoseconds. - Weight::from_parts(90_000_000, 0) + Weight::from_parts(81_000_000, 0) .saturating_add(Weight::from_parts(0, 30694)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/darwinia/src/weights/pallet_message_queue.rs b/runtime/darwinia/src/weights/pallet_message_queue.rs index f6a0c3bef..09b5a6cff 100644 --- a/runtime/darwinia/src/weights/pallet_message_queue.rs +++ b/runtime/darwinia/src/weights/pallet_message_queue.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -113,7 +114,7 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 4_000_000 picoseconds. + // Minimum execution time: 5_000_000 picoseconds. Weight::from_parts(5_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) @@ -127,8 +128,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 83_000_000 picoseconds. - Weight::from_parts(91_000_000, 0) + // Minimum execution time: 81_000_000 picoseconds. + Weight::from_parts(82_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,7 +142,7 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `171` // Estimated: `3517` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + Weight::from_parts(7_000_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -154,7 +155,7 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 34_000_000 picoseconds. + // Minimum execution time: 33_000_000 picoseconds. Weight::from_parts(36_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) @@ -182,8 +183,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 52_000_000 picoseconds. - Weight::from_parts(63_000_000, 0) + // Minimum execution time: 50_000_000 picoseconds. + Weight::from_parts(53_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/darwinia/src/weights/pallet_preimage.rs b/runtime/darwinia/src/weights/pallet_preimage.rs index 97f95ceeb..1321a8bc3 100644 --- a/runtime/darwinia/src/weights/pallet_preimage.rs +++ b/runtime/darwinia/src/weights/pallet_preimage.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -68,11 +69,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3544` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(46_000_000, 0) + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(47_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) // Standard Error: 2 - .saturating_add(Weight::from_parts(1_165, 0).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(1_049, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -88,10 +89,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `3544` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(1_164, 0).saturating_mul(s.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_062, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -106,11 +107,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3544` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(1_124, 0).saturating_mul(s.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_066, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -126,7 +127,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `219` // Estimated: `3544` - // Minimum execution time: 46_000_000 picoseconds. + // Minimum execution time: 50_000_000 picoseconds. Weight::from_parts(53_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(3)) @@ -142,8 +143,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3544` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(27_000_000, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(23_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -157,7 +158,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `176` // Estimated: `3544` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(22_000_000, 0) + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -171,7 +172,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `144` // Estimated: `3544` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -185,7 +186,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `3544` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -198,8 +199,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3544` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -214,8 +215,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3544` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(23_000_000, 0) + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -229,7 +230,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `3544` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -243,7 +244,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `3544` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -259,13 +260,13 @@ impl pallet_preimage::WeightInfo for WeightInfo { /// The range of component `n` is `[1, 1024]`. fn ensure_updated(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `270 + n * (203 ±0)` + // Measured: `240 + n * (203 ±0)` // Estimated: `990 + n * (2591 ±0)` - // Minimum execution time: 54_000_000 picoseconds. - Weight::from_parts(55_000_000, 0) + // Minimum execution time: 55_000_000 picoseconds. + Weight::from_parts(56_000_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 51_485 - .saturating_add(Weight::from_parts(57_512_634, 0).saturating_mul(n.into())) + // Standard Error: 48_531 + .saturating_add(Weight::from_parts(53_177_511, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2591).saturating_mul(n.into())) diff --git a/runtime/darwinia/src/weights/pallet_proxy.rs b/runtime/darwinia/src/weights/pallet_proxy.rs index f384a61bb..67637fc36 100644 --- a/runtime/darwinia/src/weights/pallet_proxy.rs +++ b/runtime/darwinia/src/weights/pallet_proxy.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -63,10 +64,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `149 + p * (25 ±0)` // Estimated: `4310` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_108_108, 0) + Weight::from_parts(11_199_676, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 5_981 - .saturating_add(Weight::from_parts(7_080, 0).saturating_mul(p.into())) + // Standard Error: 2_154 + .saturating_add(Weight::from_parts(26_824, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -77,15 +78,17 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn proxy_announced(a: u32, _p: u32, ) -> Weight { + fn proxy_announced(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `401 + a * (56 ±0) + p * (25 ±0)` // Estimated: `5302` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(33_686_226, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(28_484_875, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 11_152 - .saturating_add(Weight::from_parts(104_511, 0).saturating_mul(a.into())) + // Standard Error: 2_632 + .saturating_add(Weight::from_parts(104_640, 0).saturating_mul(a.into())) + // Standard Error: 2_720 + .saturating_add(Weight::from_parts(29_378, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -95,15 +98,17 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, _p: u32, ) -> Weight { + fn remove_announcement(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `329 + a * (56 ±0)` // Estimated: `5302` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(22_564_195, 0) + Weight::from_parts(19_684_431, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 8_176 - .saturating_add(Weight::from_parts(135_367, 0).saturating_mul(a.into())) + // Standard Error: 2_115 + .saturating_add(Weight::from_parts(115_932, 0).saturating_mul(a.into())) + // Standard Error: 2_186 + .saturating_add(Weight::from_parts(8_897, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -117,13 +122,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `329 + a * (56 ±0)` // Estimated: `5302` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_930_472, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_076_423, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 7_828 - .saturating_add(Weight::from_parts(111_972, 0).saturating_mul(a.into())) - // Standard Error: 8_088 - .saturating_add(Weight::from_parts(45_616, 0).saturating_mul(p.into())) + // Standard Error: 1_825 + .saturating_add(Weight::from_parts(101_666, 0).saturating_mul(a.into())) + // Standard Error: 1_886 + .saturating_add(Weight::from_parts(440, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -140,12 +145,12 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `345 + a * (56 ±0) + p * (25 ±0)` // Estimated: `5302` // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(29_590_481, 0) + Weight::from_parts(25_526_960, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 8_950 - .saturating_add(Weight::from_parts(129_564, 0).saturating_mul(a.into())) - // Standard Error: 9_247 - .saturating_add(Weight::from_parts(7_791, 0).saturating_mul(p.into())) + // Standard Error: 2_076 + .saturating_add(Weight::from_parts(133_697, 0).saturating_mul(a.into())) + // Standard Error: 2_145 + .saturating_add(Weight::from_parts(17_397, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -157,10 +162,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `149 + p * (25 ±0)` // Estimated: `4310` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(22_575_376, 0) + Weight::from_parts(20_804_075, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 7_376 - .saturating_add(Weight::from_parts(34_705, 0).saturating_mul(p.into())) + // Standard Error: 1_629 + .saturating_add(Weight::from_parts(18_809, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -172,10 +177,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `149 + p * (25 ±0)` // Estimated: `4310` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(22_895_966, 0) + Weight::from_parts(21_019_111, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 7_963 - .saturating_add(Weight::from_parts(11_728, 0).saturating_mul(p.into())) + // Standard Error: 2_000 + .saturating_add(Weight::from_parts(4_180, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -186,24 +191,26 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `149 + p * (25 ±0)` // Estimated: `4310` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_817_261, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_033_644, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 7_639 - .saturating_add(Weight::from_parts(17_057, 0).saturating_mul(p.into())) + // Standard Error: 2_249 + .saturating_add(Weight::from_parts(23_089, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn create_pure(_p: u32, ) -> Weight { + fn create_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `161` // Estimated: `4310` // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(24_370_900, 0) + Weight::from_parts(21_931_978, 0) .saturating_add(Weight::from_parts(0, 4310)) + // Standard Error: 732 + .saturating_add(Weight::from_parts(2_965, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -214,11 +221,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174 + p * (25 ±0)` // Estimated: `4310` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(22_602_233, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_311_267, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 10_018 - .saturating_add(Weight::from_parts(38_000, 0).saturating_mul(p.into())) + // Standard Error: 1_905 + .saturating_add(Weight::from_parts(29_113, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/darwinia/src/weights/pallet_referenda.rs b/runtime/darwinia/src/weights/pallet_referenda.rs index a3f428328..85ae26e00 100644 --- a/runtime/darwinia/src/weights/pallet_referenda.rs +++ b/runtime/darwinia/src/weights/pallet_referenda.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -65,8 +66,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `275` // Estimated: `42428` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(38_000_000, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -95,10 +96,10 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn place_decision_deposit_queued() -> Weight { // Proof Size summary in bytes: - // Measured: `3314` + // Measured: `3309` // Estimated: `42428` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(55_000_000, 0) + // Minimum execution time: 40_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -113,10 +114,10 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn place_decision_deposit_not_queued() -> Weight { // Proof Size summary in bytes: - // Measured: `3334` + // Measured: `3329` // Estimated: `42428` - // Minimum execution time: 44_000_000 picoseconds. - Weight::from_parts(54_000_000, 0) + // Minimum execution time: 40_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -131,8 +132,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `516` // Estimated: `83866` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(52_000_000, 0) + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(45_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -147,8 +148,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `516` // Estimated: `83866` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(52_000_000, 0) + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(44_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -171,8 +172,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `384` // Estimated: `4377` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(27_000_000, 0) + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -186,7 +187,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `390` // Estimated: `83866` // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + Weight::from_parts(25_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -204,7 +205,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `880` // Estimated: `83866` // Minimum execution time: 82_000_000 picoseconds. - Weight::from_parts(96_000_000, 0) + Weight::from_parts(83_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -217,8 +218,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `207` // Estimated: `5477` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -231,10 +232,10 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn one_fewer_deciding_failing() -> Weight { // Proof Size summary in bytes: - // Measured: `3179` + // Measured: `3195` // Estimated: `42428` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(37_000_000, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -247,10 +248,10 @@ impl pallet_referenda::WeightInfo for WeightInfo { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) fn one_fewer_deciding_passing() -> Weight { // Proof Size summary in bytes: - // Measured: `3165` + // Measured: `3209` // Estimated: `42428` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -263,8 +264,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3020` // Estimated: `5477` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -277,8 +278,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3020` // Estimated: `5477` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -293,8 +294,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3024` // Estimated: `5477` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -309,8 +310,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3044` // Estimated: `5477` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -324,7 +325,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `354` // Estimated: `42428` // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -350,7 +351,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `299` // Estimated: `4377` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -381,7 +382,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `390` // Estimated: `42428` - // Minimum execution time: 23_000_000 picoseconds. + // Minimum execution time: 24_000_000 picoseconds. Weight::from_parts(24_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) @@ -395,8 +396,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `443` // Estimated: `42428` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(25_000_000, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -410,7 +411,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `426` // Estimated: `42428` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -424,7 +425,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `443` // Estimated: `42428` // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -453,8 +454,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `447` // Estimated: `83866` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -485,8 +486,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `443` // Estimated: `4377` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -499,8 +500,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `376` // Estimated: `4377` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/darwinia/src/weights/pallet_scheduler.rs b/runtime/darwinia/src/weights/pallet_scheduler.rs index 5258d51fa..58e86d34d 100644 --- a/runtime/darwinia/src/weights/pallet_scheduler.rs +++ b/runtime/darwinia/src/weights/pallet_scheduler.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -75,10 +76,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `78 + s * (177 ±0)` // Estimated: `42428` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(5_871_990, 0) + Weight::from_parts(5_440_030, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_474 - .saturating_add(Weight::from_parts(391_272, 0).saturating_mul(s.into())) + // Standard Error: 1_561 + .saturating_add(Weight::from_parts(360_194, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -102,10 +103,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `179 + s * (1 ±0)` // Estimated: `3644 + s * (1 ±0)` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3644)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(515, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(429, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) @@ -116,8 +117,8 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -142,7 +143,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Scheduler::Agenda` (r:1 w:1) @@ -152,11 +153,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(11_255_764, 0) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(10_550_117, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 5_709 - .saturating_add(Weight::from_parts(409_315, 0).saturating_mul(s.into())) + // Standard Error: 1_437 + .saturating_add(Weight::from_parts(351_342, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -169,11 +170,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(12_321_142, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(11_286_530, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 6_710 - .saturating_add(Weight::from_parts(633_210, 0).saturating_mul(s.into())) + // Standard Error: 1_232 + .saturating_add(Weight::from_parts(567_587, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -186,11 +187,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `255 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(16_528_470, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(14_020_000, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 12_470 - .saturating_add(Weight::from_parts(416_144, 0).saturating_mul(s.into())) + // Standard Error: 2_037 + .saturating_add(Weight::from_parts(361_469, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -203,11 +204,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `281 + s * (185 ±0)` // Estimated: `42428` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_350_612, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_208_489, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 6_616 - .saturating_add(Weight::from_parts(618_093, 0).saturating_mul(s.into())) + // Standard Error: 2_098 + .saturating_add(Weight::from_parts(592_686, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/darwinia/src/weights/pallet_session.rs b/runtime/darwinia/src/weights/pallet_session.rs index cc8cfb9df..ae3f2f698 100644 --- a/runtime/darwinia/src/weights/pallet_session.rs +++ b/runtime/darwinia/src/weights/pallet_session.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -78,7 +79,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `228` // Estimated: `3693` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/darwinia/src/weights/pallet_timestamp.rs b/runtime/darwinia/src/weights/pallet_timestamp.rs index 862242cad..bde24dc13 100644 --- a/runtime/darwinia/src/weights/pallet_timestamp.rs +++ b/runtime/darwinia/src/weights/pallet_timestamp.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -61,8 +62,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `6` // Estimated: `1493` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/darwinia/src/weights/pallet_treasury.rs b/runtime/darwinia/src/weights/pallet_treasury.rs index 0b38fdc7b..4df45f98c 100644 --- a/runtime/darwinia/src/weights/pallet_treasury.rs +++ b/runtime/darwinia/src/weights/pallet_treasury.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -66,7 +67,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Measured: `109` // Estimated: `1887` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -79,8 +80,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `275` // Estimated: `1489` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(25_000_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_000_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -93,7 +94,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `571` // Estimated: `6172` - // Minimum execution time: 37_000_000 picoseconds. + // Minimum execution time: 36_000_000 picoseconds. Weight::from_parts(38_000_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(3)) @@ -108,11 +109,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `537 + p * (8 ±0)` // Estimated: `3549` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(10_364_812, 0) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_522_616, 0) .saturating_add(Weight::from_parts(0, 3549)) - // Standard Error: 2_150 - .saturating_add(Weight::from_parts(24_626, 0).saturating_mul(p.into())) + // Standard Error: 649 + .saturating_add(Weight::from_parts(14_512, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -123,7 +124,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Measured: `194` // Estimated: `1887` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + Weight::from_parts(5_000_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -143,11 +144,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `328 + p * (97 ±0)` // Estimated: `3581 + p * (2559 ±0)` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(30_538_237, 0) + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(101_923_655, 0) .saturating_add(Weight::from_parts(0, 3581)) - // Standard Error: 72_753 - .saturating_add(Weight::from_parts(2_692_855, 0).saturating_mul(p.into())) + // Standard Error: 160_060 + .saturating_add(Weight::from_parts(2_362_471, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -161,8 +162,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1489` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -175,7 +176,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `416` // Estimated: `6172` - // Minimum execution time: 49_000_000 picoseconds. + // Minimum execution time: 48_000_000 picoseconds. Weight::from_parts(51_000_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(3)) @@ -187,8 +188,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3522` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3522)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -199,8 +200,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3522` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3522)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/darwinia/src/weights/pallet_utility.rs b/runtime/darwinia/src/weights/pallet_utility.rs index 881e6aaa0..02175ebbd 100644 --- a/runtime/darwinia/src/weights/pallet_utility.rs +++ b/runtime/darwinia/src/weights/pallet_utility.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -61,10 +62,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(13_536_226, 0) + Weight::from_parts(43_762_053, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 15_122 - .saturating_add(Weight::from_parts(3_778_643, 0).saturating_mul(c.into())) + // Standard Error: 7_629 + .saturating_add(Weight::from_parts(3_474_455, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: @@ -80,17 +81,17 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(1_695_457, 0) + Weight::from_parts(10_492_983, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 18_788 - .saturating_add(Weight::from_parts(4_094_435, 0).saturating_mul(c.into())) + // Standard Error: 2_684 + .saturating_add(Weight::from_parts(3_709_294, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -99,9 +100,9 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(4_366_648, 0) + Weight::from_parts(8_226_985, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 17_973 - .saturating_add(Weight::from_parts(3_855_063, 0).saturating_mul(c.into())) + // Standard Error: 2_289 + .saturating_add(Weight::from_parts(3_470_797, 0).saturating_mul(c.into())) } } diff --git a/runtime/darwinia/src/weights/pallet_whitelist.rs b/runtime/darwinia/src/weights/pallet_whitelist.rs index 6b70d94c2..3ab5e4ce4 100644 --- a/runtime/darwinia/src/weights/pallet_whitelist.rs +++ b/runtime/darwinia/src/weights/pallet_whitelist.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_whitelist` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: @@ -66,7 +67,7 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Measured: `48` // Estimated: `3544` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -82,7 +83,7 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Measured: `176` // Estimated: `3544` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -100,11 +101,11 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `252 + n * (1 ±0)` // Estimated: `3716 + n * (1 ±0)` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(24_000_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(23_000_000, 0) .saturating_add(Weight::from_parts(0, 3716)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(550, 0).saturating_mul(n.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(516, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -120,11 +121,11 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `176` // Estimated: `3544` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(20_290_598, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_064_344, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 39 - .saturating_add(Weight::from_parts(1_090, 0).saturating_mul(n.into())) + // Standard Error: 13 + .saturating_add(Weight::from_parts(939, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/koi/src/weights/cumulus_pallet_parachain_system.rs b/runtime/koi/src/weights/cumulus_pallet_parachain_system.rs index 00d8cb921..a9c574df3 100644 --- a/runtime/koi/src/weights/cumulus_pallet_parachain_system.rs +++ b/runtime/koi/src/weights/cumulus_pallet_parachain_system.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `cumulus_pallet_parachain_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -71,10 +72,10 @@ impl cumulus_pallet_parachain_system::WeightInfo for We // Measured: `82` // Estimated: `3517` // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + Weight::from_parts(3_036_346_176, 0) .saturating_add(Weight::from_parts(0, 3517)) - // Standard Error: 58_621 - .saturating_add(Weight::from_parts(104_049_044, 0).saturating_mul(n.into())) + // Standard Error: 1_129_862 + .saturating_add(Weight::from_parts(98_535_273, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/runtime/koi/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/koi/src/weights/cumulus_pallet_xcmp_queue.rs index c11528041..575dc9a77 100644 --- a/runtime/koi/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/koi/src/weights/cumulus_pallet_xcmp_queue.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -82,7 +83,7 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Measured: `48` // Estimated: `3517` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -93,7 +94,7 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `42` // Estimated: `1527` - // Minimum execution time: 3_000_000 picoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1527)) .saturating_add(T::DbWeight::get().reads(1)) @@ -137,8 +138,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65677` // Estimated: `69142` - // Minimum execution time: 50_000_000 picoseconds. - Weight::from_parts(58_000_000, 0) + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(46_000_000, 0) .saturating_add(Weight::from_parts(0, 69142)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -151,8 +152,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65676` // Estimated: `69141` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(36_000_000, 0) .saturating_add(Weight::from_parts(0, 69141)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/koi/src/weights/darwinia_deposit.rs b/runtime/koi/src/weights/darwinia_deposit.rs index 9c663a2a9..0624d27ef 100644 --- a/runtime/koi/src/weights/darwinia_deposit.rs +++ b/runtime/koi/src/weights/darwinia_deposit.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `darwinia_deposit` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -75,11 +76,11 @@ impl darwinia_deposit::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `27516` // Estimated: `33456` - // Minimum execution time: 4_057_000 nanoseconds. - Weight::from_parts(4_577_000_000, 0) - .saturating_add(Weight::from_parts(33456, 0)) - .saturating_add(T::DbWeight::get().reads(11_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Minimum execution time: 221_000_000 picoseconds. + Weight::from_parts(227_000_000, 0) + .saturating_add(Weight::from_parts(0, 33456)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Deposit::DepositContract` (r:0 w:1) /// Proof: `Deposit::DepositContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -87,9 +88,9 @@ impl darwinia_deposit::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/koi/src/weights/darwinia_staking.rs b/runtime/koi/src/weights/darwinia_staking.rs index 15e2fae46..7f567fbaf 100644 --- a/runtime/koi/src/weights/darwinia_staking.rs +++ b/runtime/koi/src/weights/darwinia_staking.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `darwinia_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -59,40 +60,29 @@ impl darwinia_staking::WeightInfo for WeightInfo { /// Proof: `DarwiniaStaking::Ledgers` (`max_values`: None, `max_size`: Some(1078), added: 3553, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Deposit::Deposits` (r:1 w:1) - /// Proof: `Deposit::Deposits` (`max_values`: None, `max_size`: Some(26150), added: 28625, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimitState` (r:1 w:1) - /// Proof: `DarwiniaStaking::RateLimitState` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::RateLimit` (r:1 w:0) - /// Proof: `DarwiniaStaking::RateLimit` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// The range of component `x` is `[0, 1023]`. fn unstake_all_for() -> Weight { // Proof Size summary in bytes: - // Measured: `2330` - // Estimated: `83902` - // Minimum execution time: 535_000 nanoseconds. - Weight::from_parts(629_000_000, 0) - .saturating_add(Weight::from_parts(83902, 0)) - .saturating_add(T::DbWeight::get().reads(35_u64)) - .saturating_add(T::DbWeight::get().writes(34_u64)) + // Measured: `406` + // Estimated: `4543` + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(54_000_000, 0) + .saturating_add(Weight::from_parts(0, 4543)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `DarwiniaStaking::ExposureCacheStates` (r:1 w:0) - /// Proof: `DarwiniaStaking::ExposureCacheStates` (`max_values`: Some(1), `max_size`: Some(3), added: 498, mode: `MaxEncodedLen`) - /// Storage: `DarwiniaStaking::ExposureCache2` (r:1 w:1) - /// Proof: `DarwiniaStaking::ExposureCache2` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `DarwiniaStaking::PendingRewards` (r:1 w:1) /// Proof: `DarwiniaStaking::PendingRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:32 w:32) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) + /// Storage: `DarwiniaStaking::RingStakingContract` (r:1 w:0) + /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) fn allocate_ring_staking_reward_of() -> Weight { // Proof Size summary in bytes: - // Measured: `2330` - // Estimated: `83902` - // Minimum execution time: 535_000 nanoseconds. - Weight::from_parts(629_000_000, 0) - .saturating_add(Weight::from_parts(83902, 0)) - .saturating_add(T::DbWeight::get().reads(35_u64)) - .saturating_add(T::DbWeight::get().writes(34_u64)) + // Measured: `271` + // Estimated: `3736` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3736)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `DarwiniaStaking::RingStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::RingStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -100,10 +90,10 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `DarwiniaStaking::KtonStakingContract` (r:0 w:1) /// Proof: `DarwiniaStaking::KtonStakingContract` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`) @@ -111,10 +101,10 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `DarwiniaStaking::CollatorCount` (r:0 w:1) /// Proof: `DarwiniaStaking::CollatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -122,9 +112,9 @@ impl darwinia_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000 nanoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/koi/src/weights/frame_system.rs b/runtime/koi/src/weights/frame_system.rs index c10888f71..0bc1176e4 100644 --- a/runtime/koi/src/weights/frame_system.rs +++ b/runtime/koi/src/weights/frame_system.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -60,22 +61,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(4_417_236, 0) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_142_176, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(156, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(151, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_000_000 picoseconds. + // Minimum execution time: 4_000_000 picoseconds. Weight::from_parts(5_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(993, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(956, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -107,8 +108,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `198` // Estimated: `1683` - // Minimum execution time: 70_989_000_000 picoseconds. - Weight::from_parts(74_848_000_000, 0) + // Minimum execution time: 67_647_000_000 picoseconds. + Weight::from_parts(72_880_000_000, 0) .saturating_add(Weight::from_parts(0, 1683)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -123,8 +124,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_331 - .saturating_add(Weight::from_parts(804_469, 0).saturating_mul(i.into())) + // Standard Error: 993 + .saturating_add(Weight::from_parts(752_528, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -137,8 +138,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_491 - .saturating_add(Weight::from_parts(567_168, 0).saturating_mul(i.into())) + // Standard Error: 841 + .saturating_add(Weight::from_parts(539_001, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -151,8 +152,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 3_000_000 picoseconds. Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 94)) - // Standard Error: 2_915 - .saturating_add(Weight::from_parts(1_044_881, 0).saturating_mul(p.into())) + // Standard Error: 1_136 + .saturating_add(Weight::from_parts(983_292, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) @@ -163,7 +164,7 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -186,8 +187,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `220` // Estimated: `1705` - // Minimum execution time: 75_450_000_000 picoseconds. - Weight::from_parts(80_770_000_000, 0) + // Minimum execution time: 72_574_000_000 picoseconds. + Weight::from_parts(74_924_000_000, 0) .saturating_add(Weight::from_parts(0, 1705)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/runtime/koi/src/weights/pallet_asset_manager.rs b/runtime/koi/src/weights/pallet_asset_manager.rs index 4041fbc12..0230be028 100644 --- a/runtime/koi/src/weights/pallet_asset_manager.rs +++ b/runtime/koi/src/weights/pallet_asset_manager.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_asset_manager` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -67,7 +68,7 @@ impl pallet_asset_manager::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `276` // Estimated: `3741` - // Minimum execution time: 30_000_000 picoseconds. + // Minimum execution time: 29_000_000 picoseconds. Weight::from_parts(30_000_000, 0) .saturating_add(Weight::from_parts(0, 3741)) .saturating_add(T::DbWeight::get().reads(3)) @@ -85,10 +86,10 @@ impl pallet_asset_manager::WeightInfo for WeightInfo // Measured: `595 + x * (9 ±0)` // Estimated: `3983 + x * (10 ±0)` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(20_209_116, 0) + Weight::from_parts(16_509_436, 0) .saturating_add(Weight::from_parts(0, 3983)) - // Standard Error: 5_727 - .saturating_add(Weight::from_parts(344_576, 0).saturating_mul(x.into())) + // Standard Error: 3_922 + .saturating_add(Weight::from_parts(413_005, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(x.into())) @@ -106,11 +107,11 @@ impl pallet_asset_manager::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `968 + x * (13 ±0)` // Estimated: `4303 + x * (14 ±0)` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(28_993_534, 0) + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(25_965_198, 0) .saturating_add(Weight::from_parts(0, 4303)) - // Standard Error: 6_928 - .saturating_add(Weight::from_parts(386_014, 0).saturating_mul(x.into())) + // Standard Error: 4_398 + .saturating_add(Weight::from_parts(415_009, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(6)) .saturating_add(Weight::from_parts(0, 14).saturating_mul(x.into())) @@ -125,10 +126,10 @@ impl pallet_asset_manager::WeightInfo for WeightInfo // Measured: `196 + x * (5 ±0)` // Estimated: `1678 + x * (5 ±0)` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(11_943_329, 0) + Weight::from_parts(9_940_214, 0) .saturating_add(Weight::from_parts(0, 1678)) - // Standard Error: 4_562 - .saturating_add(Weight::from_parts(325_272, 0).saturating_mul(x.into())) + // Standard Error: 3_042 + .saturating_add(Weight::from_parts(366_547, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 5).saturating_mul(x.into())) @@ -147,10 +148,10 @@ impl pallet_asset_manager::WeightInfo for WeightInfo // Measured: `486 + x * (10 ±0)` // Estimated: `3949 + x * (10 ±0)` // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(20_951_661, 0) + Weight::from_parts(18_249_451, 0) .saturating_add(Weight::from_parts(0, 3949)) - // Standard Error: 5_591 - .saturating_add(Weight::from_parts(333_493, 0).saturating_mul(x.into())) + // Standard Error: 4_688 + .saturating_add(Weight::from_parts(377_326, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(x.into())) diff --git a/runtime/koi/src/weights/pallet_assets.rs b/runtime/koi/src/weights/pallet_assets.rs index 0e27ae2c5..ce534c692 100644 --- a/runtime/koi/src/weights/pallet_assets.rs +++ b/runtime/koi/src/weights/pallet_assets.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -62,7 +63,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `157` // Estimated: `3631` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -73,8 +74,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `157` // Estimated: `3631` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -100,13 +101,13 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `820 + c * (183 ±0)` + // Measured: `787 + c * (183 ±0)` // Estimated: `3631 + c * (2591 ±0)` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(18_889_041, 0) + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 36_945 - .saturating_add(Weight::from_parts(11_531_247, 0).saturating_mul(c.into())) + // Standard Error: 13_236 + .saturating_add(Weight::from_parts(10_982_328, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -123,10 +124,10 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `458 + a * (74 ±0)` // Estimated: `3631 + a * (2603 ±0)` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 10_046 - .saturating_add(Weight::from_parts(4_316_338, 0).saturating_mul(a.into())) + // Standard Error: 6_875 + .saturating_add(Weight::from_parts(4_067_989, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -155,8 +156,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `3631` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -169,7 +170,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `410` // Estimated: `3631` - // Minimum execution time: 25_000_000 picoseconds. + // Minimum execution time: 26_000_000 picoseconds. Weight::from_parts(26_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) @@ -202,7 +203,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `449` // Estimated: `6168` // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(38_000_000, 0) + Weight::from_parts(34_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -217,8 +218,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `449` // Estimated: `6168` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(45_000_000, 0) + // Minimum execution time: 36_000_000 picoseconds. + Weight::from_parts(37_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -245,7 +246,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `410` // Estimated: `3631` - // Minimum execution time: 12_000_000 picoseconds. + // Minimum execution time: 13_000_000 picoseconds. Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) @@ -257,8 +258,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `307` // Estimated: `3631` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -269,8 +270,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `307` // Estimated: `3631` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -283,7 +284,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `3631` - // Minimum execution time: 11_000_000 picoseconds. + // Minimum execution time: 12_000_000 picoseconds. Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) @@ -296,7 +297,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `307` // Estimated: `3631` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -307,15 +308,13 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(144), added: 2619, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(_n: u32, s: u32, ) -> Weight { + fn set_metadata(_n: u32, _s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `350` // Estimated: `3631` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_246_244, 0) + Weight::from_parts(12_881_106, 0) .saturating_add(Weight::from_parts(0, 3631)) - // Standard Error: 3_156 - .saturating_add(Weight::from_parts(4_629, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -327,8 +326,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `478` // Estimated: `3631` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -339,13 +338,15 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(144), added: 2619, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { + fn force_set_metadata(_n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `237` // Estimated: `3631` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_511_667, 0) + Weight::from_parts(11_793_139, 0) .saturating_add(Weight::from_parts(0, 3631)) + // Standard Error: 1_034 + .saturating_add(Weight::from_parts(322, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -357,8 +358,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `478` // Estimated: `3631` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -383,7 +384,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `307` // Estimated: `3631` - // Minimum execution time: 15_000_000 picoseconds. + // Minimum execution time: 14_000_000 picoseconds. Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) @@ -399,10 +400,10 @@ impl pallet_assets::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `599` + // Measured: `600` // Estimated: `6168` - // Minimum execution time: 42_000_000 picoseconds. - Weight::from_parts(44_000_000, 0) + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(45_000_000, 0) .saturating_add(Weight::from_parts(0, 6168)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -416,7 +417,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `457` // Estimated: `3631` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -429,8 +430,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `457` // Estimated: `3631` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -442,7 +443,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `307` // Estimated: `3631` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -457,8 +458,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `512` // Estimated: `3631` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(35_000_000, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -471,8 +472,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `3631` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -487,8 +488,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `590` // Estimated: `3631` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(29_000_000, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -501,8 +502,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `448` // Estimated: `3631` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(32_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -516,7 +517,7 @@ impl pallet_assets::WeightInfo for WeightInfo { // Measured: `410` // Estimated: `3631` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3631)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/koi/src/weights/pallet_balances.rs b/runtime/koi/src/weights/pallet_balances.rs index 12556b5f9..d245aa394 100644 --- a/runtime/koi/src/weights/pallet_balances.rs +++ b/runtime/koi/src/weights/pallet_balances.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -61,8 +62,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `39` // Estimated: `3581` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(53_000_000, 0) + // Minimum execution time: 46_000_000 picoseconds. + Weight::from_parts(47_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -73,8 +74,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `39` // Estimated: `3581` - // Minimum execution time: 37_000_000 picoseconds. - Weight::from_parts(39_000_000, 0) + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(38_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -109,8 +110,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `234` // Estimated: `6172` - // Minimum execution time: 50_000_000 picoseconds. - Weight::from_parts(57_000_000, 0) + // Minimum execution time: 46_000_000 picoseconds. + Weight::from_parts(47_000_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -121,8 +122,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `39` // Estimated: `3581` - // Minimum execution time: 49_000_000 picoseconds. - Weight::from_parts(54_000_000, 0) + // Minimum execution time: 48_000_000 picoseconds. + Weight::from_parts(49_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -133,7 +134,7 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `195` // Estimated: `3581` - // Minimum execution time: 17_000_000 picoseconds. + // Minimum execution time: 18_000_000 picoseconds. Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 3581)) .saturating_add(T::DbWeight::get().reads(1)) @@ -144,13 +145,13 @@ impl pallet_balances::WeightInfo for WeightInfo { /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(u: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `458 + u * (124 ±0)` + // Measured: `417 + u * (124 ±0)` // Estimated: `990 + u * (2591 ±0)` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 22_067 - .saturating_add(Weight::from_parts(14_037_134, 0).saturating_mul(u.into())) + // Standard Error: 16_585 + .saturating_add(Weight::from_parts(13_189_595, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2591).saturating_mul(u.into())) @@ -162,7 +163,7 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `1501` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 1501)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/runtime/koi/src/weights/pallet_collective.rs b/runtime/koi/src/weights/pallet_collective.rs index b7b0c6e18..069d7cc6a 100644 --- a/runtime/koi/src/weights/pallet_collective.rs +++ b/runtime/koi/src/weights/pallet_collective.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -70,13 +71,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + m * (2021 ±0) + p * (2026 ±0)` // Estimated: `12200 + m * (1231 ±15) + p * (3660 ±15)` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 12200)) - // Standard Error: 45_994 - .saturating_add(Weight::from_parts(2_608_930, 0).saturating_mul(m.into())) - // Standard Error: 45_994 - .saturating_add(Weight::from_parts(5_749_452, 0).saturating_mul(p.into())) + // Standard Error: 100_382 + .saturating_add(Weight::from_parts(2_724_994, 0).saturating_mul(m.into())) + // Standard Error: 100_382 + .saturating_add(Weight::from_parts(5_259_215, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -95,10 +96,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `73 + m * (20 ±0)` // Estimated: `3997 + m * (20 ±0)` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_709_724, 0) + Weight::from_parts(14_250_900, 0) .saturating_add(Weight::from_parts(0, 3997)) - // Standard Error: 172 - .saturating_add(Weight::from_parts(375, 0).saturating_mul(b.into())) + // Standard Error: 38 + .saturating_add(Weight::from_parts(644, 0).saturating_mul(b.into())) + // Standard Error: 391 + .saturating_add(Weight::from_parts(3_561, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) } @@ -115,12 +118,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `73 + m * (20 ±0)` // Estimated: `3997 + m * (20 ±0)` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_328_339, 0) + Weight::from_parts(15_683_246, 0) .saturating_add(Weight::from_parts(0, 3997)) - // Standard Error: 213 - .saturating_add(Weight::from_parts(1_773, 0).saturating_mul(b.into())) - // Standard Error: 2_199 - .saturating_add(Weight::from_parts(5_705, 0).saturating_mul(m.into())) + // Standard Error: 38 + .saturating_add(Weight::from_parts(1_053, 0).saturating_mul(b.into())) + // Standard Error: 401 + .saturating_add(Weight::from_parts(5_208, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) } @@ -141,15 +144,15 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `357 + m * (20 ±0) + p * (36 ±0)` // Estimated: `3751 + m * (21 ±0) + p * (36 ±0)` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_702_013, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_982_732, 0) .saturating_add(Weight::from_parts(0, 3751)) - // Standard Error: 315 - .saturating_add(Weight::from_parts(796, 0).saturating_mul(b.into())) - // Standard Error: 3_293 - .saturating_add(Weight::from_parts(14_028, 0).saturating_mul(m.into())) - // Standard Error: 3_251 - .saturating_add(Weight::from_parts(146_957, 0).saturating_mul(p.into())) + // Standard Error: 82 + .saturating_add(Weight::from_parts(888, 0).saturating_mul(b.into())) + // Standard Error: 860 + .saturating_add(Weight::from_parts(8_014, 0).saturating_mul(m.into())) + // Standard Error: 849 + .saturating_add(Weight::from_parts(114_999, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 21).saturating_mul(m.into())) @@ -164,11 +167,11 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `832 + m * (40 ±0)` // Estimated: `4296 + m * (40 ±0)` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(18_888_620, 0) + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_488_642, 0) .saturating_add(Weight::from_parts(0, 4296)) - // Standard Error: 3_932 - .saturating_add(Weight::from_parts(7_792, 0).saturating_mul(m.into())) + // Standard Error: 775 + .saturating_add(Weight::from_parts(9_407, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) @@ -187,11 +190,11 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `409 + m * (40 ±0) + p * (36 ±0)` // Estimated: `3854 + m * (41 ±0) + p * (36 ±0)` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(22_509_197, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(21_853_448, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 3_630 - .saturating_add(Weight::from_parts(134_361, 0).saturating_mul(p.into())) + // Standard Error: 1_421 + .saturating_add(Weight::from_parts(113_584, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 41).saturating_mul(m.into())) @@ -215,14 +218,14 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `715 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` // Estimated: `4032 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_157_309, 0) + Weight::from_parts(31_747_128, 0) .saturating_add(Weight::from_parts(0, 4032)) - // Standard Error: 537 - .saturating_add(Weight::from_parts(2_673, 0).saturating_mul(b.into())) - // Standard Error: 5_682 - .saturating_add(Weight::from_parts(30_326, 0).saturating_mul(m.into())) - // Standard Error: 5_539 - .saturating_add(Weight::from_parts(198_810, 0).saturating_mul(p.into())) + // Standard Error: 127 + .saturating_add(Weight::from_parts(725, 0).saturating_mul(b.into())) + // Standard Error: 1_347 + .saturating_add(Weight::from_parts(5_496, 0).saturating_mul(m.into())) + // Standard Error: 1_313 + .saturating_add(Weight::from_parts(135_294, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) @@ -246,12 +249,12 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `429 + m * (40 ±0) + p * (36 ±0)` // Estimated: `3874 + m * (41 ±0) + p * (36 ±0)` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(23_366_099, 0) + Weight::from_parts(21_281_035, 0) .saturating_add(Weight::from_parts(0, 3874)) - // Standard Error: 3_943 - .saturating_add(Weight::from_parts(14_161, 0).saturating_mul(m.into())) - // Standard Error: 3_845 - .saturating_add(Weight::from_parts(138_421, 0).saturating_mul(p.into())) + // Standard Error: 853 + .saturating_add(Weight::from_parts(6_650, 0).saturating_mul(m.into())) + // Standard Error: 831 + .saturating_add(Weight::from_parts(118_132, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 41).saturating_mul(m.into())) @@ -276,15 +279,15 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `735 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` // Estimated: `4052 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(33_127_380, 0) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(33_208_783, 0) .saturating_add(Weight::from_parts(0, 4052)) - // Standard Error: 563 - .saturating_add(Weight::from_parts(2_533, 0).saturating_mul(b.into())) - // Standard Error: 5_952 - .saturating_add(Weight::from_parts(16_297, 0).saturating_mul(m.into())) - // Standard Error: 5_802 - .saturating_add(Weight::from_parts(200_372, 0).saturating_mul(p.into())) + // Standard Error: 120 + .saturating_add(Weight::from_parts(800, 0).saturating_mul(b.into())) + // Standard Error: 1_274 + .saturating_add(Weight::from_parts(9_665, 0).saturating_mul(m.into())) + // Standard Error: 1_242 + .saturating_add(Weight::from_parts(140_639, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) @@ -303,10 +306,10 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `226 + p * (32 ±0)` // Estimated: `1711 + p * (32 ±0)` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_796_290, 0) + Weight::from_parts(11_832_124, 0) .saturating_add(Weight::from_parts(0, 1711)) - // Standard Error: 2_932 - .saturating_add(Weight::from_parts(136_419, 0).saturating_mul(p.into())) + // Standard Error: 742 + .saturating_add(Weight::from_parts(112_432, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/runtime/koi/src/weights/pallet_conviction_voting.rs b/runtime/koi/src/weights/pallet_conviction_voting.rs index 1a9c1f4c8..c701832bc 100644 --- a/runtime/koi/src/weights/pallet_conviction_voting.rs +++ b/runtime/koi/src/weights/pallet_conviction_voting.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_conviction_voting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -71,8 +72,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13458` // Estimated: `42428` - // Minimum execution time: 85_000_000 picoseconds. - Weight::from_parts(105_000_000, 0) + // Minimum execution time: 84_000_000 picoseconds. + Weight::from_parts(88_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -93,8 +94,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `14179` // Estimated: `83866` - // Minimum execution time: 125_000_000 picoseconds. - Weight::from_parts(151_000_000, 0) + // Minimum execution time: 122_000_000 picoseconds. + Weight::from_parts(127_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -109,8 +110,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13928` // Estimated: `83866` - // Minimum execution time: 104_000_000 picoseconds. - Weight::from_parts(124_000_000, 0) + // Minimum execution time: 98_000_000 picoseconds. + Weight::from_parts(103_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -123,8 +124,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `13052` // Estimated: `30694` - // Minimum execution time: 48_000_000 picoseconds. - Weight::from_parts(58_000_000, 0) + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(51_000_000, 0) .saturating_add(Weight::from_parts(0, 30694)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -146,11 +147,11 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `7020 + r * (447 ±0)` // Estimated: `83866 + r * (3387 ±0)` - // Minimum execution time: 51_000_000 picoseconds. - Weight::from_parts(94_354_931, 0) + // Minimum execution time: 58_000_000 picoseconds. + Weight::from_parts(127_864_505, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 349_326 - .saturating_add(Weight::from_parts(37_658_543, 0).saturating_mul(r.into())) + // Standard Error: 309_024 + .saturating_add(Weight::from_parts(33_851_201, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -168,11 +169,11 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `6876 + r * (447 ±0)` // Estimated: `83866 + r * (3387 ±0)` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(53_657_365, 0) + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(84_905_799, 0) .saturating_add(Weight::from_parts(0, 83866)) - // Standard Error: 323_752 - .saturating_add(Weight::from_parts(37_507_322, 0).saturating_mul(r.into())) + // Standard Error: 380_953 + .saturating_add(Weight::from_parts(34_159_818, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -191,8 +192,8 @@ impl pallet_conviction_voting::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `12038` // Estimated: `30694` - // Minimum execution time: 75_000_000 picoseconds. - Weight::from_parts(80_000_000, 0) + // Minimum execution time: 78_000_000 picoseconds. + Weight::from_parts(83_000_000, 0) .saturating_add(Weight::from_parts(0, 30694)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/koi/src/weights/pallet_message_queue.rs b/runtime/koi/src/weights/pallet_message_queue.rs index c398d7157..e337815e3 100644 --- a/runtime/koi/src/weights/pallet_message_queue.rs +++ b/runtime/koi/src/weights/pallet_message_queue.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -63,7 +64,7 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `223` // Estimated: `6044` - // Minimum execution time: 10_000_000 picoseconds. + // Minimum execution time: 11_000_000 picoseconds. Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) @@ -78,7 +79,7 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `218` // Estimated: `6044` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -113,8 +114,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -127,8 +128,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 84_000_000 picoseconds. - Weight::from_parts(93_000_000, 0) + // Minimum execution time: 81_000_000 picoseconds. + Weight::from_parts(82_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,7 +142,7 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `171` // Estimated: `3517` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -154,8 +155,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(42_000_000, 0) + // Minimum execution time: 34_000_000 picoseconds. + Weight::from_parts(38_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -168,7 +169,7 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 41_000_000 picoseconds. + // Minimum execution time: 44_000_000 picoseconds. Weight::from_parts(48_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) @@ -183,7 +184,7 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `65667` // Estimated: `69050` // Minimum execution time: 50_000_000 picoseconds. - Weight::from_parts(61_000_000, 0) + Weight::from_parts(55_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/koi/src/weights/pallet_preimage.rs b/runtime/koi/src/weights/pallet_preimage.rs index 7a4d5a244..7701da5c9 100644 --- a/runtime/koi/src/weights/pallet_preimage.rs +++ b/runtime/koi/src/weights/pallet_preimage.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -68,11 +69,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3544` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(45_000_000, 0) + // Minimum execution time: 46_000_000 picoseconds. + Weight::from_parts(32_860_287, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(1_154, 0).saturating_mul(s.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_056, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -87,11 +88,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3544` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) // Standard Error: 2 - .saturating_add(Weight::from_parts(1_133, 0).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(1_067, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -107,10 +108,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `106` // Estimated: `3544` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(1_128, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_062, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -126,8 +127,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `219` // Estimated: `3544` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(58_000_000, 0) + // Minimum execution time: 46_000_000 picoseconds. + Weight::from_parts(50_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -142,8 +143,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3544` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(25_000_000, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(22_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -156,7 +157,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `176` // Estimated: `3544` - // Minimum execution time: 14_000_000 picoseconds. + // Minimum execution time: 15_000_000 picoseconds. Weight::from_parts(19_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) @@ -170,8 +171,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3544` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -185,7 +186,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `42` // Estimated: `3544` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -198,8 +199,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3544` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -214,8 +215,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `3544` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -228,8 +229,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3544` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -242,8 +243,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `3544` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -259,13 +260,13 @@ impl pallet_preimage::WeightInfo for WeightInfo { /// The range of component `n` is `[1, 1024]`. fn ensure_updated(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `532 + n * (203 ±0)` + // Measured: `498 + n * (203 ±0)` // Estimated: `990 + n * (2591 ±0)` - // Minimum execution time: 56_000_000 picoseconds. - Weight::from_parts(60_000_000, 0) + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(55_000_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 47_697 - .saturating_add(Weight::from_parts(57_455_847, 0).saturating_mul(n.into())) + // Standard Error: 32_386 + .saturating_add(Weight::from_parts(53_019_625, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 2591).saturating_mul(n.into())) diff --git a/runtime/koi/src/weights/pallet_proxy.rs b/runtime/koi/src/weights/pallet_proxy.rs index 6f6ad95a3..a489740a2 100644 --- a/runtime/koi/src/weights/pallet_proxy.rs +++ b/runtime/koi/src/weights/pallet_proxy.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -65,10 +66,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `119 + p * (25 ±0)` // Estimated: `4310` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(14_095_571, 0) + Weight::from_parts(13_542_900, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 7_508 - .saturating_add(Weight::from_parts(48_610, 0).saturating_mul(p.into())) + // Standard Error: 1_815 + .saturating_add(Weight::from_parts(19_271, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -81,17 +82,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn proxy_announced(a: u32, p: u32, ) -> Weight { + fn proxy_announced(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `371 + a * (56 ±0) + p * (25 ±0)` // Estimated: `5302` // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(34_463_299, 0) + Weight::from_parts(32_182_775, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 11_636 - .saturating_add(Weight::from_parts(123_729, 0).saturating_mul(a.into())) - // Standard Error: 12_022 - .saturating_add(Weight::from_parts(14_431, 0).saturating_mul(p.into())) + // Standard Error: 2_939 + .saturating_add(Weight::from_parts(113_289, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -101,17 +100,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { + fn remove_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `295 + a * (56 ±0)` // Estimated: `5302` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(21_259_863, 0) + Weight::from_parts(20_703_950, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 7_217 - .saturating_add(Weight::from_parts(132_453, 0).saturating_mul(a.into())) - // Standard Error: 7_457 - .saturating_add(Weight::from_parts(21_254, 0).saturating_mul(p.into())) + // Standard Error: 1_803 + .saturating_add(Weight::from_parts(111_699, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -126,10 +123,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `295 + a * (56 ±0)` // Estimated: `5302` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(21_964_838, 0) + Weight::from_parts(20_802_468, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 7_084 - .saturating_add(Weight::from_parts(143_488, 0).saturating_mul(a.into())) + // Standard Error: 1_913 + .saturating_add(Weight::from_parts(113_969, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -141,15 +138,17 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn announce(a: u32, _p: u32, ) -> Weight { + fn announce(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `311 + a * (56 ±0) + p * (25 ±0)` // Estimated: `5302` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(27_807_662, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(26_805_478, 0) .saturating_add(Weight::from_parts(0, 5302)) - // Standard Error: 8_462 - .saturating_add(Weight::from_parts(180_035, 0).saturating_mul(a.into())) + // Standard Error: 2_340 + .saturating_add(Weight::from_parts(131_497, 0).saturating_mul(a.into())) + // Standard Error: 2_418 + .saturating_add(Weight::from_parts(1_666, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -160,11 +159,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `115 + p * (25 ±0)` // Estimated: `4310` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(21_111_983, 0) + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(21_211_149, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 6_929 - .saturating_add(Weight::from_parts(64_047, 0).saturating_mul(p.into())) + // Standard Error: 2_351 + .saturating_add(Weight::from_parts(7_271, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -176,10 +175,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `115 + p * (25 ±0)` // Estimated: `4310` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(22_347_148, 0) + Weight::from_parts(20_951_322, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 9_039 - .saturating_add(Weight::from_parts(33_946, 0).saturating_mul(p.into())) + // Standard Error: 2_706 + .saturating_add(Weight::from_parts(21_822, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -191,25 +190,23 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `115 + p * (25 ±0)` // Estimated: `4310` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(20_953_276, 0) + Weight::from_parts(20_500_808, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 7_731 - .saturating_add(Weight::from_parts(38_577, 0).saturating_mul(p.into())) + // Standard Error: 2_304 + .saturating_add(Weight::from_parts(14_509, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(845), added: 3320, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn create_pure(p: u32, ) -> Weight { + fn create_pure(_p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `127` // Estimated: `4310` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(22_926_728, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(22_074_056, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 8_619 - .saturating_add(Weight::from_parts(15_932, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -221,10 +218,10 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `140 + p * (25 ±0)` // Estimated: `4310` // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(21_780_110, 0) + Weight::from_parts(20_641_704, 0) .saturating_add(Weight::from_parts(0, 4310)) - // Standard Error: 7_638 - .saturating_add(Weight::from_parts(17_761, 0).saturating_mul(p.into())) + // Standard Error: 1_549 + .saturating_add(Weight::from_parts(18_064, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/koi/src/weights/pallet_referenda.rs b/runtime/koi/src/weights/pallet_referenda.rs index fc0f78cfd..457612f4c 100644 --- a/runtime/koi/src/weights/pallet_referenda.rs +++ b/runtime/koi/src/weights/pallet_referenda.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -65,8 +66,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `275` // Estimated: `42428` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -79,7 +80,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `516` // Estimated: `83866` - // Minimum execution time: 38_000_000 picoseconds. + // Minimum execution time: 37_000_000 picoseconds. Weight::from_parts(39_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) @@ -97,8 +98,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3350` // Estimated: `42428` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(49_000_000, 0) + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(48_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -115,8 +116,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3370` // Estimated: `42428` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(53_000_000, 0) + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(49_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -146,7 +147,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `461` // Estimated: `4377` // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(32_000_000, 0) + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -169,8 +170,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `384` // Estimated: `4377` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(26_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -183,7 +184,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `390` // Estimated: `83866` - // Minimum execution time: 25_000_000 picoseconds. + // Minimum execution time: 26_000_000 picoseconds. Weight::from_parts(26_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(3)) @@ -201,8 +202,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `880` // Estimated: `83866` - // Minimum execution time: 84_000_000 picoseconds. - Weight::from_parts(87_000_000, 0) + // Minimum execution time: 86_000_000 picoseconds. + Weight::from_parts(88_000_000, 0) .saturating_add(Weight::from_parts(0, 83866)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -215,7 +216,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `207` // Estimated: `5477` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 8_000_000 picoseconds. Weight::from_parts(8_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) @@ -232,7 +233,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `3137` // Estimated: `42428` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(32_000_000, 0) + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -247,8 +248,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3195` // Estimated: `42428` - // Minimum execution time: 34_000_000 picoseconds. - Weight::from_parts(41_000_000, 0) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(33_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -261,8 +262,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3020` // Estimated: `5477` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -275,8 +276,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3020` // Estimated: `5477` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -291,8 +292,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3024` // Estimated: `5477` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -307,8 +308,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3044` // Estimated: `5477` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(20_000_000, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 5477)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -321,8 +322,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `354` // Estimated: `42428` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -335,7 +336,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `390` // Estimated: `42428` - // Minimum execution time: 18_000_000 picoseconds. + // Minimum execution time: 17_000_000 picoseconds. Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) @@ -348,7 +349,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `299` // Estimated: `4377` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -379,8 +380,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `390` // Estimated: `42428` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -393,8 +394,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `443` // Estimated: `42428` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -407,8 +408,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `426` // Estimated: `42428` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(22_000_000, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -422,7 +423,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Measured: `443` // Estimated: `42428` // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(22_000_000, 0) + Weight::from_parts(19_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -465,8 +466,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `443` // Estimated: `42428` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(20_000_000, 0) + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(21_000_000, 0) .saturating_add(Weight::from_parts(0, 42428)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -483,8 +484,8 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `443` // Estimated: `4377` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -497,7 +498,7 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `376` // Estimated: `4377` - // Minimum execution time: 12_000_000 picoseconds. + // Minimum execution time: 13_000_000 picoseconds. Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 4377)) .saturating_add(T::DbWeight::get().reads(2)) diff --git a/runtime/koi/src/weights/pallet_scheduler.rs b/runtime/koi/src/weights/pallet_scheduler.rs index ef3bbdff8..2bc596040 100644 --- a/runtime/koi/src/weights/pallet_scheduler.rs +++ b/runtime/koi/src/weights/pallet_scheduler.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -75,10 +76,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `78 + s * (177 ±0)` // Estimated: `42428` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(5_834_698, 0) + Weight::from_parts(5_698_198, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_784 - .saturating_add(Weight::from_parts(398_666, 0).saturating_mul(s.into())) + // Standard Error: 1_310 + .saturating_add(Weight::from_parts(374_788, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -101,11 +102,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `179 + s * (1 ±0)` // Estimated: `3644 + s * (1 ±0)` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3644)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(521, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(482, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) @@ -117,7 +118,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -136,7 +137,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `4` // Estimated: `3997` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 3997)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -156,10 +157,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `78 + s * (177 ±0)` // Estimated: `42428` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(12_251_764, 0) + Weight::from_parts(11_128_941, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 5_910 - .saturating_add(Weight::from_parts(397_968, 0).saturating_mul(s.into())) + // Standard Error: 1_780 + .saturating_add(Weight::from_parts(371_553, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -172,11 +173,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `78 + s * (177 ±0)` // Estimated: `42428` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(12_843_673, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(11_635_183, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 6_444 - .saturating_add(Weight::from_parts(612_797, 0).saturating_mul(s.into())) + // Standard Error: 1_243 + .saturating_add(Weight::from_parts(599_404, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -190,10 +191,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `255 + s * (185 ±0)` // Estimated: `42428` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(15_768_000, 0) + Weight::from_parts(14_648_000, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 6_871 - .saturating_add(Weight::from_parts(402_285, 0).saturating_mul(s.into())) + // Standard Error: 2_039 + .saturating_add(Weight::from_parts(382_612, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -207,10 +208,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `281 + s * (185 ±0)` // Estimated: `42428` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_722_204, 0) + Weight::from_parts(14_070_775, 0) .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 7_510 - .saturating_add(Weight::from_parts(657_325, 0).saturating_mul(s.into())) + // Standard Error: 1_327 + .saturating_add(Weight::from_parts(612_518, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/koi/src/weights/pallet_session.rs b/runtime/koi/src/weights/pallet_session.rs index ac496a87b..d4b7aadd4 100644 --- a/runtime/koi/src/weights/pallet_session.rs +++ b/runtime/koi/src/weights/pallet_session.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -64,7 +65,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `246` // Estimated: `3711` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3711)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -78,7 +79,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Measured: `228` // Estimated: `3693` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3693)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/koi/src/weights/pallet_timestamp.rs b/runtime/koi/src/weights/pallet_timestamp.rs index 47c9b0cba..8eaff5494 100644 --- a/runtime/koi/src/weights/pallet_timestamp.rs +++ b/runtime/koi/src/weights/pallet_timestamp.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_treasury.rs b/runtime/koi/src/weights/pallet_treasury.rs index dbfb9ac96..361c805b7 100644 --- a/runtime/koi/src/weights/pallet_treasury.rs +++ b/runtime/koi/src/weights/pallet_treasury.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -65,8 +66,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1887` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -79,8 +80,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `275` // Estimated: `1489` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(29_000_000, 0) + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -93,8 +94,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `571` // Estimated: `6172` - // Minimum execution time: 40_000_000 picoseconds. - Weight::from_parts(45_000_000, 0) + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(40_000_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -109,10 +110,10 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Measured: `537 + p * (8 ±0)` // Estimated: `3549` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(10_074_563, 0) + Weight::from_parts(8_929_052, 0) .saturating_add(Weight::from_parts(0, 3549)) - // Standard Error: 2_320 - .saturating_add(Weight::from_parts(34_382, 0).saturating_mul(p.into())) + // Standard Error: 1_129 + .saturating_add(Weight::from_parts(26_457, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -143,11 +144,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `328 + p * (97 ±0)` // Estimated: `3581 + p * (2559 ±0)` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(28_697_260, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(104_307_124, 0) .saturating_add(Weight::from_parts(0, 3581)) - // Standard Error: 77_972 - .saturating_add(Weight::from_parts(2_780_716, 0).saturating_mul(p.into())) + // Standard Error: 181_098 + .saturating_add(Weight::from_parts(1_688_920, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -175,8 +176,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `416` // Estimated: `6172` - // Minimum execution time: 55_000_000 picoseconds. - Weight::from_parts(59_000_000, 0) + // Minimum execution time: 48_000_000 picoseconds. + Weight::from_parts(50_000_000, 0) .saturating_add(Weight::from_parts(0, 6172)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -199,7 +200,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `215` // Estimated: `3522` - // Minimum execution time: 9_000_000 picoseconds. + // Minimum execution time: 10_000_000 picoseconds. Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3522)) .saturating_add(T::DbWeight::get().reads(1)) diff --git a/runtime/koi/src/weights/pallet_tx_pause.rs b/runtime/koi/src/weights/pallet_tx_pause.rs index 2bcf92130..08370e3d8 100644 --- a/runtime/koi/src/weights/pallet_tx_pause.rs +++ b/runtime/koi/src/weights/pallet_tx_pause.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_tx_pause` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -61,8 +62,8 @@ impl pallet_tx_pause::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3997` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3997)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/koi/src/weights/pallet_utility.rs b/runtime/koi/src/weights/pallet_utility.rs index 78e3e3106..b52edaaa7 100644 --- a/runtime/koi/src/weights/pallet_utility.rs +++ b/runtime/koi/src/weights/pallet_utility.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -63,10 +64,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `4` // Estimated: `3997` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + Weight::from_parts(9_405_159, 0) .saturating_add(Weight::from_parts(0, 3997)) - // Standard Error: 12_721 - .saturating_add(Weight::from_parts(5_456_832, 0).saturating_mul(c.into())) + // Standard Error: 2_765 + .saturating_add(Weight::from_parts(4_953_957, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `TxPause::PausedCalls` (r:1 w:0) @@ -76,7 +77,7 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `4` // Estimated: `3997` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + Weight::from_parts(8_000_000, 0) .saturating_add(Weight::from_parts(0, 3997)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -88,10 +89,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `4` // Estimated: `3997` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + Weight::from_parts(6_693_835, 0) .saturating_add(Weight::from_parts(0, 3997)) - // Standard Error: 9_960 - .saturating_add(Weight::from_parts(5_916_048, 0).saturating_mul(c.into())) + // Standard Error: 2_877 + .saturating_add(Weight::from_parts(5_214_634, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) } fn dispatch_as() -> Weight { @@ -99,7 +100,7 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `TxPause::PausedCalls` (r:1 w:0) @@ -110,10 +111,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `4` // Estimated: `3997` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(19_124_290, 0) + Weight::from_parts(3_211_371, 0) .saturating_add(Weight::from_parts(0, 3997)) - // Standard Error: 20_179 - .saturating_add(Weight::from_parts(5_499_270, 0).saturating_mul(c.into())) + // Standard Error: 5_402 + .saturating_add(Weight::from_parts(4_991_256, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) } } diff --git a/runtime/koi/src/weights/pallet_whitelist.rs b/runtime/koi/src/weights/pallet_whitelist.rs index 56dc70aba..196af6433 100644 --- a/runtime/koi/src/weights/pallet_whitelist.rs +++ b/runtime/koi/src/weights/pallet_whitelist.rs @@ -19,8 +19,9 @@ //! Autogenerated weights for `pallet_whitelist` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: @@ -65,8 +66,8 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `48` // Estimated: `3544` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -82,7 +83,7 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Measured: `176` // Estimated: `3544` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3544)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -101,10 +102,10 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Measured: `252 + n * (1 ±0)` // Estimated: `3716 + n * (1 ±0)` // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + Weight::from_parts(315_272, 0) .saturating_add(Weight::from_parts(0, 3716)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(543, 0).saturating_mul(n.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(491, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -120,11 +121,11 @@ impl pallet_whitelist::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `176` // Estimated: `3544` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(20_605_827, 0) + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(18_176_033, 0) .saturating_add(Weight::from_parts(0, 3544)) - // Standard Error: 26 - .saturating_add(Weight::from_parts(1_150, 0).saturating_mul(n.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_039, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } From afaf02491d83fcd0c19a479821433ec3af2bba3e Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 21 Oct 2024 12:48:16 +0800 Subject: [PATCH 09/17] Update tx pause --- runtime/crab/src/pallets/tx_pause.rs | 20 +++++++++---------- runtime/darwinia/src/pallets/tx_pause.rs | 4 +--- runtime/koi/src/pallets/tx_pause.rs | 25 +++++++++--------------- 3 files changed, 19 insertions(+), 30 deletions(-) diff --git a/runtime/crab/src/pallets/tx_pause.rs b/runtime/crab/src/pallets/tx_pause.rs index a27c4857c..4d593413e 100644 --- a/runtime/crab/src/pallets/tx_pause.rs +++ b/runtime/crab/src/pallets/tx_pause.rs @@ -21,14 +21,14 @@ use crate::*; pub struct TxPauseWhitelistedCalls; // This conflicts with runtime test. -#[cfg(feature = "runtime-benchmarks")] -impl frame_support::traits::Contains> - for TxPauseWhitelistedCalls -{ - fn contains(_: &pallet_tx_pause::RuntimeCallNameOf) -> bool { - false - } -} +// #[cfg(feature = "runtime-benchmarks")] +// impl frame_support::traits::Contains> +// for TxPauseWhitelistedCalls +// { +// fn contains(_: &pallet_tx_pause::RuntimeCallNameOf) -> bool { +// false +// } +// } #[cfg(not(feature = "runtime-benchmarks"))] impl frame_support::traits::Contains> for TxPauseWhitelistedCalls @@ -40,9 +40,7 @@ impl frame_support::traits::Contains !matches!( pallet, b"Balances" - | b"Assets" | b"Deposit" - | b"AccountMigration" - | b"DarwiniaStaking" + | b"Assets" | b"AccountMigration" | b"Ethereum" | b"EVM" | b"EthTxForwarder" ) diff --git a/runtime/darwinia/src/pallets/tx_pause.rs b/runtime/darwinia/src/pallets/tx_pause.rs index 3a7c19db4..ae3fb3a9c 100644 --- a/runtime/darwinia/src/pallets/tx_pause.rs +++ b/runtime/darwinia/src/pallets/tx_pause.rs @@ -40,9 +40,7 @@ impl frame_support::traits::Contains !matches!( pallet, b"Balances" - | b"Assets" | b"Deposit" - | b"AccountMigration" - | b"DarwiniaStaking" + | b"Assets" | b"AccountMigration" | b"Ethereum" | b"EVM" | b"EthTxForwarder" ) diff --git a/runtime/koi/src/pallets/tx_pause.rs b/runtime/koi/src/pallets/tx_pause.rs index c5134c69f..430e23dec 100644 --- a/runtime/koi/src/pallets/tx_pause.rs +++ b/runtime/koi/src/pallets/tx_pause.rs @@ -21,14 +21,14 @@ use crate::*; pub struct TxPauseWhitelistedCalls; // This conflicts with runtime test. -#[cfg(feature = "runtime-benchmarks")] -impl frame_support::traits::Contains> - for TxPauseWhitelistedCalls -{ - fn contains(_: &pallet_tx_pause::RuntimeCallNameOf) -> bool { - false - } -} +// #[cfg(feature = "runtime-benchmarks")] +// impl frame_support::traits::Contains> +// for TxPauseWhitelistedCalls +// { +// fn contains(_: &pallet_tx_pause::RuntimeCallNameOf) -> bool { +// false +// } +// } #[cfg(not(feature = "runtime-benchmarks"))] impl frame_support::traits::Contains> for TxPauseWhitelistedCalls @@ -37,14 +37,7 @@ impl frame_support::traits::Contains let pallet = full_name.0.as_slice(); // Pallets that can be paused by the tx-pause pallet. - !matches!( - pallet, - b"Balances" - | b"Assets" | b"Deposit" - | b"DarwiniaStaking" - | b"Ethereum" - | b"EVM" | b"EthTxForwarder" - ) + !matches!(pallet, b"Balances" | b"Assets" | b"Ethereum" | b"EVM" | b"EthTxForwarder") } } From cdd0b6da550d9dd9ae0451c080d98a61910d3a1b Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 21 Oct 2024 13:05:41 +0800 Subject: [PATCH 10/17] Re-cache --- .github/workflows/checks.yml | 2 +- Cargo.lock | 1309 ++++++++++++++++++---------------- 2 files changed, 679 insertions(+), 632 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index eaa556747..1886e589d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -23,7 +23,7 @@ on: - "**.sol" env: - CACHE_VERSION: 0 + CACHE_VERSION: 1 CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse CARGO_TERM_COLOR: always diff --git a/Cargo.lock b/Cargo.lock index e531d68e8..393ab533f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,18 +23,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ - "gimli 0.29.0", + "gimli 0.31.1", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" @@ -200,9 +200,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" [[package]] name = "approx" @@ -224,7 +224,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -461,7 +461,7 @@ dependencies = [ "ark-ff", "ark-serialize", "ark-std", - "ark-transcript", + "ark-transcript 0.0.2 (git+https://github.com/w3f/ring-vrf?rev=e9782f9)", "digest 0.10.7", "getrandom_or_panic", "zeroize", @@ -501,6 +501,20 @@ dependencies = [ "rayon", ] +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "563084372d89271122bd743ef0a608179726f5fad0566008ba55bd0f756489b8" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] + [[package]] name = "ark-transcript" version = "0.0.2" @@ -528,9 +542,9 @@ checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -543,9 +557,9 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "asn1-rs" @@ -617,13 +631,13 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.1.0", + "fastrand 2.1.1", "futures-lite 2.3.0", "slab", ] @@ -662,9 +676,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ "async-lock 3.4.0", "cfg-if", @@ -672,11 +686,11 @@ dependencies = [ "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.7.2", - "rustix 0.38.34", + "polling 3.7.3", + "rustix 0.38.37", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -723,26 +737,26 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.34", + "rustix 0.38.37", "windows-sys 0.48.0", ] [[package]] name = "async-signal" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb3634b73397aa844481f814fad23bbf07fdb0eabec10f2eb95e58944b1ec32" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.3.3", + "async-io 2.3.4", "async-lock 3.4.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.34", + "rustix 0.38.37", "signal-hook-registry", "slab", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -753,13 +767,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -804,28 +818,28 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ - "addr2line 0.22.0", - "cc", + "addr2line 0.24.2", "cfg-if", "libc", "miniz_oxide", - "object 0.36.3", + "object 0.36.5", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -926,20 +940,20 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.20", + "prettyplease 0.2.24", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] name = "bip39" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +checksum = "33415e24172c1b7d6066f6d999545375ab8e1d95421d6784bdfff9496f292387" dependencies = [ "bitcoin_hashes", "rand", @@ -948,11 +962,21 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "bitcoin-internals" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" + [[package]] name = "bitcoin_hashes" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" +dependencies = [ + "bitcoin-internals", + "hex-conservative", +] [[package]] name = "bitflags" @@ -1017,8 +1041,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.4", - "constant_time_eq 0.3.0", + "arrayvec 0.7.6", + "constant_time_eq 0.3.1", ] [[package]] @@ -1028,21 +1052,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", - "arrayvec 0.7.4", - "constant_time_eq 0.3.0", + "arrayvec 0.7.6", + "constant_time_eq 0.3.1", ] [[package]] name = "blake3" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210" +checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "cc", "cfg-if", - "constant_time_eq 0.3.0", + "constant_time_eq 0.3.1", ] [[package]] @@ -1078,9 +1102,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32385ecb91a31bddaf908e8dcf4a15aef1bcd3913cc03ebfad02ff6d568abc1" +checksum = "db436177db0d505b1507f03aca56a41442ae6efdf8b6eaa855d73e52c5b078dc" dependencies = [ "log", "parity-scale-codec", @@ -1130,7 +1154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", - "regex-automata 0.4.7", + "regex-automata 0.4.8", "serde", ] @@ -1163,9 +1187,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.16.3" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" [[package]] name = "byteorder" @@ -1175,9 +1199,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "bzip2-sys" @@ -1202,9 +1226,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -1240,12 +1264,13 @@ checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" [[package]] name = "cc" -version = "1.1.8" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -1381,9 +1406,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.13" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -1391,9 +1416,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.13" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -1404,14 +1429,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -1461,7 +1486,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#665f5f51af5734c7b6d90b985dd6861d4c5b4752" +source = "git+https://github.com/w3f/ring-proof#652286c32f96beb9ce7f5793f5e2c2c923f63b73" dependencies = [ "ark-ec", "ark-ff", @@ -1470,8 +1495,7 @@ dependencies = [ "ark-std", "fflonk", "getrandom_or_panic", - "merlin", - "rand_chacha 0.3.1", + "rand_core 0.6.4", ] [[package]] @@ -1536,9 +1560,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "constcat" @@ -1570,9 +1594,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core2" @@ -1604,9 +1628,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -1964,7 +1988,7 @@ dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-primitives-core", - "futures 0.3.30", + "futures 0.3.31", "parity-scale-codec", "parking_lot 0.12.3", "polkadot-node-primitives", @@ -1992,7 +2016,7 @@ dependencies = [ "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.30", + "futures 0.3.31", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -2031,7 +2055,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "dyn-clone", - "futures 0.3.30", + "futures 0.3.31", "log", "parity-scale-codec", "polkadot-primitives", @@ -2072,7 +2096,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-trait", "cumulus-relay-chain-interface", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "parity-scale-codec", "parking_lot 0.12.3", @@ -2120,7 +2144,7 @@ dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "parity-scale-codec", "polkadot-node-primitives", @@ -2151,7 +2175,7 @@ dependencies = [ "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", - "futures 0.3.30", + "futures 0.3.31", "polkadot-primitives", "sc-client-api", "sc-consensus", @@ -2247,10 +2271,10 @@ name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -2393,7 +2417,7 @@ dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "polkadot-cli", "polkadot-service", @@ -2416,7 +2440,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-trait", "cumulus-primitives-core", - "futures 0.3.30", + "futures 0.3.31", "jsonrpsee-core", "parity-scale-codec", "polkadot-overseer", @@ -2437,7 +2461,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", - "futures 0.3.30", + "futures 0.3.31", "parking_lot 0.12.3", "polkadot-availability-recovery", "polkadot-collator-protocol", @@ -2477,7 +2501,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "either", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "jsonrpsee", "parity-scale-codec", @@ -2558,7 +2582,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -2576,9 +2600,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.124" +version = "1.0.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "273dcfd3acd4e1e276af13ed2a43eea7001318823e7a726a6b3ed39b4acc0b82" +checksum = "cbdc8cca144dce1c4981b5c9ab748761619979e515c3d53b5df385c677d1d007" dependencies = [ "cc", "cxxbridge-flags", @@ -2588,9 +2612,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.124" +version = "1.0.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b2766fbd92be34e9ed143898fce6c572dc009de39506ed6903e5a05b68914e" +checksum = "c5764c3142ab44fcf857101d12c0ddf09c34499900557c764f5ad0597159d1fc" dependencies = [ "cc", "codespan-reporting", @@ -2598,24 +2622,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] name = "cxxbridge-flags" -version = "1.0.124" +version = "1.0.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "839fcd5e43464614ffaa989eaf1c139ef1f0c51672a1ed08023307fa1b909ccd" +checksum = "d422aff542b4fa28c2ce8e5cc202d42dbf24702345c1fba3087b2d3f8a1b90ff" [[package]] name = "cxxbridge-macro" -version = "1.0.124" +version = "1.0.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2c1c1776b986979be68bb2285da855f8d8a35851a769fca8740df7c3d07877" +checksum = "a1719100f31492cd6adeeab9a0f46cdbc846e615fdb66d7b398aa46ec7fdd06f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -2650,7 +2674,7 @@ dependencies = [ "fp-rpc", "frame-benchmarking", "frame-benchmarking-cli", - "futures 0.3.30", + "futures 0.3.31", "jsonrpsee", "koi-runtime", "log", @@ -3098,7 +3122,7 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -3111,7 +3135,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -3200,7 +3224,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -3214,8 +3238,8 @@ dependencies = [ "ark-secret-scalar", "ark-serialize", "ark-std", - "ark-transcript", - "arrayvec 0.7.4", + "ark-transcript 0.0.2 (git+https://github.com/w3f/ring-vrf?rev=e9782f9)", + "arrayvec 0.7.6", "zeroize", ] @@ -3240,7 +3264,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.72", + "syn 2.0.82", "termcolor", "toml 0.8.19", "walkdir", @@ -3437,7 +3461,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -3448,7 +3472,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -3497,7 +3521,7 @@ dependencies = [ "serde", "sha3", "thiserror", - "uint", + "uint 0.9.5", ] [[package]] @@ -3508,7 +3532,7 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", "impl-serde", "scale-info", @@ -3541,12 +3565,12 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", "impl-serde", - "primitive-types", + "primitive-types 0.12.2", "scale-info", - "uint", + "uint 0.9.5", ] [[package]] @@ -3601,7 +3625,7 @@ dependencies = [ "evm-runtime", "log", "parity-scale-codec", - "primitive-types", + "primitive-types 0.12.2", "rlp", "scale-info", "serde", @@ -3615,7 +3639,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1da6cedc5cedb4208e59467106db0d1f50db01b920920589f8e672c02fdc04f" dependencies = [ "parity-scale-codec", - "primitive-types", + "primitive-types 0.12.2", "scale-info", "serde", ] @@ -3629,7 +3653,7 @@ dependencies = [ "environmental", "evm-core", "evm-runtime", - "primitive-types", + "primitive-types 0.12.2", ] [[package]] @@ -3641,7 +3665,7 @@ dependencies = [ "auto_impl", "environmental", "evm-core", - "primitive-types", + "primitive-types 0.12.2", "sha3", ] @@ -3666,7 +3690,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", ] [[package]] @@ -3690,10 +3714,10 @@ dependencies = [ "blake2 0.10.6", "file-guard", "fs-err", - "prettyplease 0.2.20", + "prettyplease 0.2.24", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -3713,9 +3737,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fatality" @@ -3782,7 +3806,7 @@ dependencies = [ "fp-consensus", "fp-rpc", "fp-storage", - "futures 0.3.30", + "futures 0.3.31", "kvdb-rocksdb", "log", "parity-db", @@ -3810,7 +3834,7 @@ dependencies = [ "fc-storage", "fp-consensus", "fp-rpc", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "log", "parking_lot 0.12.3", @@ -3839,7 +3863,7 @@ dependencies = [ "fp-evm", "fp-rpc", "fp-storage", - "futures 0.3.30", + "futures 0.3.31", "hex", "jsonrpsee", "libsecp256k1", @@ -3973,14 +3997,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -3990,7 +4014,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" dependencies = [ "either", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "log", "num-traits", @@ -4019,9 +4043,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.31" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "libz-sys", @@ -4039,9 +4063,9 @@ dependencies = [ [[package]] name = "flume" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", @@ -4268,10 +4292,10 @@ name = "frame-election-provider-solution-type" version = "13.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -4341,7 +4365,7 @@ name = "frame-remote-externalities" version = "0.35.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "indicatif", "jsonrpsee", "log", @@ -4415,7 +4439,7 @@ dependencies = [ "proc-macro2", "quote", "sp-crypto-hashing", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -4424,10 +4448,10 @@ version = "10.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -4437,7 +4461,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -4521,7 +4545,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" dependencies = [ - "rustix 0.38.34", + "rustix 0.38.37", "windows-sys 0.48.0", ] @@ -4539,9 +4563,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -4554,9 +4578,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -4564,15 +4588,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -4593,9 +4617,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -4618,7 +4642,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.1.0", + "fastrand 2.1.1", "futures-core", "futures-io", "parking", @@ -4627,13 +4651,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -4649,15 +4673,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -4667,9 +4691,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures 0.1.31", "futures-channel", @@ -4780,9 +4804,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -4813,7 +4837,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.3.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -4822,9 +4846,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -4832,7 +4856,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.3.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -4897,6 +4921,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "hashlink" version = "0.8.4" @@ -4942,6 +4972,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-conservative" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" + [[package]] name = "hex-literal" version = "0.3.4" @@ -5087,9 +5123,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -5105,9 +5141,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -5129,14 +5165,14 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -5155,7 +5191,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "log", "rustls 0.21.12", "rustls-native-certs", @@ -5171,7 +5207,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "native-tls", "tokio", @@ -5181,29 +5217,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.0", "pin-project-lite 0.2.14", "socket2 0.5.7", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -5259,10 +5294,10 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io 2.3.3", + "async-io 2.3.4", "core-foundation", "fnv", - "futures 0.3.30", + "futures 0.3.31", "if-addrs", "ipnet", "log", @@ -5281,6 +5316,26 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "impl-codec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67aa010c1e3da95bf151bd8b4c059b2ed7e75387cdb969b4f8f2723a43f9941" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-num-traits" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "803d15461ab0dcc56706adf266158acbc44ccf719bf7d0af30705f58b90a4b8c" +dependencies = [ + "integer-sqrt", + "num-traits", + "uint 0.10.0", +] + [[package]] name = "impl-rlp" version = "0.3.0" @@ -5342,12 +5397,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.3.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] @@ -5436,26 +5491,26 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] [[package]] name = "is_executable" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" +checksum = "d4a1b5bad6f9072935961dfbf1cced2f3d129963d091b6f69f007fe04e758ae2" dependencies = [ "winapi", ] @@ -5510,18 +5565,18 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" +checksum = "138572befc78a9793240645926f30161f8b4143d2be18d09e44ed9814bd7ee2c" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-client", @@ -5535,9 +5590,9 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" +checksum = "5c671353e4adf926799107bd7f5724a06b6bc0a333db442a0843c58640bdd0c1" dependencies = [ "futures-util", "http 0.2.12", @@ -5555,9 +5610,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" +checksum = "f24ea59b037b6b9b0e2ebe2c30a3e782b56bd7c76dcc5d6d70ba55d442af56e3" dependencies = [ "anyhow", "async-lock 2.8.0", @@ -5565,7 +5620,7 @@ dependencies = [ "beef", "futures-timer", "futures-util", - "hyper 0.14.30", + "hyper 0.14.31", "jsonrpsee-types", "parking_lot 0.12.3", "rand", @@ -5580,12 +5635,12 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" +checksum = "57c7b9f95208927653e7965a98525e7fc641781cab89f0e27c43fa2974405683" dependencies = [ "async-trait", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", @@ -5600,9 +5655,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" +checksum = "dcc0eba68ba205452bcb4c7b80a79ddcb3bf36c261a841b239433142db632d24" dependencies = [ "heck 0.4.1", "proc-macro-crate 1.1.3", @@ -5613,13 +5668,13 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" +checksum = "a482bc4e25eebd0adb61a3468c722763c381225bd3ec46e926f709df8a8eb548" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "jsonrpsee-core", "jsonrpsee-types", "route-recognizer", @@ -5636,9 +5691,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" +checksum = "3264e339143fe37ed081953842ee67bfafa99e3b91559bdded6e4abd8fc8535e" dependencies = [ "anyhow", "beef", @@ -5650,9 +5705,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" +checksum = "6d06eeabbb55f0af8405288390a358ebcceb6e79e1390741e6f152309c4d6076" dependencies = [ "http 0.2.12", "jsonrpsee-client-transport", @@ -5663,9 +5718,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa", @@ -5849,9 +5904,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libloading" @@ -5876,7 +5931,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" dependencies = [ "bytes", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "getrandom 0.2.15", "instant", @@ -5934,7 +5989,7 @@ checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ "either", "fnv", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "instant", "libp2p-identity", @@ -5960,7 +6015,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "libp2p-core", "log", "parking_lot 0.12.3", @@ -5976,7 +6031,7 @@ checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", "either", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "libp2p-core", "libp2p-identity", @@ -6014,12 +6069,12 @@ version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "asynchronous-codec", "bytes", "either", "fnv", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "instant", "libp2p-core", @@ -6031,7 +6086,7 @@ dependencies = [ "sha2 0.10.8", "smallvec", "thiserror", - "uint", + "uint 0.9.5", "unsigned-varint", "void", ] @@ -6043,7 +6098,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", - "futures 0.3.30", + "futures 0.3.31", "if-watch", "libp2p-core", "libp2p-identity", @@ -6079,7 +6134,7 @@ checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", - "futures 0.3.30", + "futures 0.3.31", "libp2p-core", "libp2p-identity", "log", @@ -6101,7 +6156,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ "either", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "instant", "libp2p-core", @@ -6118,7 +6173,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "if-watch", "libp2p-core", @@ -6140,7 +6195,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "instant", "libp2p-core", "libp2p-identity", @@ -6157,7 +6212,7 @@ checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ "either", "fnv", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "instant", "libp2p-core", @@ -6187,7 +6242,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "if-watch", "libc", @@ -6203,7 +6258,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "futures-rustls", "libp2p-core", "libp2p-identity", @@ -6222,7 +6277,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -6237,7 +6292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ "either", - "futures 0.3.30", + "futures 0.3.31", "futures-rustls", "libp2p-core", "log", @@ -6255,7 +6310,7 @@ version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "libp2p-core", "log", "thiserror", @@ -6270,6 +6325,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", + "redox_syscall 0.5.7", ] [[package]] @@ -6348,9 +6404,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.18" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "pkg-config", @@ -6383,9 +6439,9 @@ dependencies = [ [[package]] name = "linregress" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" +checksum = "a9eda9dcf4f2a99787827661f312ac3219292549c2ee992bf9a6248ffb066bf7" dependencies = [ "nalgebra", ] @@ -6462,19 +6518,18 @@ dependencies = [ [[package]] name = "lz4" -version = "1.26.0" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" +checksum = "4d1febb2b4a79ddd1980eede06a8f7902197960aa0383ffcfdd62fe723036725" dependencies = [ - "libc", "lz4-sys", ] [[package]] name = "lz4-sys" -version = "1.10.0" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" dependencies = [ "cc", "libc", @@ -6498,7 +6553,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -6512,7 +6567,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -6523,7 +6578,7 @@ checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -6534,7 +6589,7 @@ checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -6601,7 +6656,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.34", + "rustix 0.38.37", ] [[package]] @@ -6615,9 +6670,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] @@ -6658,7 +6713,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "rand", "thrift", ] @@ -6677,18 +6732,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi 0.3.9", "libc", @@ -6703,7 +6758,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", @@ -6726,7 +6781,7 @@ name = "mmr-gadget" version = "29.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "log", "parity-scale-codec", "sc-client-api", @@ -6839,7 +6894,7 @@ dependencies = [ "ethereum", "ethereum-types", "fc-rpc-core", - "futures 0.3.30", + "futures 0.3.31", "jsonrpsee", "moonbeam-client-evm-tracing", "moonbeam-rpc-core-types", @@ -6854,7 +6909,7 @@ version = "0.6.0" source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v1.7.2#0000e6dc61d7a16cb7a3b3e9a4947c3437e1ef85" dependencies = [ "ethereum-types", - "futures 0.3.30", + "futures 0.3.31", "jsonrpsee", "moonbeam-client-evm-tracing", "moonbeam-rpc-core-types", @@ -6886,7 +6941,7 @@ dependencies = [ "fc-rpc-core", "fc-storage", "fp-rpc", - "futures 0.3.30", + "futures 0.3.31", "hex-literal 0.3.4", "jsonrpsee", "moonbeam-client-evm-tracing", @@ -6934,7 +6989,7 @@ dependencies = [ "fc-rpc-core", "fc-storage", "fp-rpc", - "futures 0.3.30", + "futures 0.3.31", "jsonrpsee", "log", "moonbeam-client-evm-tracing", @@ -7083,7 +7138,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", "synstructure 0.13.1", ] @@ -7100,7 +7155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ "bytes", - "futures 0.3.30", + "futures 0.3.31", "log", "pin-project", "smallvec", @@ -7109,13 +7164,12 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.6" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5c17de023a86f59ed79891b2e5d5a94c705dbe904a5b5c9c952ea6221b03e4" +checksum = "3bf139e93ad757869338ad85239cb1d6c067b23b94e5846e637ca6328ee4be60" dependencies = [ "approx", "matrixmultiply", - "nalgebra-macros", "num-complex", "num-rational", "num-traits", @@ -7123,17 +7177,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "nalgebra-macros" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", -] - [[package]] name = "names" version = "0.14.0" @@ -7211,7 +7254,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ "bytes", - "futures 0.3.30", + "futures 0.3.31", "log", "netlink-packet-core", "netlink-sys", @@ -7226,7 +7269,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "416060d346fbaf1f23f9512963e3e878f1a78e707cb699ba9215761754244307" dependencies = [ "bytes", - "futures 0.3.30", + "futures 0.3.31", "libc", "log", "tokio", @@ -7343,7 +7386,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "itoa", ] @@ -7433,10 +7476,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -7459,9 +7502,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] @@ -7477,9 +7520,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "opaque-debug" @@ -7495,9 +7538,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -7516,7 +7559,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -7527,9 +7570,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -7580,7 +7623,7 @@ dependencies = [ "glob", "once_cell", "opentelemetry 0.22.0", - "ordered-float 4.2.2", + "ordered-float 4.4.0", "percent-encoding", "rand", "thiserror", @@ -7600,7 +7643,7 @@ dependencies = [ "lazy_static", "once_cell", "opentelemetry 0.23.0", - "ordered-float 4.2.2", + "ordered-float 4.4.0", "percent-encoding", "rand", "thiserror", @@ -7620,7 +7663,7 @@ checksum = "92829eef0328a3d1cd22a02c0e51deb92a5362df3e7d21a4e9bdc38934694e66" dependencies = [ "async-trait", "dyn-clonable", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "orchestra-proc-macro", "pin-project", @@ -7636,10 +7679,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1344346d5af32c95bbddea91b18a88cc83eac394192d20ef2fc4c40a74332355" dependencies = [ "expander 2.2.1", - "indexmap 2.3.0", + "indexmap 2.6.0", "itertools 0.11.0", "petgraph", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 1.0.109", @@ -7656,9 +7699,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.2.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" +checksum = "83e7ccb95e240b7c9506a3d544f10d935e142cc90b0a1d56954fb44d89ad6b97" dependencies = [ "num-traits", ] @@ -8730,10 +8773,10 @@ name = "pallet-staking-reward-curve" version = "11.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -9023,7 +9066,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bitvec", "byte-slice-cast", "bytes", @@ -9038,7 +9081,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 1.0.109", @@ -9058,9 +9101,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -9105,7 +9148,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall 0.5.7", "smallvec", "windows-targets 0.52.6", ] @@ -9163,9 +9206,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", "thiserror", @@ -9174,9 +9217,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" dependencies = [ "pest", "pest_generator", @@ -9184,22 +9227,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] name = "pest_meta" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" dependencies = [ "once_cell", "pest", @@ -9213,27 +9256,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.3.0", + "indexmap 2.6.0", ] [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -9256,12 +9299,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.1.0", + "fastrand 2.1.1", "futures-io", ] @@ -9277,9 +9320,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "polkadot-approval-distribution" @@ -9287,7 +9330,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "bitvec", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "itertools 0.10.5", "polkadot-node-jaeger", @@ -9307,7 +9350,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "always-assert", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -9324,7 +9367,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "derive_more", "fatality", - "futures 0.3.30", + "futures 0.3.31", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -9347,7 +9390,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-trait", "fatality", - "futures 0.3.30", + "futures 0.3.31", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -9371,7 +9414,7 @@ dependencies = [ "cfg-if", "clap", "frame-benchmarking-cli", - "futures 0.3.30", + "futures 0.3.31", "log", "polkadot-node-metrics", "polkadot-node-primitives", @@ -9398,7 +9441,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "fatality", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -9432,9 +9475,9 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "derive_more", "fatality", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", - "indexmap 2.3.0", + "indexmap 2.6.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -9469,7 +9512,7 @@ name = "polkadot-gossip-support" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -9495,7 +9538,7 @@ dependencies = [ "async-trait", "bytes", "fatality", - "futures 0.3.30", + "futures 0.3.31", "parity-scale-codec", "parking_lot 0.12.3", "polkadot-node-metrics", @@ -9514,7 +9557,7 @@ name = "polkadot-node-collation-generation" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-primitives", @@ -9534,7 +9577,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "derive_more", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "itertools 0.10.5", "kvdb", @@ -9566,7 +9609,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "bitvec", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "kvdb", "parity-scale-codec", @@ -9589,7 +9632,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "fatality", - "futures 0.3.30", + "futures 0.3.31", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -9607,7 +9650,7 @@ name = "polkadot-node-core-bitfield-signing" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", @@ -9623,7 +9666,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "parity-scale-codec", "polkadot-node-core-pvf", @@ -9643,7 +9686,7 @@ name = "polkadot-node-core-chain-api" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", @@ -9657,7 +9700,7 @@ name = "polkadot-node-core-chain-selection" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "kvdb", "parity-scale-codec", @@ -9675,7 +9718,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "fatality", - "futures 0.3.30", + "futures 0.3.31", "kvdb", "parity-scale-codec", "polkadot-node-primitives", @@ -9694,7 +9737,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "polkadot-node-subsystem", "polkadot-overseer", @@ -9712,7 +9755,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "fatality", - "futures 0.3.30", + "futures 0.3.31", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -9729,7 +9772,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "fatality", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -9748,7 +9791,7 @@ dependencies = [ "array-bytes 6.2.3", "blake3", "cfg-if", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "is_executable", "libc", @@ -9777,7 +9820,7 @@ name = "polkadot-node-core-pvf-checker" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -9795,7 +9838,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "cfg-if", "cpu-time", - "futures 0.3.30", + "futures 0.3.31", "landlock", "libc", "nix 0.27.1", @@ -9820,7 +9863,7 @@ name = "polkadot-node-core-runtime-api" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", @@ -9854,7 +9897,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "bs58 0.5.1", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "log", "parity-scale-codec", @@ -9877,7 +9920,7 @@ dependencies = [ "bitvec", "derive_more", "fatality", - "futures 0.3.30", + "futures 0.3.31", "hex", "parity-scale-codec", "polkadot-node-jaeger", @@ -9898,7 +9941,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "bounded-vec", - "futures 0.3.30", + "futures 0.3.31", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", @@ -9932,7 +9975,7 @@ dependencies = [ "async-trait", "bitvec", "derive_more", - "futures 0.3.30", + "futures 0.3.31", "orchestra", "polkadot-node-jaeger", "polkadot-node-network-protocol", @@ -9960,7 +10003,7 @@ dependencies = [ "async-trait", "derive_more", "fatality", - "futures 0.3.30", + "futures 0.3.31", "futures-channel", "itertools 0.10.5", "kvdb", @@ -9993,7 +10036,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "orchestra", "parking_lot 0.12.3", @@ -10211,7 +10254,7 @@ dependencies = [ "frame-support", "frame-system", "frame-system-rpc-runtime-api", - "futures 0.3.30", + "futures 0.3.31", "hex-literal 0.4.1", "is_executable", "kvdb", @@ -10322,12 +10365,12 @@ name = "polkadot-statement-distribution" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bitvec", "fatality", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", - "indexmap 2.3.0", + "indexmap 2.6.0", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -10375,7 +10418,7 @@ dependencies = [ "polkavm-common", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -10385,7 +10428,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" dependencies = [ "polkavm-derive-impl", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -10406,17 +10449,17 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.2" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite 0.2.14", - "rustix 0.38.34", + "rustix 0.38.37", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -10444,9 +10487,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -10527,7 +10570,7 @@ source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.7. dependencies = [ "case", "num_enum 0.7.3", - "prettyplease 0.2.20", + "prettyplease 0.2.24", "proc-macro2", "quote", "sp-core-hashing", @@ -10600,12 +10643,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "910d41a655dac3b764f1ade94821093d3610248694320cd072303a8eedcf221d" dependencies = [ "proc-macro2", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -10615,11 +10658,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", "impl-serde", "scale-info", - "uint", + "uint 0.9.5", +] + +[[package]] +name = "primitive-types" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" +dependencies = [ + "fixed-hash", + "impl-codec 0.7.0", + "impl-num-traits", + "uint 0.10.0", ] [[package]] @@ -10631,7 +10686,7 @@ dependencies = [ "coarsetime", "crossbeam-queue", "derive_more", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "nanorand", "thiserror", @@ -10659,11 +10714,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.22", ] [[package]] @@ -10698,14 +10753,14 @@ checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" dependencies = [ "unicode-ident", ] @@ -10744,7 +10799,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -10812,7 +10867,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -10826,9 +10881,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" dependencies = [ "cc", ] @@ -10892,9 +10947,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -11022,27 +11077,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom 0.2.15", "libredox", @@ -11078,7 +11124,7 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -11095,14 +11141,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -11116,13 +11162,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -11133,9 +11179,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -11148,11 +11194,11 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-tls", "hyper-util", "ipnet", @@ -11163,7 +11209,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite 0.2.14", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "serde", "serde_json", "serde_urlencoded", @@ -11184,9 +11230,9 @@ dependencies = [ [[package]] name = "reqwest-middleware" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39346a33ddfe6be00cbc17a34ce996818b97b230b87229f10114693becca1268" +checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" dependencies = [ "anyhow", "async-trait", @@ -11206,10 +11252,10 @@ dependencies = [ "anyhow", "async-trait", "chrono", - "futures 0.3.30", + "futures 0.3.31", "getrandom 0.2.15", "http 1.1.0", - "hyper 1.4.1", + "hyper 1.5.0", "parking_lot 0.11.2", "reqwest", "reqwest-middleware", @@ -11221,9 +11267,9 @@ dependencies = [ [[package]] name = "reqwest-tracing" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e45dcad05dc210fdb0278d62a679eb768730af808f8cb552f810da89bdbe76d" +checksum = "bfdd9bfa64c72233d8dd99ab7883efcdefe9e16d46488ecb9228b71a2e2ceb45" dependencies = [ "anyhow", "async-trait", @@ -11271,18 +11317,18 @@ dependencies = [ [[package]] name = "ring" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#665f5f51af5734c7b6d90b985dd6861d4c5b4752" +source = "git+https://github.com/w3f/ring-proof#652286c32f96beb9ce7f5793f5e2c2c923f63b73" dependencies = [ "ark-ec", "ark-ff", "ark-poly", "ark-serialize", "ark-std", - "arrayvec 0.7.4", + "ark-transcript 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.7.6", "blake2 0.10.6", "common", "fflonk", - "merlin", ] [[package]] @@ -11492,7 +11538,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "log", "netlink-packet-route", "netlink-proto", @@ -11531,9 +11577,9 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver 1.0.23", ] @@ -11577,9 +11623,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -11635,19 +11681,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -11661,9 +11706,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ruzstd" @@ -11682,7 +11727,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "pin-project", "static_assertions", ] @@ -11728,7 +11773,7 @@ version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "ip_network", "libp2p", @@ -11756,7 +11801,7 @@ name = "sc-basic-authorship" version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "log", "parity-scale-codec", @@ -11796,7 +11841,7 @@ dependencies = [ "array-bytes 6.2.3", "docify", "log", - "memmap2 0.9.4", + "memmap2 0.9.5", "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", @@ -11819,10 +11864,10 @@ name = "sc-chain-spec-derive" version = "11.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -11835,7 +11880,7 @@ dependencies = [ "chrono", "clap", "fdlimit", - "futures 0.3.30", + "futures 0.3.31", "itertools 0.10.5", "libp2p-identity", "log", @@ -11872,7 +11917,7 @@ version = "28.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "fnv", - "futures 0.3.30", + "futures 0.3.31", "log", "parity-scale-codec", "parking_lot 0.12.3", @@ -11925,7 +11970,7 @@ version = "0.33.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "libp2p-identity", "log", @@ -11950,7 +11995,7 @@ version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "log", "parity-scale-codec", "sc-block-builder", @@ -11980,7 +12025,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-trait", "fork-tree", - "futures 0.3.30", + "futures 0.3.31", "log", "num-bigint", "num-rational", @@ -12014,7 +12059,7 @@ name = "sc-consensus-babe-rpc" version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "jsonrpsee", "sc-consensus-babe", "sc-consensus-epochs", @@ -12040,7 +12085,7 @@ dependencies = [ "async-channel 1.9.0", "async-trait", "fnv", - "futures 0.3.30", + "futures 0.3.31", "log", "parity-scale-codec", "parking_lot 0.12.3", @@ -12072,7 +12117,7 @@ name = "sc-consensus-beefy-rpc" version = "13.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "jsonrpsee", "log", "parity-scale-codec", @@ -12110,7 +12155,7 @@ dependencies = [ "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "log", "parity-scale-codec", @@ -12148,7 +12193,7 @@ version = "0.19.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "finality-grandpa", - "futures 0.3.30", + "futures 0.3.31", "jsonrpsee", "log", "parity-scale-codec", @@ -12168,7 +12213,7 @@ version = "0.33.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "log", "parity-scale-codec", @@ -12243,7 +12288,7 @@ version = "0.33.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "ansi_term", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "log", "sc-client-api", @@ -12274,10 +12319,10 @@ version = "0.4.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "array-bytes 4.2.0", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "blake2 0.10.6", "bytes", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "libp2p-identity", "log", @@ -12309,7 +12354,7 @@ dependencies = [ "bytes", "either", "fnv", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "ip_network", "libp2p", @@ -12347,7 +12392,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-channel 1.9.0", "cid", - "futures 0.3.30", + "futures 0.3.31", "libp2p-identity", "log", "prost 0.12.6", @@ -12367,7 +12412,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-trait", "bitflags 1.3.2", - "futures 0.3.30", + "futures 0.3.31", "libp2p-identity", "parity-scale-codec", "prost-build", @@ -12383,7 +12428,7 @@ version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "ahash 0.8.11", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "libp2p", "log", @@ -12403,7 +12448,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "array-bytes 6.2.3", "async-channel 1.9.0", - "futures 0.3.30", + "futures 0.3.31", "libp2p-identity", "log", "parity-scale-codec", @@ -12426,7 +12471,7 @@ dependencies = [ "async-channel 1.9.0", "async-trait", "fork-tree", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "libp2p", "log", @@ -12459,7 +12504,7 @@ version = "0.33.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "array-bytes 6.2.3", - "futures 0.3.30", + "futures 0.3.31", "libp2p", "log", "parity-scale-codec", @@ -12480,9 +12525,9 @@ dependencies = [ "array-bytes 6.2.3", "bytes", "fnv", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls", "libp2p", "log", @@ -12520,7 +12565,7 @@ name = "sc-rpc" version = "29.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "jsonrpsee", "log", "parity-scale-codec", @@ -12588,7 +12633,7 @@ version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "array-bytes 6.2.3", - "futures 0.3.30", + "futures 0.3.31", "futures-util", "hex", "jsonrpsee", @@ -12620,7 +12665,7 @@ dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "jsonrpsee", "log", @@ -12724,7 +12769,7 @@ version = "27.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "derive_more", - "futures 0.3.30", + "futures 0.3.31", "libc", "log", "rand", @@ -12745,7 +12790,7 @@ version = "15.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "chrono", - "futures 0.3.30", + "futures 0.3.31", "libp2p", "log", "parking_lot 0.12.3", @@ -12793,10 +12838,10 @@ name = "sc-tracing-proc-macro" version = "11.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -12805,7 +12850,7 @@ version = "28.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "linked-hash-map", "log", @@ -12832,7 +12877,7 @@ version = "28.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "log", "parity-scale-codec", "serde", @@ -12848,7 +12893,7 @@ version = "14.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-channel 1.9.0", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "lazy_static", "log", @@ -12877,7 +12922,7 @@ version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 1.0.109", @@ -12885,11 +12930,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -12910,7 +12955,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "curve25519-dalek-ng", "merlin", "rand_core 0.6.4", @@ -12927,7 +12972,7 @@ checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ "aead", "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "curve25519-dalek 4.1.3", "getrandom_or_panic", "merlin", @@ -13025,9 +13070,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -13059,9 +13104,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.205" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -13077,20 +13122,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.205" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] name = "serde_json" -version = "1.0.122" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -13100,9 +13145,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -13213,9 +13258,9 @@ dependencies = [ [[package]] name = "simba" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" +checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" dependencies = [ "approx", "num-complex", @@ -13236,9 +13281,9 @@ dependencies = [ [[package]] name = "similar-asserts" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e041bb827d1bfca18f213411d51b665309f1afb37a04a5d1464530e13779fc0f" +checksum = "cfe85670573cd6f0fa97940f26e7e6601213c3b0555246c24234131f88c5709e" dependencies = [ "console", "similar", @@ -13320,7 +13365,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "async-lock 2.8.0", "atomic-take", "base64 0.21.7", @@ -13456,7 +13501,7 @@ dependencies = [ "base64 0.13.1", "bytes", "flate2", - "futures 0.3.30", + "futures 0.3.31", "http 0.2.12", "httparse", "log", @@ -13493,10 +13538,10 @@ dependencies = [ "Inflector", "blake2 0.10.6", "expander 2.2.1", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -13573,7 +13618,7 @@ name = "sp-blockchain" version = "28.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "log", "parity-scale-codec", "parking_lot 0.12.3", @@ -13592,7 +13637,7 @@ version = "0.32.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "log", "sp-core", "sp-inherents", @@ -13701,7 +13746,7 @@ dependencies = [ "bs58 0.5.1", "dyn-clonable", "ed25519-zebra 3.1.0", - "futures 0.3.30", + "futures 0.3.31", "hash-db", "hash256-std-hasher", "impl-serde", @@ -13712,7 +13757,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "paste", - "primitive-types", + "primitive-types 0.12.2", "rand", "scale-info", "schnorrkel 0.11.4", @@ -13744,7 +13789,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" +source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -13781,7 +13826,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "quote", "sp-crypto-hashing", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -13800,17 +13845,17 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" +source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -13827,7 +13872,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" +source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" dependencies = [ "environmental", "parity-scale-codec", @@ -14032,7 +14077,7 @@ dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "primitive-types", + "primitive-types 0.12.2", "sp-externalities 0.25.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-std 14.0.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", @@ -14045,13 +14090,13 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" +source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "polkavm-derive", - "primitive-types", + "primitive-types 0.13.1", "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk)", "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", @@ -14068,23 +14113,23 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "Inflector", "expander 2.2.1", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" +source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" dependencies = [ "Inflector", "expander 2.2.1", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -14170,7 +14215,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" +source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" [[package]] name = "sp-storage" @@ -14188,7 +14233,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" +source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" dependencies = [ "impl-serde", "parity-scale-codec", @@ -14225,7 +14270,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" +source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" dependencies = [ "parity-scale-codec", "tracing", @@ -14306,7 +14351,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -14325,8 +14370,9 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" +source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" dependencies = [ + "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", @@ -14385,9 +14431,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ "nom", "unicode_categories", @@ -14425,7 +14471,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.3.0", + "indexmap 2.6.0", "log", "memchr", "native-tls", @@ -14505,9 +14551,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.47.0" +version = "1.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba" +checksum = "19409f13998e55816d1c728395af0b52ec066206341d939e22e7766df9b494b8" dependencies = [ "Inflector", "num-format", @@ -14693,7 +14739,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -14744,7 +14790,7 @@ version = "28.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.30", + "futures 0.3.31", "jsonrpsee", "log", "parity-scale-codec", @@ -14762,7 +14808,7 @@ name = "substrate-prometheus-endpoint" version = "0.17.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "hyper 0.14.30", + "hyper 0.14.31", "log", "prometheus", "thiserror", @@ -14858,9 +14904,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ "proc-macro2", "quote", @@ -14893,7 +14939,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -14940,14 +14986,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", - "fastrand 2.1.0", + "fastrand 2.1.1", "once_cell", - "rustix 0.38.34", + "rustix 0.38.37", "windows-sys 0.59.0", ] @@ -14962,12 +15008,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" dependencies = [ - "rustix 0.38.34", - "windows-sys 0.48.0", + "rustix 0.38.37", + "windows-sys 0.59.0", ] [[package]] @@ -14978,9 +15024,9 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] @@ -15002,18 +15048,18 @@ checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -15132,9 +15178,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -15156,7 +15202,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -15204,9 +15250,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite 0.2.14", @@ -15216,9 +15262,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -15246,7 +15292,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit 0.22.22", ] [[package]] @@ -15264,33 +15310,22 @@ version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.3.0", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.3.0", + "indexmap 2.6.0", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.3.0", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow 0.6.20", ] [[package]] @@ -15303,7 +15338,6 @@ dependencies = [ "futures-util", "pin-project", "pin-project-lite 0.2.14", - "tokio", "tower-layer", "tower-service", "tracing", @@ -15329,15 +15363,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -15359,7 +15393,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -15399,10 +15433,10 @@ version = "5.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "expander 2.2.1", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -15522,7 +15556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ace5c192c2741c39c4e74f5456e20331b406625487aea18bdf405dbb08a53fe" dependencies = [ "form_urlencoded", - "futures 0.3.30", + "futures 0.3.31", "indicatif", "reqwest", "reqwest-middleware", @@ -15671,9 +15705,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "uint" @@ -15687,17 +15721,29 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "uint" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" @@ -15710,21 +15756,21 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unicode_categories" @@ -15815,9 +15861,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "w3f-bls" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5da5fa2c6afa2c9158eaa7cd9aee249765eb32b5fb0c63ad8b9e79336a47ec" +checksum = "6a48c48447120a85b0bdb897ba9426a7aa15b4229498a2e19103e8c9368dd4b2" dependencies = [ "ark-bls12-377", "ark-bls12-381", @@ -15885,34 +15931,35 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -15922,9 +15969,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -15932,22 +15979,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-instrument" @@ -16000,9 +16047,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" dependencies = [ "futures-util", "js-sys", @@ -16017,7 +16064,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -16273,9 +16320,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -16442,14 +16489,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.34", + "rustix 0.38.37", ] [[package]] name = "wide" -version = "0.7.26" +version = "0.7.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901e8597c777fa042e9e245bd56c0dc4418c5db3f845b6ff94fbac732c6a0692" +checksum = "b828f995bf1e9622031f8009f8481a85406ce1f4d4588ff746d872043e855690" dependencies = [ "bytemuck", "safe_arch", @@ -16745,9 +16792,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -16859,7 +16906,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -16868,7 +16915,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "log", "nohash-hasher", "parking_lot 0.12.3", @@ -16903,7 +16950,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] @@ -16923,7 +16970,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.82", ] [[package]] From ea831e4ece7e71dcde054062e6dccd767f397e75 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 21 Oct 2024 14:50:28 +0800 Subject: [PATCH 11/17] Fixes --- runtime/crab/src/pallets/tx_pause.rs | 2 +- runtime/koi/src/pallets/tx_pause.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/crab/src/pallets/tx_pause.rs b/runtime/crab/src/pallets/tx_pause.rs index 4d593413e..ae3fb3a9c 100644 --- a/runtime/crab/src/pallets/tx_pause.rs +++ b/runtime/crab/src/pallets/tx_pause.rs @@ -29,7 +29,7 @@ pub struct TxPauseWhitelistedCalls; // false // } // } -#[cfg(not(feature = "runtime-benchmarks"))] +// #[cfg(not(feature = "runtime-benchmarks"))] impl frame_support::traits::Contains> for TxPauseWhitelistedCalls { diff --git a/runtime/koi/src/pallets/tx_pause.rs b/runtime/koi/src/pallets/tx_pause.rs index 430e23dec..c881761a3 100644 --- a/runtime/koi/src/pallets/tx_pause.rs +++ b/runtime/koi/src/pallets/tx_pause.rs @@ -29,7 +29,7 @@ pub struct TxPauseWhitelistedCalls; // false // } // } -#[cfg(not(feature = "runtime-benchmarks"))] +// #[cfg(not(feature = "runtime-benchmarks"))] impl frame_support::traits::Contains> for TxPauseWhitelistedCalls { From 53bf48abb01e0fc614f29bf29900203e5f581664 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 23 Oct 2024 17:37:25 +0800 Subject: [PATCH 12/17] Bump --- Cargo.lock | 1309 +++++++++++++++++++++++++--------------------------- 1 file changed, 631 insertions(+), 678 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fbff29e23..bd45d433e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,18 +23,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.24.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ - "gimli 0.31.1", + "gimli 0.29.0", ] [[package]] -name = "adler2" -version = "2.0.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aead" @@ -200,9 +200,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.90" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "approx" @@ -224,7 +224,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -461,7 +461,7 @@ dependencies = [ "ark-ff", "ark-serialize", "ark-std", - "ark-transcript 0.0.2 (git+https://github.com/w3f/ring-vrf?rev=e9782f9)", + "ark-transcript", "digest 0.10.7", "getrandom_or_panic", "zeroize", @@ -501,20 +501,6 @@ dependencies = [ "rayon", ] -[[package]] -name = "ark-transcript" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "563084372d89271122bd743ef0a608179726f5fad0566008ba55bd0f756489b8" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "digest 0.10.7", - "rand_core 0.6.4", - "sha3", -] - [[package]] name = "ark-transcript" version = "0.0.2" @@ -542,9 +528,9 @@ checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" [[package]] name = "arrayref" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" @@ -557,9 +543,9 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.7.6" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "asn1-rs" @@ -631,13 +617,13 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.1.1", + "fastrand 2.1.0", "futures-lite 2.3.0", "slab", ] @@ -676,9 +662,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.4" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ "async-lock 3.4.0", "cfg-if", @@ -686,11 +672,11 @@ dependencies = [ "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.7.3", - "rustix 0.38.37", + "polling 3.7.2", + "rustix 0.38.34", "slab", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -737,26 +723,26 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.37", + "rustix 0.38.34", "windows-sys 0.48.0", ] [[package]] name = "async-signal" -version = "0.2.10" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" +checksum = "dfb3634b73397aa844481f814fad23bbf07fdb0eabec10f2eb95e58944b1ec32" dependencies = [ - "async-io 2.3.4", + "async-io 2.3.3", "async-lock 3.4.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.37", + "rustix 0.38.34", "signal-hook-registry", "slab", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -767,13 +753,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -818,28 +804,28 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] name = "autocfg" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ - "addr2line 0.24.2", + "addr2line 0.22.0", + "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.36.5", + "object 0.36.3", "rustc-demangle", - "windows-targets 0.52.6", ] [[package]] @@ -940,20 +926,20 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.24", + "prettyplease 0.2.20", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] name = "bip39" -version = "2.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33415e24172c1b7d6066f6d999545375ab8e1d95421d6784bdfff9496f292387" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", "rand", @@ -962,21 +948,11 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "bitcoin-internals" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" - [[package]] name = "bitcoin_hashes" -version = "0.13.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" -dependencies = [ - "bitcoin-internals", - "hex-conservative", -] +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" [[package]] name = "bitflags" @@ -1041,8 +1017,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.6", - "constant_time_eq 0.3.1", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", ] [[package]] @@ -1052,21 +1028,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", - "arrayvec 0.7.6", - "constant_time_eq 0.3.1", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", ] [[package]] name = "blake3" -version = "1.5.4" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" +checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210" dependencies = [ "arrayref", - "arrayvec 0.7.6", + "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq 0.3.1", + "constant_time_eq 0.3.0", ] [[package]] @@ -1102,9 +1078,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.2.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db436177db0d505b1507f03aca56a41442ae6efdf8b6eaa855d73e52c5b078dc" +checksum = "d32385ecb91a31bddaf908e8dcf4a15aef1bcd3913cc03ebfad02ff6d568abc1" dependencies = [ "log", "parity-scale-codec", @@ -1154,7 +1130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.7", "serde", ] @@ -1187,9 +1163,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" [[package]] name = "byteorder" @@ -1199,9 +1175,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2-sys" @@ -1226,9 +1202,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.9" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" dependencies = [ "serde", ] @@ -1264,13 +1240,12 @@ checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" [[package]] name = "cc" -version = "1.1.31" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" dependencies = [ "jobserver", "libc", - "shlex", ] [[package]] @@ -1406,9 +1381,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.20" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" dependencies = [ "clap_builder", "clap_derive", @@ -1416,9 +1391,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" dependencies = [ "anstream", "anstyle", @@ -1429,14 +1404,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -1486,7 +1461,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#652286c32f96beb9ce7f5793f5e2c2c923f63b73" +source = "git+https://github.com/w3f/ring-proof#665f5f51af5734c7b6d90b985dd6861d4c5b4752" dependencies = [ "ark-ec", "ark-ff", @@ -1495,7 +1470,8 @@ dependencies = [ "ark-std", "fflonk", "getrandom_or_panic", - "rand_core 0.6.4", + "merlin", + "rand_chacha 0.3.1", ] [[package]] @@ -1560,9 +1536,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "constcat" @@ -1594,9 +1570,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.7" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core2" @@ -1628,9 +1604,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -1988,7 +1964,7 @@ dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-primitives-core", - "futures 0.3.31", + "futures 0.3.30", "parity-scale-codec", "parking_lot 0.12.3", "polkadot-node-primitives", @@ -2016,7 +1992,7 @@ dependencies = [ "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.31", + "futures 0.3.30", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -2055,7 +2031,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "dyn-clone", - "futures 0.3.31", + "futures 0.3.30", "log", "parity-scale-codec", "polkadot-primitives", @@ -2096,7 +2072,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-trait", "cumulus-relay-chain-interface", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "parity-scale-codec", "parking_lot 0.12.3", @@ -2144,7 +2120,7 @@ dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "parity-scale-codec", "polkadot-node-primitives", @@ -2175,7 +2151,7 @@ dependencies = [ "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", - "futures 0.3.31", + "futures 0.3.30", "polkadot-primitives", "sc-client-api", "sc-consensus", @@ -2271,10 +2247,10 @@ name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -2417,7 +2393,7 @@ dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "polkadot-cli", "polkadot-service", @@ -2440,7 +2416,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-trait", "cumulus-primitives-core", - "futures 0.3.31", + "futures 0.3.30", "jsonrpsee-core", "parity-scale-codec", "polkadot-overseer", @@ -2461,7 +2437,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", - "futures 0.3.31", + "futures 0.3.30", "parking_lot 0.12.3", "polkadot-availability-recovery", "polkadot-collator-protocol", @@ -2501,7 +2477,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "either", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "jsonrpsee", "parity-scale-codec", @@ -2582,7 +2558,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -2600,9 +2576,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.129" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdc8cca144dce1c4981b5c9ab748761619979e515c3d53b5df385c677d1d007" +checksum = "273dcfd3acd4e1e276af13ed2a43eea7001318823e7a726a6b3ed39b4acc0b82" dependencies = [ "cc", "cxxbridge-flags", @@ -2612,9 +2588,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.129" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5764c3142ab44fcf857101d12c0ddf09c34499900557c764f5ad0597159d1fc" +checksum = "d8b2766fbd92be34e9ed143898fce6c572dc009de39506ed6903e5a05b68914e" dependencies = [ "cc", "codespan-reporting", @@ -2622,24 +2598,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] name = "cxxbridge-flags" -version = "1.0.129" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d422aff542b4fa28c2ce8e5cc202d42dbf24702345c1fba3087b2d3f8a1b90ff" +checksum = "839fcd5e43464614ffaa989eaf1c139ef1f0c51672a1ed08023307fa1b909ccd" [[package]] name = "cxxbridge-macro" -version = "1.0.129" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1719100f31492cd6adeeab9a0f46cdbc846e615fdb66d7b398aa46ec7fdd06f" +checksum = "4b2c1c1776b986979be68bb2285da855f8d8a35851a769fca8740df7c3d07877" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -2674,7 +2650,7 @@ dependencies = [ "fp-rpc", "frame-benchmarking", "frame-benchmarking-cli", - "futures 0.3.31", + "futures 0.3.30", "jsonrpsee", "koi-runtime", "log", @@ -3122,7 +3098,7 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -3135,7 +3111,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -3224,7 +3200,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -3238,8 +3214,8 @@ dependencies = [ "ark-secret-scalar", "ark-serialize", "ark-std", - "ark-transcript 0.0.2 (git+https://github.com/w3f/ring-vrf?rev=e9782f9)", - "arrayvec 0.7.6", + "ark-transcript", + "arrayvec 0.7.4", "zeroize", ] @@ -3264,7 +3240,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.82", + "syn 2.0.72", "termcolor", "toml 0.8.19", "walkdir", @@ -3461,7 +3437,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -3472,7 +3448,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -3521,7 +3497,7 @@ dependencies = [ "serde", "sha3", "thiserror", - "uint 0.9.5", + "uint", ] [[package]] @@ -3532,7 +3508,7 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", "scale-info", @@ -3565,12 +3541,12 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", - "primitive-types 0.12.2", + "primitive-types", "scale-info", - "uint 0.9.5", + "uint", ] [[package]] @@ -3625,7 +3601,7 @@ dependencies = [ "evm-runtime", "log", "parity-scale-codec", - "primitive-types 0.12.2", + "primitive-types", "rlp", "scale-info", "serde", @@ -3639,7 +3615,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1da6cedc5cedb4208e59467106db0d1f50db01b920920589f8e672c02fdc04f" dependencies = [ "parity-scale-codec", - "primitive-types 0.12.2", + "primitive-types", "scale-info", "serde", ] @@ -3653,7 +3629,7 @@ dependencies = [ "environmental", "evm-core", "evm-runtime", - "primitive-types 0.12.2", + "primitive-types", ] [[package]] @@ -3665,7 +3641,7 @@ dependencies = [ "auto_impl", "environmental", "evm-core", - "primitive-types 0.12.2", + "primitive-types", "sha3", ] @@ -3690,7 +3666,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", ] [[package]] @@ -3714,10 +3690,10 @@ dependencies = [ "blake2 0.10.6", "file-guard", "fs-err", - "prettyplease 0.2.24", + "prettyplease 0.2.20", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -3737,9 +3713,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fatality" @@ -3806,7 +3782,7 @@ dependencies = [ "fp-consensus", "fp-rpc", "fp-storage", - "futures 0.3.31", + "futures 0.3.30", "kvdb-rocksdb", "log", "parity-db", @@ -3834,7 +3810,7 @@ dependencies = [ "fc-storage", "fp-consensus", "fp-rpc", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "log", "parking_lot 0.12.3", @@ -3863,7 +3839,7 @@ dependencies = [ "fp-evm", "fp-rpc", "fp-storage", - "futures 0.3.31", + "futures 0.3.30", "hex", "jsonrpsee", "libsecp256k1", @@ -3997,14 +3973,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.25" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "libredox", - "windows-sys 0.59.0", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] @@ -4014,7 +3990,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" dependencies = [ "either", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "log", "num-traits", @@ -4043,9 +4019,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" dependencies = [ "crc32fast", "libz-sys", @@ -4063,9 +4039,9 @@ dependencies = [ [[package]] name = "flume" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ "futures-core", "futures-sink", @@ -4292,10 +4268,10 @@ name = "frame-election-provider-solution-type" version = "13.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -4365,7 +4341,7 @@ name = "frame-remote-externalities" version = "0.35.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "indicatif", "jsonrpsee", "log", @@ -4439,7 +4415,7 @@ dependencies = [ "proc-macro2", "quote", "sp-crypto-hashing", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -4448,10 +4424,10 @@ version = "10.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -4461,7 +4437,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -4545,7 +4521,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" dependencies = [ - "rustix 0.38.37", + "rustix 0.38.34", "windows-sys 0.48.0", ] @@ -4563,9 +4539,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -4578,9 +4554,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -4588,15 +4564,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -4617,9 +4593,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -4642,7 +4618,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.1.1", + "fastrand 2.1.0", "futures-core", "futures-io", "parking", @@ -4651,13 +4627,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -4673,15 +4649,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" @@ -4691,9 +4667,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures 0.1.31", "futures-channel", @@ -4804,9 +4780,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -4837,7 +4813,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.6.0", + "indexmap 2.3.0", "slab", "tokio", "tokio-util", @@ -4846,9 +4822,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" dependencies = [ "atomic-waker", "bytes", @@ -4856,7 +4832,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.6.0", + "indexmap 2.3.0", "slab", "tokio", "tokio-util", @@ -4921,12 +4897,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hashbrown" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" - [[package]] name = "hashlink" version = "0.8.4" @@ -4972,12 +4942,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hex-conservative" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" - [[package]] name = "hex-literal" version = "0.3.4" @@ -5123,9 +5087,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.9.5" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -5141,9 +5105,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.31" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -5165,14 +5129,14 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.6", + "h2 0.4.5", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -5191,7 +5155,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.31", + "hyper 0.14.30", "log", "rustls 0.21.12", "rustls-native-certs", @@ -5207,7 +5171,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.5.0", + "hyper 1.4.1", "hyper-util", "native-tls", "tokio", @@ -5217,28 +5181,29 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.5.0", + "hyper 1.4.1", "pin-project-lite 0.2.14", "socket2 0.5.7", "tokio", + "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.61" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -5294,10 +5259,10 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io 2.3.4", + "async-io 2.3.3", "core-foundation", "fnv", - "futures 0.3.31", + "futures 0.3.30", "if-addrs", "ipnet", "log", @@ -5316,26 +5281,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-codec" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67aa010c1e3da95bf151bd8b4c059b2ed7e75387cdb969b4f8f2723a43f9941" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-num-traits" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "803d15461ab0dcc56706adf266158acbc44ccf719bf7d0af30705f58b90a4b8c" -dependencies = [ - "integer-sqrt", - "num-traits", - "uint 0.10.0", -] - [[package]] name = "impl-rlp" version = "0.3.0" @@ -5397,12 +5342,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.14.5", ] [[package]] @@ -5491,26 +5436,26 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.13" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.4.0", + "hermit-abi 0.3.9", "libc", "windows-sys 0.52.0", ] [[package]] name = "is_executable" -version = "1.0.4" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a1b5bad6f9072935961dfbf1cced2f3d129963d091b6f69f007fe04e758ae2" +checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" dependencies = [ "winapi", ] @@ -5565,18 +5510,18 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.20.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138572befc78a9793240645926f30161f8b4143d2be18d09e44ed9814bd7ee2c" +checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-client", @@ -5590,9 +5535,9 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.20.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c671353e4adf926799107bd7f5724a06b6bc0a333db442a0843c58640bdd0c1" +checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ "futures-util", "http 0.2.12", @@ -5610,9 +5555,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.20.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f24ea59b037b6b9b0e2ebe2c30a3e782b56bd7c76dcc5d6d70ba55d442af56e3" +checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" dependencies = [ "anyhow", "async-lock 2.8.0", @@ -5620,7 +5565,7 @@ dependencies = [ "beef", "futures-timer", "futures-util", - "hyper 0.14.31", + "hyper 0.14.30", "jsonrpsee-types", "parking_lot 0.12.3", "rand", @@ -5635,12 +5580,12 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.20.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c7b9f95208927653e7965a98525e7fc641781cab89f0e27c43fa2974405683" +checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" dependencies = [ "async-trait", - "hyper 0.14.31", + "hyper 0.14.30", "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", @@ -5655,9 +5600,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.20.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcc0eba68ba205452bcb4c7b80a79ddcb3bf36c261a841b239433142db632d24" +checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" dependencies = [ "heck 0.4.1", "proc-macro-crate 1.1.3", @@ -5668,13 +5613,13 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.20.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a482bc4e25eebd0adb61a3468c722763c381225bd3ec46e926f709df8a8eb548" +checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.31", + "hyper 0.14.30", "jsonrpsee-core", "jsonrpsee-types", "route-recognizer", @@ -5691,9 +5636,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.20.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3264e339143fe37ed081953842ee67bfafa99e3b91559bdded6e4abd8fc8535e" +checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" dependencies = [ "anyhow", "beef", @@ -5705,9 +5650,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.20.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d06eeabbb55f0af8405288390a358ebcceb6e79e1390741e6f152309c4d6076" +checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" dependencies = [ "http 0.2.12", "jsonrpsee-client-transport", @@ -5718,9 +5663,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.4" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", @@ -5904,9 +5849,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" @@ -5931,7 +5876,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" dependencies = [ "bytes", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "getrandom 0.2.15", "instant", @@ -5989,7 +5934,7 @@ checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ "either", "fnv", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "instant", "libp2p-identity", @@ -6015,7 +5960,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "libp2p-core", "log", "parking_lot 0.12.3", @@ -6031,7 +5976,7 @@ checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", "either", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "libp2p-core", "libp2p-identity", @@ -6069,12 +6014,12 @@ version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ - "arrayvec 0.7.6", + "arrayvec 0.7.4", "asynchronous-codec", "bytes", "either", "fnv", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "instant", "libp2p-core", @@ -6086,7 +6031,7 @@ dependencies = [ "sha2 0.10.8", "smallvec", "thiserror", - "uint 0.9.5", + "uint", "unsigned-varint", "void", ] @@ -6098,7 +6043,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", - "futures 0.3.31", + "futures 0.3.30", "if-watch", "libp2p-core", "libp2p-identity", @@ -6134,7 +6079,7 @@ checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", - "futures 0.3.31", + "futures 0.3.30", "libp2p-core", "libp2p-identity", "log", @@ -6156,7 +6101,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ "either", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "instant", "libp2p-core", @@ -6173,7 +6118,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "if-watch", "libp2p-core", @@ -6195,7 +6140,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "instant", "libp2p-core", "libp2p-identity", @@ -6212,7 +6157,7 @@ checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ "either", "fnv", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "instant", "libp2p-core", @@ -6242,7 +6187,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "if-watch", "libc", @@ -6258,7 +6203,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "futures-rustls", "libp2p-core", "libp2p-identity", @@ -6277,7 +6222,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -6292,7 +6237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ "either", - "futures 0.3.31", + "futures 0.3.30", "futures-rustls", "libp2p-core", "log", @@ -6310,7 +6255,7 @@ version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "libp2p-core", "log", "thiserror", @@ -6325,7 +6270,6 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall 0.5.7", ] [[package]] @@ -6404,9 +6348,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.20" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" +checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" dependencies = [ "cc", "pkg-config", @@ -6439,9 +6383,9 @@ dependencies = [ [[package]] name = "linregress" -version = "0.5.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9eda9dcf4f2a99787827661f312ac3219292549c2ee992bf9a6248ffb066bf7" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ "nalgebra", ] @@ -6518,18 +6462,19 @@ dependencies = [ [[package]] name = "lz4" -version = "1.28.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d1febb2b4a79ddd1980eede06a8f7902197960aa0383ffcfdd62fe723036725" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" dependencies = [ + "libc", "lz4-sys", ] [[package]] name = "lz4-sys" -version = "1.11.1+lz4-1.10.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" dependencies = [ "cc", "libc", @@ -6553,7 +6498,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -6567,7 +6512,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -6578,7 +6523,7 @@ checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -6589,7 +6534,7 @@ checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -6656,7 +6601,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.37", + "rustix 0.38.34", ] [[package]] @@ -6670,9 +6615,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.5" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] @@ -6713,7 +6658,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "rand", "thrift", ] @@ -6732,18 +6677,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ - "adler2", + "adler", ] [[package]] name = "mio" -version = "1.0.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ "hermit-abi 0.3.9", "libc", @@ -6758,7 +6703,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" dependencies = [ "arrayref", - "arrayvec 0.7.6", + "arrayvec 0.7.4", "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", @@ -6781,7 +6726,7 @@ name = "mmr-gadget" version = "29.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "log", "parity-scale-codec", "sc-client-api", @@ -6894,7 +6839,7 @@ dependencies = [ "ethereum", "ethereum-types", "fc-rpc-core", - "futures 0.3.31", + "futures 0.3.30", "jsonrpsee", "moonbeam-client-evm-tracing", "moonbeam-rpc-core-types", @@ -6909,7 +6854,7 @@ version = "0.6.0" source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v1.7.2#0000e6dc61d7a16cb7a3b3e9a4947c3437e1ef85" dependencies = [ "ethereum-types", - "futures 0.3.31", + "futures 0.3.30", "jsonrpsee", "moonbeam-client-evm-tracing", "moonbeam-rpc-core-types", @@ -6941,7 +6886,7 @@ dependencies = [ "fc-rpc-core", "fc-storage", "fp-rpc", - "futures 0.3.31", + "futures 0.3.30", "hex-literal 0.3.4", "jsonrpsee", "moonbeam-client-evm-tracing", @@ -6989,7 +6934,7 @@ dependencies = [ "fc-rpc-core", "fc-storage", "fp-rpc", - "futures 0.3.31", + "futures 0.3.30", "jsonrpsee", "log", "moonbeam-client-evm-tracing", @@ -7138,7 +7083,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", "synstructure 0.13.1", ] @@ -7155,7 +7100,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ "bytes", - "futures 0.3.31", + "futures 0.3.30", "log", "pin-project", "smallvec", @@ -7164,12 +7109,13 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.33.1" +version = "0.32.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf139e93ad757869338ad85239cb1d6c067b23b94e5846e637ca6328ee4be60" +checksum = "7b5c17de023a86f59ed79891b2e5d5a94c705dbe904a5b5c9c952ea6221b03e4" dependencies = [ "approx", "matrixmultiply", + "nalgebra-macros", "num-complex", "num-rational", "num-traits", @@ -7177,6 +7123,17 @@ dependencies = [ "typenum", ] +[[package]] +name = "nalgebra-macros" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "names" version = "0.14.0" @@ -7254,7 +7211,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ "bytes", - "futures 0.3.31", + "futures 0.3.30", "log", "netlink-packet-core", "netlink-sys", @@ -7269,7 +7226,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "416060d346fbaf1f23f9512963e3e878f1a78e707cb699ba9215761754244307" dependencies = [ "bytes", - "futures 0.3.31", + "futures 0.3.30", "libc", "log", "tokio", @@ -7386,7 +7343,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.6", + "arrayvec 0.7.4", "itoa", ] @@ -7476,10 +7433,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -7502,9 +7459,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -7520,9 +7477,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -7538,9 +7495,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.68" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -7559,7 +7516,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -7570,9 +7527,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.104" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -7623,7 +7580,7 @@ dependencies = [ "glob", "once_cell", "opentelemetry 0.22.0", - "ordered-float 4.4.0", + "ordered-float 4.2.2", "percent-encoding", "rand", "thiserror", @@ -7643,7 +7600,7 @@ dependencies = [ "lazy_static", "once_cell", "opentelemetry 0.23.0", - "ordered-float 4.4.0", + "ordered-float 4.2.2", "percent-encoding", "rand", "thiserror", @@ -7663,7 +7620,7 @@ checksum = "92829eef0328a3d1cd22a02c0e51deb92a5362df3e7d21a4e9bdc38934694e66" dependencies = [ "async-trait", "dyn-clonable", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "orchestra-proc-macro", "pin-project", @@ -7679,10 +7636,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1344346d5af32c95bbddea91b18a88cc83eac394192d20ef2fc4c40a74332355" dependencies = [ "expander 2.2.1", - "indexmap 2.6.0", + "indexmap 2.3.0", "itertools 0.11.0", "petgraph", - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -7699,9 +7656,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.4.0" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e7ccb95e240b7c9506a3d544f10d935e142cc90b0a1d56954fb44d89ad6b97" +checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" dependencies = [ "num-traits", ] @@ -8773,10 +8730,10 @@ name = "pallet-staking-reward-curve" version = "11.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -9066,7 +9023,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ - "arrayvec 0.7.6", + "arrayvec 0.7.4", "bitvec", "byte-slice-cast", "bytes", @@ -9081,7 +9038,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -9101,9 +9058,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.2.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -9148,7 +9105,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.7", + "redox_syscall 0.5.3", "smallvec", "windows-targets 0.52.6", ] @@ -9206,9 +9163,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.14" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -9217,9 +9174,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.14" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" +checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" dependencies = [ "pest", "pest_generator", @@ -9227,22 +9184,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.14" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" +checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] name = "pest_meta" -version = "2.7.14" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" +checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" dependencies = [ "once_cell", "pest", @@ -9256,27 +9213,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.6.0", + "indexmap 2.3.0", ] [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -9299,12 +9256,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" dependencies = [ "atomic-waker", - "fastrand 2.1.1", + "fastrand 2.1.0", "futures-io", ] @@ -9320,9 +9277,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polkadot-approval-distribution" @@ -9330,7 +9287,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "bitvec", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "itertools 0.10.5", "polkadot-node-jaeger", @@ -9350,7 +9307,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "always-assert", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -9367,7 +9324,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "derive_more", "fatality", - "futures 0.3.31", + "futures 0.3.30", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -9390,7 +9347,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-trait", "fatality", - "futures 0.3.31", + "futures 0.3.30", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -9414,7 +9371,7 @@ dependencies = [ "cfg-if", "clap", "frame-benchmarking-cli", - "futures 0.3.31", + "futures 0.3.30", "log", "polkadot-node-metrics", "polkadot-node-primitives", @@ -9441,7 +9398,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "fatality", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -9475,9 +9432,9 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "derive_more", "fatality", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", - "indexmap 2.6.0", + "indexmap 2.3.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -9512,7 +9469,7 @@ name = "polkadot-gossip-support" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -9538,7 +9495,7 @@ dependencies = [ "async-trait", "bytes", "fatality", - "futures 0.3.31", + "futures 0.3.30", "parity-scale-codec", "parking_lot 0.12.3", "polkadot-node-metrics", @@ -9557,7 +9514,7 @@ name = "polkadot-node-collation-generation" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-primitives", @@ -9577,7 +9534,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "derive_more", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "itertools 0.10.5", "kvdb", @@ -9609,7 +9566,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "bitvec", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "kvdb", "parity-scale-codec", @@ -9632,7 +9589,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "fatality", - "futures 0.3.31", + "futures 0.3.30", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -9650,7 +9607,7 @@ name = "polkadot-node-core-bitfield-signing" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", @@ -9666,7 +9623,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "parity-scale-codec", "polkadot-node-core-pvf", @@ -9686,7 +9643,7 @@ name = "polkadot-node-core-chain-api" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", @@ -9700,7 +9657,7 @@ name = "polkadot-node-core-chain-selection" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "kvdb", "parity-scale-codec", @@ -9718,7 +9675,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "fatality", - "futures 0.3.31", + "futures 0.3.30", "kvdb", "parity-scale-codec", "polkadot-node-primitives", @@ -9737,7 +9694,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "polkadot-node-subsystem", "polkadot-overseer", @@ -9755,7 +9712,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "fatality", - "futures 0.3.31", + "futures 0.3.30", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -9772,7 +9729,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "fatality", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -9791,7 +9748,7 @@ dependencies = [ "array-bytes 6.2.3", "blake3", "cfg-if", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "is_executable", "libc", @@ -9820,7 +9777,7 @@ name = "polkadot-node-core-pvf-checker" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -9838,7 +9795,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "cfg-if", "cpu-time", - "futures 0.3.31", + "futures 0.3.30", "landlock", "libc", "nix 0.27.1", @@ -9863,7 +9820,7 @@ name = "polkadot-node-core-runtime-api" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", @@ -9897,7 +9854,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "bs58 0.5.1", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -9920,7 +9877,7 @@ dependencies = [ "bitvec", "derive_more", "fatality", - "futures 0.3.31", + "futures 0.3.30", "hex", "parity-scale-codec", "polkadot-node-jaeger", @@ -9941,7 +9898,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "bitvec", "bounded-vec", - "futures 0.3.31", + "futures 0.3.30", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", @@ -9975,7 +9932,7 @@ dependencies = [ "async-trait", "bitvec", "derive_more", - "futures 0.3.31", + "futures 0.3.30", "orchestra", "polkadot-node-jaeger", "polkadot-node-network-protocol", @@ -10003,7 +9960,7 @@ dependencies = [ "async-trait", "derive_more", "fatality", - "futures 0.3.31", + "futures 0.3.30", "futures-channel", "itertools 0.10.5", "kvdb", @@ -10036,7 +9993,7 @@ version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "orchestra", "parking_lot 0.12.3", @@ -10254,7 +10211,7 @@ dependencies = [ "frame-support", "frame-system", "frame-system-rpc-runtime-api", - "futures 0.3.31", + "futures 0.3.30", "hex-literal 0.4.1", "is_executable", "kvdb", @@ -10365,12 +10322,12 @@ name = "polkadot-statement-distribution" version = "7.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "arrayvec 0.7.6", + "arrayvec 0.7.4", "bitvec", "fatality", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", - "indexmap 2.6.0", + "indexmap 2.3.0", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -10418,7 +10375,7 @@ dependencies = [ "polkavm-common", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -10428,7 +10385,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" dependencies = [ "polkavm-derive-impl", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -10449,17 +10406,17 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.3" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite 0.2.14", - "rustix 0.38.37", + "rustix 0.38.34", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -10487,9 +10444,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -10570,7 +10527,7 @@ source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.7. dependencies = [ "case", "num_enum 0.7.3", - "prettyplease 0.2.24", + "prettyplease 0.2.20", "proc-macro2", "quote", "sp-core-hashing", @@ -10643,12 +10600,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.24" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910d41a655dac3b764f1ade94821093d3610248694320cd072303a8eedcf221d" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -10658,23 +10615,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", "scale-info", - "uint 0.9.5", -] - -[[package]] -name = "primitive-types" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" -dependencies = [ - "fixed-hash", - "impl-codec 0.7.0", - "impl-num-traits", - "uint 0.10.0", + "uint", ] [[package]] @@ -10686,7 +10631,7 @@ dependencies = [ "coarsetime", "crossbeam-queue", "derive_more", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "nanorand", "thiserror", @@ -10714,11 +10659,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.2.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit 0.22.22", + "toml_edit 0.21.1", ] [[package]] @@ -10753,14 +10698,14 @@ checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] name = "proc-macro2" -version = "1.0.88" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -10799,7 +10744,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -10867,7 +10812,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -10881,9 +10826,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.23" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" dependencies = [ "cc", ] @@ -10947,9 +10892,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -11077,18 +11022,27 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom 0.2.15", "libredox", @@ -11124,7 +11078,7 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -11141,14 +11095,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", - "regex-syntax 0.8.5", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -11162,13 +11116,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax 0.8.4", ] [[package]] @@ -11179,9 +11133,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -11194,11 +11148,11 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.6", + "h2 0.4.5", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.0", + "hyper 1.4.1", "hyper-tls", "hyper-util", "ipnet", @@ -11209,7 +11163,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite 0.2.14", - "rustls-pemfile 2.2.0", + "rustls-pemfile 2.1.3", "serde", "serde_json", "serde_urlencoded", @@ -11230,9 +11184,9 @@ dependencies = [ [[package]] name = "reqwest-middleware" -version = "0.3.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" +checksum = "39346a33ddfe6be00cbc17a34ce996818b97b230b87229f10114693becca1268" dependencies = [ "anyhow", "async-trait", @@ -11252,10 +11206,10 @@ dependencies = [ "anyhow", "async-trait", "chrono", - "futures 0.3.31", + "futures 0.3.30", "getrandom 0.2.15", "http 1.1.0", - "hyper 1.5.0", + "hyper 1.4.1", "parking_lot 0.11.2", "reqwest", "reqwest-middleware", @@ -11267,9 +11221,9 @@ dependencies = [ [[package]] name = "reqwest-tracing" -version = "0.5.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdd9bfa64c72233d8dd99ab7883efcdefe9e16d46488ecb9228b71a2e2ceb45" +checksum = "4e45dcad05dc210fdb0278d62a679eb768730af808f8cb552f810da89bdbe76d" dependencies = [ "anyhow", "async-trait", @@ -11317,18 +11271,18 @@ dependencies = [ [[package]] name = "ring" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#652286c32f96beb9ce7f5793f5e2c2c923f63b73" +source = "git+https://github.com/w3f/ring-proof#665f5f51af5734c7b6d90b985dd6861d4c5b4752" dependencies = [ "ark-ec", "ark-ff", "ark-poly", "ark-serialize", "ark-std", - "ark-transcript 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec 0.7.6", + "arrayvec 0.7.4", "blake2 0.10.6", "common", "fflonk", + "merlin", ] [[package]] @@ -11538,7 +11492,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "log", "netlink-packet-route", "netlink-proto", @@ -11577,9 +11531,9 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver 1.0.23", ] @@ -11623,9 +11577,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.6.0", "errno", @@ -11681,18 +11635,19 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.2.0" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ + "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" @@ -11706,9 +11661,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ruzstd" @@ -11727,7 +11682,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "pin-project", "static_assertions", ] @@ -11773,7 +11728,7 @@ version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "ip_network", "libp2p", @@ -11801,7 +11756,7 @@ name = "sc-basic-authorship" version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -11841,7 +11796,7 @@ dependencies = [ "array-bytes 6.2.3", "docify", "log", - "memmap2 0.9.5", + "memmap2 0.9.4", "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", @@ -11864,10 +11819,10 @@ name = "sc-chain-spec-derive" version = "11.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -11880,7 +11835,7 @@ dependencies = [ "chrono", "clap", "fdlimit", - "futures 0.3.31", + "futures 0.3.30", "itertools 0.10.5", "libp2p-identity", "log", @@ -11917,7 +11872,7 @@ version = "28.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "fnv", - "futures 0.3.31", + "futures 0.3.30", "log", "parity-scale-codec", "parking_lot 0.12.3", @@ -11970,7 +11925,7 @@ version = "0.33.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "libp2p-identity", "log", @@ -11995,7 +11950,7 @@ version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "log", "parity-scale-codec", "sc-block-builder", @@ -12025,7 +11980,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-trait", "fork-tree", - "futures 0.3.31", + "futures 0.3.30", "log", "num-bigint", "num-rational", @@ -12059,7 +12014,7 @@ name = "sc-consensus-babe-rpc" version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "jsonrpsee", "sc-consensus-babe", "sc-consensus-epochs", @@ -12085,7 +12040,7 @@ dependencies = [ "async-channel 1.9.0", "async-trait", "fnv", - "futures 0.3.31", + "futures 0.3.30", "log", "parity-scale-codec", "parking_lot 0.12.3", @@ -12117,7 +12072,7 @@ name = "sc-consensus-beefy-rpc" version = "13.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "jsonrpsee", "log", "parity-scale-codec", @@ -12155,7 +12110,7 @@ dependencies = [ "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -12193,7 +12148,7 @@ version = "0.19.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "finality-grandpa", - "futures 0.3.31", + "futures 0.3.30", "jsonrpsee", "log", "parity-scale-codec", @@ -12213,7 +12168,7 @@ version = "0.33.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -12288,7 +12243,7 @@ version = "0.33.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "ansi_term", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "log", "sc-client-api", @@ -12319,10 +12274,10 @@ version = "0.4.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "array-bytes 4.2.0", - "arrayvec 0.7.6", + "arrayvec 0.7.4", "blake2 0.10.6", "bytes", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "libp2p-identity", "log", @@ -12354,7 +12309,7 @@ dependencies = [ "bytes", "either", "fnv", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "ip_network", "libp2p", @@ -12392,7 +12347,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-channel 1.9.0", "cid", - "futures 0.3.31", + "futures 0.3.30", "libp2p-identity", "log", "prost 0.12.6", @@ -12412,7 +12367,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "async-trait", "bitflags 1.3.2", - "futures 0.3.31", + "futures 0.3.30", "libp2p-identity", "parity-scale-codec", "prost-build", @@ -12428,7 +12383,7 @@ version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "ahash 0.8.11", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "libp2p", "log", @@ -12448,7 +12403,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "array-bytes 6.2.3", "async-channel 1.9.0", - "futures 0.3.31", + "futures 0.3.30", "libp2p-identity", "log", "parity-scale-codec", @@ -12471,7 +12426,7 @@ dependencies = [ "async-channel 1.9.0", "async-trait", "fork-tree", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "libp2p", "log", @@ -12504,7 +12459,7 @@ version = "0.33.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "array-bytes 6.2.3", - "futures 0.3.31", + "futures 0.3.30", "libp2p", "log", "parity-scale-codec", @@ -12525,9 +12480,9 @@ dependencies = [ "array-bytes 6.2.3", "bytes", "fnv", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", - "hyper 0.14.31", + "hyper 0.14.30", "hyper-rustls", "libp2p", "log", @@ -12565,7 +12520,7 @@ name = "sc-rpc" version = "29.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "jsonrpsee", "log", "parity-scale-codec", @@ -12633,7 +12588,7 @@ version = "0.34.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "array-bytes 6.2.3", - "futures 0.3.31", + "futures 0.3.30", "futures-util", "hex", "jsonrpsee", @@ -12665,7 +12620,7 @@ dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "jsonrpsee", "log", @@ -12769,7 +12724,7 @@ version = "27.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "derive_more", - "futures 0.3.31", + "futures 0.3.30", "libc", "log", "rand", @@ -12790,7 +12745,7 @@ version = "15.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "chrono", - "futures 0.3.31", + "futures 0.3.30", "libp2p", "log", "parking_lot 0.12.3", @@ -12838,10 +12793,10 @@ name = "sc-tracing-proc-macro" version = "11.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -12850,7 +12805,7 @@ version = "28.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "linked-hash-map", "log", @@ -12877,7 +12832,7 @@ version = "28.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "log", "parity-scale-codec", "serde", @@ -12893,7 +12848,7 @@ version = "14.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-channel 1.9.0", - "futures 0.3.31", + "futures 0.3.30", "futures-timer", "lazy_static", "log", @@ -12922,7 +12877,7 @@ version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -12930,11 +12885,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -12955,7 +12910,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" dependencies = [ "arrayref", - "arrayvec 0.7.6", + "arrayvec 0.7.4", "curve25519-dalek-ng", "merlin", "rand_core 0.6.4", @@ -12972,7 +12927,7 @@ checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ "aead", "arrayref", - "arrayvec 0.7.6", + "arrayvec 0.7.4", "curve25519-dalek 4.1.3", "getrandom_or_panic", "merlin", @@ -13070,9 +13025,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -13104,9 +13059,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" dependencies = [ "serde_derive", ] @@ -13122,20 +13077,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ "itoa", "memchr", @@ -13145,9 +13100,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -13258,9 +13213,9 @@ dependencies = [ [[package]] name = "simba" -version = "0.9.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" dependencies = [ "approx", "num-complex", @@ -13281,9 +13236,9 @@ dependencies = [ [[package]] name = "similar-asserts" -version = "1.6.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe85670573cd6f0fa97940f26e7e6601213c3b0555246c24234131f88c5709e" +checksum = "e041bb827d1bfca18f213411d51b665309f1afb37a04a5d1464530e13779fc0f" dependencies = [ "console", "similar", @@ -13365,7 +13320,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" dependencies = [ - "arrayvec 0.7.6", + "arrayvec 0.7.4", "async-lock 2.8.0", "atomic-take", "base64 0.21.7", @@ -13501,7 +13456,7 @@ dependencies = [ "base64 0.13.1", "bytes", "flate2", - "futures 0.3.31", + "futures 0.3.30", "http 0.2.12", "httparse", "log", @@ -13538,10 +13493,10 @@ dependencies = [ "Inflector", "blake2 0.10.6", "expander 2.2.1", - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -13618,7 +13573,7 @@ name = "sp-blockchain" version = "28.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "log", "parity-scale-codec", "parking_lot 0.12.3", @@ -13637,7 +13592,7 @@ version = "0.32.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "async-trait", - "futures 0.3.31", + "futures 0.3.30", "log", "sp-core", "sp-inherents", @@ -13746,7 +13701,7 @@ dependencies = [ "bs58 0.5.1", "dyn-clonable", "ed25519-zebra 3.1.0", - "futures 0.3.31", + "futures 0.3.30", "hash-db", "hash256-std-hasher", "impl-serde", @@ -13757,7 +13712,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "paste", - "primitive-types 0.12.2", + "primitive-types", "rand", "scale-info", "schnorrkel 0.11.4", @@ -13789,7 +13744,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" +source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -13826,7 +13781,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "quote", "sp-crypto-hashing", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -13845,17 +13800,17 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" +source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -13872,7 +13827,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" +source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" dependencies = [ "environmental", "parity-scale-codec", @@ -14077,7 +14032,7 @@ dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "primitive-types 0.12.2", + "primitive-types", "sp-externalities 0.25.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", "sp-std 14.0.0 (git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2)", @@ -14090,13 +14045,13 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" +source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "polkavm-derive", - "primitive-types 0.13.1", + "primitive-types", "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk)", "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", @@ -14113,23 +14068,23 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po dependencies = [ "Inflector", "expander 2.2.1", - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" +source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" dependencies = [ "Inflector", "expander 2.2.1", - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -14215,7 +14170,7 @@ source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-po [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" +source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" [[package]] name = "sp-storage" @@ -14233,7 +14188,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" +source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" dependencies = [ "impl-serde", "parity-scale-codec", @@ -14270,7 +14225,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" +source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" dependencies = [ "parity-scale-codec", "tracing", @@ -14351,7 +14306,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -14370,9 +14325,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#21b3a46b11c15ff3915557201657322f42527a2b" +source = "git+https://github.com/paritytech/polkadot-sdk#711d91aaabb9687cd26904443c23706cd4dbd1ee" dependencies = [ - "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", @@ -14431,9 +14385,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.6" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" +checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" dependencies = [ "nom", "unicode_categories", @@ -14471,7 +14425,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.6.0", + "indexmap 2.3.0", "log", "memchr", "native-tls", @@ -14551,9 +14505,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.51.0" +version = "1.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19409f13998e55816d1c728395af0b52ec066206341d939e22e7766df9b494b8" +checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba" dependencies = [ "Inflector", "num-format", @@ -14739,7 +14693,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -14790,7 +14744,7 @@ version = "28.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.31", + "futures 0.3.30", "jsonrpsee", "log", "parity-scale-codec", @@ -14808,7 +14762,7 @@ name = "substrate-prometheus-endpoint" version = "0.17.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ - "hyper 0.14.31", + "hyper 0.14.30", "log", "prometheus", "thiserror", @@ -14904,9 +14858,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -14939,7 +14893,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -14986,14 +14940,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.13.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", - "fastrand 2.1.1", + "fastrand 2.1.0", "once_cell", - "rustix 0.38.37", + "rustix 0.38.34", "windows-sys 0.59.0", ] @@ -15008,12 +14962,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.4.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.38.37", - "windows-sys 0.59.0", + "rustix 0.38.34", + "windows-sys 0.48.0", ] [[package]] @@ -15024,9 +14978,9 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] @@ -15048,18 +15002,18 @@ checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -15178,9 +15132,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "bytes", @@ -15202,7 +15156,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -15250,9 +15204,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite 0.2.14", @@ -15262,9 +15216,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", @@ -15292,7 +15246,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.22", + "toml_edit 0.22.20", ] [[package]] @@ -15310,22 +15264,33 @@ version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.3.0", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.3.0", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.3.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.20", + "winnow 0.6.18", ] [[package]] @@ -15338,6 +15303,7 @@ dependencies = [ "futures-util", "pin-project", "pin-project-lite 0.2.14", + "tokio", "tower-layer", "tower-service", "tracing", @@ -15363,15 +15329,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-service" -version = "0.3.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" @@ -15393,7 +15359,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -15433,10 +15399,10 @@ version = "5.0.0" source = "git+https://github.com/darwinia-network/polkadot-sdk?branch=release-polkadot-v1.7.2#581178546b4b0fb8ebf4a6cee5a51d5629419197" dependencies = [ "expander 2.2.1", - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -15556,7 +15522,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ace5c192c2741c39c4e74f5456e20331b406625487aea18bdf405dbb08a53fe" dependencies = [ "form_urlencoded", - "futures 0.3.31", + "futures 0.3.30", "indicatif", "reqwest", "reqwest-middleware", @@ -15705,9 +15671,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uint" @@ -15721,29 +15687,17 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "uint" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - [[package]] name = "unicode-bidi" -version = "0.3.17" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -15756,21 +15710,21 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.6" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "unicode_categories" @@ -15861,9 +15815,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "w3f-bls" -version = "0.1.6" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a48c48447120a85b0bdb897ba9426a7aa15b4229498a2e19103e8c9368dd4b2" +checksum = "9c5da5fa2c6afa2c9158eaa7cd9aee249765eb32b5fb0c63ad8b9e79336a47ec" dependencies = [ "ark-bls12-377", "ark-bls12-381", @@ -15931,35 +15885,34 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", - "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -15969,9 +15922,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -15979,22 +15932,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-instrument" @@ -16047,9 +16000,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" dependencies = [ "futures-util", "js-sys", @@ -16064,7 +16017,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -16320,9 +16273,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -16489,14 +16442,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.37", + "rustix 0.38.34", ] [[package]] name = "wide" -version = "0.7.28" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b828f995bf1e9622031f8009f8481a85406ce1f4d4588ff746d872043e855690" +checksum = "901e8597c777fa042e9e245bd56c0dc4418c5db3f845b6ff94fbac732c6a0692" dependencies = [ "bytemuck", "safe_arch", @@ -16792,9 +16745,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -16906,7 +16859,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -16915,7 +16868,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" dependencies = [ - "futures 0.3.31", + "futures 0.3.30", "log", "nohash-hasher", "parking_lot 0.12.3", @@ -16950,7 +16903,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] @@ -16970,7 +16923,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.72", ] [[package]] From 54769653359041e195bfebd784f795cc98911f52 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 30 Oct 2024 16:28:16 +0800 Subject: [PATCH 13/17] Staking V3 review (#1617) * Account migration adaptation Signed-off-by: Xavier Lau * Limit tasks --------- Signed-off-by: Xavier Lau --- Cargo.lock | 1 - pallet/account-migration/Cargo.toml | 4 -- pallet/account-migration/src/lib.rs | 88 ++++++++++++++++----------- pallet/account-migration/src/mock.rs | 12 ---- pallet/account-migration/src/tests.rs | 24 +++++++- pallet/deposit/src/lib.rs | 66 +++++++------------- pallet/deposit/src/tests.rs | 43 +++++++------ pallet/staking/src/lib.rs | 70 +++++++++++---------- pallet/staking/src/tests.rs | 33 +++++++--- 9 files changed, 176 insertions(+), 165 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd45d433e..01fd4d89d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2708,7 +2708,6 @@ version = "6.7.2" dependencies = [ "array-bytes 6.2.3", "darwinia-deposit", - "darwinia-staking", "dc-primitives", "frame-benchmarking", "frame-support", diff --git a/pallet/account-migration/Cargo.toml b/pallet/account-migration/Cargo.toml index 9a8b9aa02..6a8f5896e 100644 --- a/pallet/account-migration/Cargo.toml +++ b/pallet/account-migration/Cargo.toml @@ -14,7 +14,6 @@ scale-info = { workspace = true } # darwinia darwinia-deposit = { workspace = true } -darwinia-staking = { workspace = true } dc-primitives = { workspace = true } # polkadot-sdk @@ -43,7 +42,6 @@ std = [ # darwinia "darwinia-deposit/std", - "darwinia-staking/std", "dc-primitives/std", # polkadot-sdk @@ -62,7 +60,6 @@ std = [ runtime-benchmarks = [ # darwinia "darwinia-deposit/runtime-benchmarks", - "darwinia-staking/runtime-benchmarks", # polkadot-sdk "frame-benchmarking/runtime-benchmarks", @@ -76,7 +73,6 @@ runtime-benchmarks = [ try-runtime = [ # darwinia "darwinia-deposit/try-runtime", - "darwinia-staking/try-runtime", # polkadot-sdk "frame-support/try-runtime", diff --git a/pallet/account-migration/src/lib.rs b/pallet/account-migration/src/lib.rs index b9991561a..a4810d202 100644 --- a/pallet/account-migration/src/lib.rs +++ b/pallet/account-migration/src/lib.rs @@ -24,7 +24,7 @@ //! These two algorithm are not compatible. //! Thus, an account migration is required. //! -//! ## Technical detail +//! ## Technical Detail //! //! Users must send an extrinsic themselves to migrate their account(s). //! This extrinsic should be unsigned, the reason is the same as `pallet-claims`. @@ -56,7 +56,6 @@ pub use weights::WeightInfo; // darwinia use darwinia_deposit::{Deposit, DepositId}; -use darwinia_staking::Ledger; use dc_primitives::{AccountId as AccountId20, AssetId, Balance, BlockNumber, Nonce}; // polkadot-sdk use frame_support::{ @@ -90,14 +89,11 @@ pub mod pallet { pub(crate) const E_ACCOUNT_NOT_FOUND: u8 = 1; /// Invalid signature. pub(crate) const E_INVALID_SIGNATURE: u8 = 2; - /// Duplicative submission. - pub(crate) const E_DUPLICATIVE_SUBMISSION: u8 = 3; + /// Duplicated submission. + pub(crate) const E_DUPLICATED_SUBMISSION: u8 = 3; /// The account is not a member of the multisig. pub(crate) const E_NOT_MULTISIG_MEMBER: u8 = 4; - #[pallet::pallet] - pub struct Pallet(_); - #[pallet::config] pub trait Config: frame_system::Config< @@ -108,12 +104,11 @@ pub mod pallet { > + pallet_assets::Config + pallet_balances::Config + darwinia_deposit::Config - + darwinia_staking::Config { /// Override the [`frame_system::Config::RuntimeEvent`]. type RuntimeEvent: From + IsType<::RuntimeEvent>; - /// Weight information for extrinsics in this pallet. + /// Weight information for extrinsic in this pallet. type WeightInfo: WeightInfo; } @@ -158,7 +153,7 @@ pub mod pallet { #[pallet::getter(fn deposit_of)] pub type Deposits = StorageMap<_, Blake2_128Concat, AccountId32, Vec>; - /// [`darwinia_staking::migration::v2::OldLedger`] data. + /// Old ledger data. #[pallet::storage] #[pallet::getter(fn ledger_of)] pub type Ledgers = StorageMap<_, Blake2_128Concat, AccountId32, OldLedger>; @@ -169,6 +164,41 @@ pub mod pallet { #[pallet::getter(fn multisig_of)] pub type Multisigs = StorageMap<_, Identity, AccountId32, MultisigMigrationDetail>; + #[pallet::pallet] + pub struct Pallet(_); + #[pallet::hooks] + impl Hooks> for Pallet { + fn on_idle(_: BlockNumberFor, mut remaining_weight: Weight) -> Weight { + const MAX_TASKS: usize = 10; + + #[cfg(test)] + let wt = Weight::zero().add_ref_time(1); + #[cfg(not(test))] + let wt = T::DbWeight::get().writes(1); + let mut consumer = >::iter().drain(); + + for i in 0..MAX_TASKS { + if i >= MAX_TASKS { + break; + } + + if let Some(rw) = remaining_weight.checked_sub(&wt) { + remaining_weight = rw; + } else { + break; + } + + if consumer.next().is_none() { + // There is nothing to do; add the weight back. + remaining_weight += wt; + + break; + } + } + + remaining_weight + } + } #[pallet::call] impl Pallet { /// Migrate all the account data under the `from` to `to`. @@ -314,7 +344,7 @@ pub mod pallet { if who == submitter { // Reject duplicative submission. if *ok { - return InvalidTransaction::Custom(E_DUPLICATIVE_SUBMISSION).into(); + return InvalidTransaction::Custom(E_DUPLICATED_SUBMISSION).into(); } is_member = true; @@ -353,7 +383,7 @@ pub mod pallet { fn pre_check_duplicative(multisig: &AccountId32) -> Result<(), TransactionValidityError> { if >::contains_key(multisig) { - Err(InvalidTransaction::Custom(E_DUPLICATIVE_SUBMISSION))? + Err(InvalidTransaction::Custom(E_DUPLICATED_SUBMISSION))? } else { Ok(()) } @@ -417,32 +447,16 @@ pub mod pallet { asset_details, ); } - if let Some(l) = >::take(from) { - if l.staked_ring > 0 { - as Currency<_>>::transfer( - to, - &darwinia_staking::account_id(), - l.staked_ring, - AllowDeath, - )?; - } - - if let Some(ds) = >::take(from) { - as Currency<_>>::transfer( - to, - &darwinia_deposit::account_id(), - ds.iter().map(|d| d.value).sum(), - AllowDeath, - )?; - >::insert( - to, - BoundedVec::try_from(ds).map_err(|_| >::ExceedMaxDeposits)?, - ); - } - - >::insert( + if let Some(ds) = >::take(from) { + as Currency<_>>::transfer( + to, + &darwinia_deposit::account_id(), + ds.iter().map(|d| d.value).sum(), + AllowDeath, + )?; + >::insert( to, - Ledger { ring: l.staked_ring, deposits: l.staked_deposits }, + BoundedVec::try_from(ds).map_err(|_| >::ExceedMaxDeposits)?, ); } } diff --git a/pallet/account-migration/src/mock.rs b/pallet/account-migration/src/mock.rs index 6a02d8a12..99b3dea39 100644 --- a/pallet/account-migration/src/mock.rs +++ b/pallet/account-migration/src/mock.rs @@ -106,17 +106,6 @@ impl darwinia_deposit::Config for Runtime { type WeightInfo = (); } -impl darwinia_staking::Config for Runtime { - type Currency = Balances; - type IssuingManager = (); - type KtonStaking = (); - type RingStaking = (); - type RuntimeEvent = RuntimeEvent; - type Treasury = (); - type UnixTime = Timestamp; - type WeightInfo = (); -} - impl crate::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = (); @@ -129,7 +118,6 @@ frame_support::construct_runtime! { Balances: pallet_balances, Assets: pallet_assets, Deposit: darwinia_deposit, - Staking: darwinia_staking, AccountMigration: crate, } } diff --git a/pallet/account-migration/src/tests.rs b/pallet/account-migration/src/tests.rs index be73f4779..5b12496b2 100644 --- a/pallet/account-migration/src/tests.rs +++ b/pallet/account-migration/src/tests.rs @@ -19,9 +19,10 @@ // darwinia use crate::{mock::*, *}; // polkadot-sdk -use frame_support::{assert_noop, assert_ok}; +use frame_support::{assert_noop, assert_ok, traits::OnIdle}; use frame_system::AccountInfo; use pallet_balances::AccountData; +use sp_core::H256; use sp_keyring::{ed25519::Keyring as Ek, sr25519::Keyring as Sk}; use sp_runtime::{ traits::ValidateUnsigned, @@ -139,7 +140,7 @@ fn migrate_multisig_should_work() { signature: signature.0, new_multisig_params: None }), - TransactionValidityError::Invalid(InvalidTransaction::Custom(E_DUPLICATIVE_SUBMISSION)) + TransactionValidityError::Invalid(InvalidTransaction::Custom(E_DUPLICATED_SUBMISSION)) ); assert!(>::get(&multisig).is_some()); @@ -176,3 +177,22 @@ fn migrate_multisig_should_work() { assert_eq!(>::get(to).consumers, 1); }); } + +#[test] +fn on_idle_should_work() { + new_test_ext().execute_with(|| { + (0..1_024).for_each(|i| { + >::insert( + AccountId32::from(H256::from_low_u64_le(i).0), + OldLedger::default(), + ); + }); + assert_eq!(>::iter().count(), 1_024); + + >::on_idle(0, Weight::zero().add_ref_time(5)); + assert_eq!(>::iter().count(), 1_019); + + >::on_idle(0, Weight::MAX); + assert_eq!(>::iter().count(), 1_009); + }); +} diff --git a/pallet/deposit/src/lib.rs b/pallet/deposit/src/lib.rs index 35c892c82..e3980b825 100644 --- a/pallet/deposit/src/lib.rs +++ b/pallet/deposit/src/lib.rs @@ -55,7 +55,7 @@ use frame_support::{ use frame_system::pallet_prelude::*; use sp_core::H160; use sp_runtime::traits::AccountIdConversion; -use sp_std::{collections::btree_map::BTreeMap, prelude::*}; +use sp_std::prelude::*; #[frame_support::pallet] pub mod pallet { @@ -119,52 +119,32 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn on_idle(_: BlockNumberFor, mut remaining_weight: Weight) -> Weight { - // At least 1 read weight is required. - #[cfg(not(test))] - if let Some(rw) = remaining_weight.checked_sub(&T::DbWeight::get().reads(1)) { - remaining_weight = rw; - } else { - return remaining_weight; - } - #[cfg(test)] let wt = Weight::zero().add_ref_time(10); #[cfg(not(test))] let wt = ::WeightInfo::migrate_for(); - let mut ds_to_migrate = BTreeMap::, usize)>::new(); - - 'outer: for (w, ds) in >::iter() { - for _ in 0..ds.len().div_ceil(10) { - if let Some(rw) = remaining_weight.checked_sub(&wt) { - remaining_weight = rw; - - if let Some((_, cnt)) = ds_to_migrate.get_mut(&w) { - *cnt += 1; - } else { - ds_to_migrate.insert(w.clone(), (ds.to_vec(), 1)); - } - } else { - break 'outer; - } - } + + if let Some(rw) = remaining_weight.checked_sub(&wt) { + remaining_weight = rw; + } else { + return remaining_weight; } - for (w, (ds, cnt)) in ds_to_migrate { - let mut ds = ds; + let Some((k, v)) = >::iter().drain().next() else { + // There is nothing to do; add the weight back. + remaining_weight += wt; - for _ in 0..cnt { - match Self::migrate_for_inner(&w, ds.clone()) { - Ok(ds_) => ds = ds_, - _ => break, - } - } + return remaining_weight; + }; - if ds.is_empty() { - >::remove(&w); - } else { + if let Ok(remaining_deposits) = Self::migrate_for_inner(&k, v.clone()) { + if !remaining_deposits.is_empty() { // There are still some deposits left for this account. - >::insert(&w, BoundedVec::truncate_from(ds)); + >::insert(&k, remaining_deposits); } + } else { + // Put the deposits back if migration failed. + >::insert(&k, v); } remaining_weight @@ -178,12 +158,12 @@ pub mod pallet { pub fn migrate_for(origin: OriginFor, who: T::AccountId) -> DispatchResult { ensure_signed(origin)?; - let ds = >::take(&who).ok_or(>::NoDeposit)?; - let ds = Self::migrate_for_inner(&who, ds)?; + let deposits = >::take(&who).ok_or(>::NoDeposit)?; + let deposits = Self::migrate_for_inner(&who, deposits)?; // Put the rest deposits back. - if !ds.is_empty() { - >::insert(&who, BoundedVec::truncate_from(ds)); + if !deposits.is_empty() { + >::insert(&who, deposits); } Ok(()) @@ -214,7 +194,7 @@ pub mod pallet { fn migrate_for_inner( who: &T::AccountId, deposits: I, - ) -> Result, DispatchError> + ) -> Result>, DispatchError> where I: IntoIterator, { @@ -251,7 +231,7 @@ pub mod pallet { }); } - Ok(deposits.collect()) + Ok(BoundedVec::truncate_from(deposits.collect())) } } } diff --git a/pallet/deposit/src/tests.rs b/pallet/deposit/src/tests.rs index deecaf726..f4e1fedf7 100644 --- a/pallet/deposit/src/tests.rs +++ b/pallet/deposit/src/tests.rs @@ -63,35 +63,38 @@ fn on_idle_should_work() { assert_eq!(Deposit::deposit_of(2).unwrap().len(), 512); assert_eq!(Deposit::deposit_of(3).unwrap().len(), 512); - AllPalletsWithSystem::on_idle(0, Weight::zero()); + >::on_idle(0, Weight::zero()); assert_eq!(Deposit::deposit_of(1).unwrap().len(), 512); assert_eq!(Deposit::deposit_of(2).unwrap().len(), 512); assert_eq!(Deposit::deposit_of(3).unwrap().len(), 512); - AllPalletsWithSystem::on_idle(0, Weight::MAX); - assert!(Deposit::deposit_of(1).is_none()); - assert!(Deposit::deposit_of(2).is_none()); - assert!(Deposit::deposit_of(3).is_none()); - - // --- - - >::insert(1, mock_deposits(512)); - >::insert(2, mock_deposits(512)); - >::insert(3, mock_deposits(512)); + >::on_idle(0, Weight::zero().add_ref_time(10)); assert_eq!(Deposit::deposit_of(1).unwrap().len(), 512); assert_eq!(Deposit::deposit_of(2).unwrap().len(), 512); - assert_eq!(Deposit::deposit_of(3).unwrap().len(), 512); + assert_eq!(Deposit::deposit_of(3).unwrap().len(), 502); + >::on_idle(0, Weight::MAX); + assert_eq!(Deposit::deposit_of(1).unwrap().len(), 512); + assert_eq!(Deposit::deposit_of(2).unwrap().len(), 512); + assert_eq!(Deposit::deposit_of(3).unwrap().len(), 492); - AllPalletsWithSystem::on_idle(0, Weight::zero().add_ref_time(256)); + (0..50).for_each(|_| { + >::on_idle(0, Weight::MAX); + }); assert_eq!(Deposit::deposit_of(1).unwrap().len(), 512); assert_eq!(Deposit::deposit_of(2).unwrap().len(), 512); - // 512 - 256 / 10 * 10 = 252 - assert_eq!(Deposit::deposit_of(3).unwrap().len(), 262); - AllPalletsWithSystem::on_idle(0, Weight::zero().add_ref_time(1_234)); + assert!(Deposit::deposit_of(3).is_none()); + + (0..50).for_each(|_| { + >::on_idle(0, Weight::MAX); + }); + assert_eq!(Deposit::deposit_of(1).unwrap().len(), 12); + assert_eq!(Deposit::deposit_of(2).unwrap().len(), 512); + assert!(Deposit::deposit_of(3).is_none()); + + (0..54).for_each(|_| { + >::on_idle(0, Weight::MAX); + }); assert!(Deposit::deposit_of(1).is_none()); - // 512 => 520 weight - // 1_234 - 520 * 2 = 194 - // 262 - 194 / 10 * 10 = 72 - assert_eq!(Deposit::deposit_of(2).unwrap().len(), 72); + assert!(Deposit::deposit_of(2).is_none()); assert!(Deposit::deposit_of(3).is_none()); }); } diff --git a/pallet/staking/src/lib.rs b/pallet/staking/src/lib.rs index d16cc4c9c..667c92450 100644 --- a/pallet/staking/src/lib.rs +++ b/pallet/staking/src/lib.rs @@ -347,64 +347,62 @@ pub mod pallet { } fn idle_allocate_ring_staking_reward(remaining_weight: &mut Weight) { - // At least 1 read weight is required. - if let Some(rw) = remaining_weight.checked_sub(&T::DbWeight::get().reads(1)) { - *remaining_weight = rw; - } else { - return; - } + const MAX_TASKS: usize = 10; #[cfg(test)] - let weight = Weight::zero().add_ref_time(1); + let wt = Weight::zero().add_ref_time(1); #[cfg(not(test))] - let weight = T::WeightInfo::allocate_ring_staking_reward_of(); - let mut reward_to_allocate = Vec::new(); + let wt = T::WeightInfo::allocate_ring_staking_reward_of(); + let mut consumer = >::iter().drain(); - for (who, amount) in >::iter() { - if let Some(rw) = remaining_weight.checked_sub(&weight) { - *remaining_weight = rw; + for i in 0..MAX_TASKS { + if i >= MAX_TASKS { + break; + } - reward_to_allocate.push((who, amount)); + if let Some(rw) = remaining_weight.checked_sub(&wt) { + *remaining_weight = rw; } else { break; } - } - - for (who, amount) in reward_to_allocate { - let _ = Self::allocate_ring_staking_reward_of_inner(who.clone(), amount); + if let Some((k, v)) = consumer.next() { + let _ = Self::allocate_ring_staking_reward_of_inner(k, v); + } else { + // There is nothing to do; add the weight back. + *remaining_weight += wt; - >::remove(&who); + break; + } } } fn idle_unstake(remaining_weight: &mut Weight) { - // At least 1 read weight is required. - if let Some(rw) = remaining_weight.checked_sub(&T::DbWeight::get().reads(1)) { - *remaining_weight = rw; - } else { - return; - } + const MAX_TASKS: usize = 10; #[cfg(test)] - let weight = Weight::zero().add_ref_time(1); + let wt = Weight::zero().add_ref_time(1); #[cfg(not(test))] - let weight = T::WeightInfo::unstake_all_for(); - let mut ledgers_to_migrate = Vec::new(); + let wt = T::WeightInfo::unstake_all_for(); + let mut consumer = >::iter().drain(); - for (who, l) in >::iter() { - if let Some(rw) = remaining_weight.checked_sub(&weight) { - *remaining_weight = rw; + for i in 0..MAX_TASKS { + if i >= MAX_TASKS { + break; + } - ledgers_to_migrate.push((who, l)); + if let Some(rw) = remaining_weight.checked_sub(&wt) { + *remaining_weight = rw; } else { break; } - } - - for (who, l) in ledgers_to_migrate { - let _ = Self::unstake_all_for_inner(who.clone(), l); + if let Some((k, v)) = consumer.next() { + let _ = Self::unstake_all_for_inner(k, v); + } else { + // There is nothing to do; add the weight back. + *remaining_weight += wt; - >::remove(&who); + break; + } } } diff --git a/pallet/staking/src/tests.rs b/pallet/staking/src/tests.rs index ab75b3bfd..c14878ada 100644 --- a/pallet/staking/src/tests.rs +++ b/pallet/staking/src/tests.rs @@ -94,17 +94,26 @@ fn on_idle_allocate_ring_staking_reward_should_work() { (1..=512).for_each(|i| >::insert(AccountId(i), 1)); System::reset_events(); - AllPalletsWithSystem::on_idle(0, Weight::zero().add_ref_time(128)); + >::on_idle(0, Weight::zero().add_ref_time(5)); assert_eq!( events().into_iter().filter(|e| matches!(e, Event::RewardAllocated { .. })).count(), - 128 + 5 ); System::reset_events(); - AllPalletsWithSystem::on_idle(0, Weight::MAX); + >::on_idle(0, Weight::MAX); assert_eq!( events().into_iter().filter(|e| matches!(e, Event::RewardAllocated { .. })).count(), - 384 + 10 + ); + + System::reset_events(); + while >::iter().count() != 0 { + >::on_idle(0, Weight::MAX); + } + assert_eq!( + events().into_iter().filter(|e| matches!(e, Event::RewardAllocated { .. })).count(), + 497 ); }); } @@ -112,6 +121,8 @@ fn on_idle_allocate_ring_staking_reward_should_work() { #[test] fn on_idle_unstake_should_work() { ExtBuilder.build().execute_with(|| { + // Skip 1 to 3 collators. + // Since they have session rewards which make calculation more complex. (4..=515).for_each(|i| { >::insert( AccountId(i), @@ -120,15 +131,17 @@ fn on_idle_unstake_should_work() { }); System::reset_events(); - AllPalletsWithSystem::on_idle(0, Weight::zero().add_ref_time(128)); - assert_eq!(>::iter().count(), 384); + >::on_idle(0, Weight::zero().add_ref_time(5)); + assert_eq!(>::iter().count(), 507); System::reset_events(); - AllPalletsWithSystem::on_idle(0, Weight::MAX); - assert_eq!(>::iter().count(), 0); + >::on_idle(0, Weight::MAX); + assert_eq!(>::iter().count(), 497); + + while >::iter().count() != 0 { + >::on_idle(0, Weight::MAX); + } - // Skip 1 to 3 collators. - // Since they have session rewards which make calculation more complex. (4..515).for_each(|who| { assert_eq!(Balances::free_balance(AccountId(who)), 100 + who as Balance); }); From 13fbdbdba873acfd67864a844a4c78bce291e86a Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 30 Oct 2024 17:11:46 +0800 Subject: [PATCH 14/17] Bench --- pallet/deposit/src/weights.rs | 1 - pallet/staking/src/weights.rs | 1 - runtime/common/src/test.rs | 11 +---------- .../src/weights/cumulus_pallet_parachain_system.rs | 1 - runtime/crab/src/weights/cumulus_pallet_xcmp_queue.rs | 1 - .../crab/src/weights/darwinia_account_migration.rs | 1 - runtime/crab/src/weights/darwinia_deposit.rs | 1 - runtime/crab/src/weights/darwinia_staking.rs | 1 - runtime/crab/src/weights/frame_system.rs | 1 - runtime/crab/src/weights/pallet_assets.rs | 1 - runtime/crab/src/weights/pallet_balances.rs | 1 - runtime/crab/src/weights/pallet_collective.rs | 1 - runtime/crab/src/weights/pallet_conviction_voting.rs | 1 - runtime/crab/src/weights/pallet_message_queue.rs | 1 - runtime/crab/src/weights/pallet_preimage.rs | 1 - runtime/crab/src/weights/pallet_proxy.rs | 1 - runtime/crab/src/weights/pallet_referenda.rs | 1 - runtime/crab/src/weights/pallet_scheduler.rs | 1 - runtime/crab/src/weights/pallet_session.rs | 1 - runtime/crab/src/weights/pallet_timestamp.rs | 1 - runtime/crab/src/weights/pallet_treasury.rs | 1 - runtime/crab/src/weights/pallet_tx_pause.rs | 1 - runtime/crab/src/weights/pallet_utility.rs | 1 - runtime/crab/src/weights/pallet_whitelist.rs | 1 - .../src/weights/cumulus_pallet_parachain_system.rs | 1 - .../darwinia/src/weights/cumulus_pallet_xcmp_queue.rs | 1 - .../src/weights/darwinia_account_migration.rs | 1 - runtime/darwinia/src/weights/darwinia_deposit.rs | 1 - runtime/darwinia/src/weights/darwinia_staking.rs | 1 - runtime/darwinia/src/weights/frame_system.rs | 1 - runtime/darwinia/src/weights/pallet_asset_manager.rs | 1 - runtime/darwinia/src/weights/pallet_assets.rs | 1 - runtime/darwinia/src/weights/pallet_balances.rs | 1 - runtime/darwinia/src/weights/pallet_collective.rs | 1 - .../darwinia/src/weights/pallet_conviction_voting.rs | 1 - runtime/darwinia/src/weights/pallet_message_queue.rs | 1 - runtime/darwinia/src/weights/pallet_preimage.rs | 1 - runtime/darwinia/src/weights/pallet_proxy.rs | 1 - runtime/darwinia/src/weights/pallet_referenda.rs | 1 - runtime/darwinia/src/weights/pallet_scheduler.rs | 1 - runtime/darwinia/src/weights/pallet_session.rs | 1 - runtime/darwinia/src/weights/pallet_timestamp.rs | 1 - runtime/darwinia/src/weights/pallet_treasury.rs | 1 - runtime/darwinia/src/weights/pallet_utility.rs | 1 - runtime/darwinia/src/weights/pallet_whitelist.rs | 1 - .../src/weights/cumulus_pallet_parachain_system.rs | 1 - runtime/koi/src/weights/cumulus_pallet_xcmp_queue.rs | 1 - runtime/koi/src/weights/darwinia_deposit.rs | 1 - runtime/koi/src/weights/darwinia_staking.rs | 1 - runtime/koi/src/weights/frame_system.rs | 1 - runtime/koi/src/weights/pallet_asset_manager.rs | 1 - runtime/koi/src/weights/pallet_assets.rs | 1 - runtime/koi/src/weights/pallet_balances.rs | 1 - runtime/koi/src/weights/pallet_collective.rs | 1 - runtime/koi/src/weights/pallet_conviction_voting.rs | 1 - runtime/koi/src/weights/pallet_message_queue.rs | 1 - runtime/koi/src/weights/pallet_preimage.rs | 1 - runtime/koi/src/weights/pallet_proxy.rs | 1 - runtime/koi/src/weights/pallet_referenda.rs | 1 - runtime/koi/src/weights/pallet_scheduler.rs | 1 - runtime/koi/src/weights/pallet_session.rs | 1 - runtime/koi/src/weights/pallet_timestamp.rs | 1 - runtime/koi/src/weights/pallet_treasury.rs | 1 - runtime/koi/src/weights/pallet_tx_pause.rs | 1 - runtime/koi/src/weights/pallet_utility.rs | 1 - runtime/koi/src/weights/pallet_whitelist.rs | 1 - 66 files changed, 1 insertion(+), 75 deletions(-) diff --git a/pallet/deposit/src/weights.rs b/pallet/deposit/src/weights.rs index 27991ed4b..586965b26 100644 --- a/pallet/deposit/src/weights.rs +++ b/pallet/deposit/src/weights.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("koi-dev"), DB CACHE: 1024 // Executed Command: diff --git a/pallet/staking/src/weights.rs b/pallet/staking/src/weights.rs index 4b457a6a8..b4274507b 100644 --- a/pallet/staking/src/weights.rs +++ b/pallet/staking/src/weights.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("koi-dev"), DB CACHE: 1024 // Executed Command: diff --git a/runtime/common/src/test.rs b/runtime/common/src/test.rs index 89de4f715..a516370e2 100644 --- a/runtime/common/src/test.rs +++ b/runtime/common/src/test.rs @@ -301,24 +301,15 @@ macro_rules! impl_account_migration_tests { }, ], ); - >::insert( - &from_pk, - OldLedger { staked_ring: 20, ..Default::default() }, - ); assert_ok!(migrate(from, to)); - assert_eq!(Balances::free_balance(to), 60); + assert_eq!(Balances::free_balance(to), 80); assert_eq!( Balances::free_balance(&darwinia_deposit::account_id::()), 20 ); - assert_eq!( - Balances::free_balance(&darwinia_staking::account_id::()), - 20 - ); assert_eq!(Deposit::deposit_of(to).unwrap().len(), 2); assert_eq!(Assets::maybe_balance(KTON_ID, to).unwrap(), 100); - assert_eq!(DarwiniaStaking::ledger_of(to).unwrap().ring, 20); }); } } diff --git a/runtime/crab/src/weights/cumulus_pallet_parachain_system.rs b/runtime/crab/src/weights/cumulus_pallet_parachain_system.rs index 4fd8a44e0..db877c738 100644 --- a/runtime/crab/src/weights/cumulus_pallet_parachain_system.rs +++ b/runtime/crab/src/weights/cumulus_pallet_parachain_system.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/crab/src/weights/cumulus_pallet_xcmp_queue.rs index 9adc483e2..c42bf9257 100644 --- a/runtime/crab/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/crab/src/weights/cumulus_pallet_xcmp_queue.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/darwinia_account_migration.rs b/runtime/crab/src/weights/darwinia_account_migration.rs index e8b765606..c599f5826 100644 --- a/runtime/crab/src/weights/darwinia_account_migration.rs +++ b/runtime/crab/src/weights/darwinia_account_migration.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/darwinia_deposit.rs b/runtime/crab/src/weights/darwinia_deposit.rs index fa3bed9ec..2d9b85ce4 100644 --- a/runtime/crab/src/weights/darwinia_deposit.rs +++ b/runtime/crab/src/weights/darwinia_deposit.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/darwinia_staking.rs b/runtime/crab/src/weights/darwinia_staking.rs index e9309a0bf..46f1b5c05 100644 --- a/runtime/crab/src/weights/darwinia_staking.rs +++ b/runtime/crab/src/weights/darwinia_staking.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/frame_system.rs b/runtime/crab/src/weights/frame_system.rs index 9262a794a..22ff06504 100644 --- a/runtime/crab/src/weights/frame_system.rs +++ b/runtime/crab/src/weights/frame_system.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_assets.rs b/runtime/crab/src/weights/pallet_assets.rs index 021a15aa8..f3b66bd60 100644 --- a/runtime/crab/src/weights/pallet_assets.rs +++ b/runtime/crab/src/weights/pallet_assets.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_balances.rs b/runtime/crab/src/weights/pallet_balances.rs index c5007bf5d..a5c13173b 100644 --- a/runtime/crab/src/weights/pallet_balances.rs +++ b/runtime/crab/src/weights/pallet_balances.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_collective.rs b/runtime/crab/src/weights/pallet_collective.rs index f073977aa..0c29cf5a1 100644 --- a/runtime/crab/src/weights/pallet_collective.rs +++ b/runtime/crab/src/weights/pallet_collective.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_conviction_voting.rs b/runtime/crab/src/weights/pallet_conviction_voting.rs index 9fb9ee077..9806e2807 100644 --- a/runtime/crab/src/weights/pallet_conviction_voting.rs +++ b/runtime/crab/src/weights/pallet_conviction_voting.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_message_queue.rs b/runtime/crab/src/weights/pallet_message_queue.rs index 8f6b068e5..815ef8ceb 100644 --- a/runtime/crab/src/weights/pallet_message_queue.rs +++ b/runtime/crab/src/weights/pallet_message_queue.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_preimage.rs b/runtime/crab/src/weights/pallet_preimage.rs index 7a05a6763..929c08ebc 100644 --- a/runtime/crab/src/weights/pallet_preimage.rs +++ b/runtime/crab/src/weights/pallet_preimage.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_proxy.rs b/runtime/crab/src/weights/pallet_proxy.rs index f98f5df42..b3aa6c653 100644 --- a/runtime/crab/src/weights/pallet_proxy.rs +++ b/runtime/crab/src/weights/pallet_proxy.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_referenda.rs b/runtime/crab/src/weights/pallet_referenda.rs index b552c8dee..f0d5c1397 100644 --- a/runtime/crab/src/weights/pallet_referenda.rs +++ b/runtime/crab/src/weights/pallet_referenda.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_scheduler.rs b/runtime/crab/src/weights/pallet_scheduler.rs index 4ac7f02e8..40a716442 100644 --- a/runtime/crab/src/weights/pallet_scheduler.rs +++ b/runtime/crab/src/weights/pallet_scheduler.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_session.rs b/runtime/crab/src/weights/pallet_session.rs index 1d1c933c1..5288c3e40 100644 --- a/runtime/crab/src/weights/pallet_session.rs +++ b/runtime/crab/src/weights/pallet_session.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_timestamp.rs b/runtime/crab/src/weights/pallet_timestamp.rs index 40c21da33..187ae9525 100644 --- a/runtime/crab/src/weights/pallet_timestamp.rs +++ b/runtime/crab/src/weights/pallet_timestamp.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_treasury.rs b/runtime/crab/src/weights/pallet_treasury.rs index 1e74dd119..3ca77751e 100644 --- a/runtime/crab/src/weights/pallet_treasury.rs +++ b/runtime/crab/src/weights/pallet_treasury.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_tx_pause.rs b/runtime/crab/src/weights/pallet_tx_pause.rs index 27786c303..48231b31f 100644 --- a/runtime/crab/src/weights/pallet_tx_pause.rs +++ b/runtime/crab/src/weights/pallet_tx_pause.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_utility.rs b/runtime/crab/src/weights/pallet_utility.rs index 84ff392be..d64c37934 100644 --- a/runtime/crab/src/weights/pallet_utility.rs +++ b/runtime/crab/src/weights/pallet_utility.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/crab/src/weights/pallet_whitelist.rs b/runtime/crab/src/weights/pallet_whitelist.rs index fe54a7ddd..835033068 100644 --- a/runtime/crab/src/weights/pallet_whitelist.rs +++ b/runtime/crab/src/weights/pallet_whitelist.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("crab-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/cumulus_pallet_parachain_system.rs b/runtime/darwinia/src/weights/cumulus_pallet_parachain_system.rs index 424b50398..3bb86f94f 100644 --- a/runtime/darwinia/src/weights/cumulus_pallet_parachain_system.rs +++ b/runtime/darwinia/src/weights/cumulus_pallet_parachain_system.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/darwinia/src/weights/cumulus_pallet_xcmp_queue.rs index 1cac3b804..0ca2dce83 100644 --- a/runtime/darwinia/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/darwinia/src/weights/cumulus_pallet_xcmp_queue.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/darwinia_account_migration.rs b/runtime/darwinia/src/weights/darwinia_account_migration.rs index 6316b7135..b168d0f50 100644 --- a/runtime/darwinia/src/weights/darwinia_account_migration.rs +++ b/runtime/darwinia/src/weights/darwinia_account_migration.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/darwinia_deposit.rs b/runtime/darwinia/src/weights/darwinia_deposit.rs index b6a705b84..36b77446f 100644 --- a/runtime/darwinia/src/weights/darwinia_deposit.rs +++ b/runtime/darwinia/src/weights/darwinia_deposit.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/darwinia_staking.rs b/runtime/darwinia/src/weights/darwinia_staking.rs index 59da82154..f02be5bee 100644 --- a/runtime/darwinia/src/weights/darwinia_staking.rs +++ b/runtime/darwinia/src/weights/darwinia_staking.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/frame_system.rs b/runtime/darwinia/src/weights/frame_system.rs index 7afb23bf2..003d6691a 100644 --- a/runtime/darwinia/src/weights/frame_system.rs +++ b/runtime/darwinia/src/weights/frame_system.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_asset_manager.rs b/runtime/darwinia/src/weights/pallet_asset_manager.rs index 12688d4d0..f67c418e6 100644 --- a/runtime/darwinia/src/weights/pallet_asset_manager.rs +++ b/runtime/darwinia/src/weights/pallet_asset_manager.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_assets.rs b/runtime/darwinia/src/weights/pallet_assets.rs index 077c652db..c7a04cfd5 100644 --- a/runtime/darwinia/src/weights/pallet_assets.rs +++ b/runtime/darwinia/src/weights/pallet_assets.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_balances.rs b/runtime/darwinia/src/weights/pallet_balances.rs index 8324d30da..ee467fb83 100644 --- a/runtime/darwinia/src/weights/pallet_balances.rs +++ b/runtime/darwinia/src/weights/pallet_balances.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_collective.rs b/runtime/darwinia/src/weights/pallet_collective.rs index bcbc851a6..72811bd7b 100644 --- a/runtime/darwinia/src/weights/pallet_collective.rs +++ b/runtime/darwinia/src/weights/pallet_collective.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_conviction_voting.rs b/runtime/darwinia/src/weights/pallet_conviction_voting.rs index 65064fe75..f9ccd0469 100644 --- a/runtime/darwinia/src/weights/pallet_conviction_voting.rs +++ b/runtime/darwinia/src/weights/pallet_conviction_voting.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_message_queue.rs b/runtime/darwinia/src/weights/pallet_message_queue.rs index 09b5a6cff..ccdce69e1 100644 --- a/runtime/darwinia/src/weights/pallet_message_queue.rs +++ b/runtime/darwinia/src/weights/pallet_message_queue.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_preimage.rs b/runtime/darwinia/src/weights/pallet_preimage.rs index 1321a8bc3..e3b0cccff 100644 --- a/runtime/darwinia/src/weights/pallet_preimage.rs +++ b/runtime/darwinia/src/weights/pallet_preimage.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_proxy.rs b/runtime/darwinia/src/weights/pallet_proxy.rs index 67637fc36..6d970ee20 100644 --- a/runtime/darwinia/src/weights/pallet_proxy.rs +++ b/runtime/darwinia/src/weights/pallet_proxy.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_referenda.rs b/runtime/darwinia/src/weights/pallet_referenda.rs index 85ae26e00..98d85c260 100644 --- a/runtime/darwinia/src/weights/pallet_referenda.rs +++ b/runtime/darwinia/src/weights/pallet_referenda.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_scheduler.rs b/runtime/darwinia/src/weights/pallet_scheduler.rs index 58e86d34d..e209551ed 100644 --- a/runtime/darwinia/src/weights/pallet_scheduler.rs +++ b/runtime/darwinia/src/weights/pallet_scheduler.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_session.rs b/runtime/darwinia/src/weights/pallet_session.rs index ae3f2f698..1d26b6737 100644 --- a/runtime/darwinia/src/weights/pallet_session.rs +++ b/runtime/darwinia/src/weights/pallet_session.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_timestamp.rs b/runtime/darwinia/src/weights/pallet_timestamp.rs index bde24dc13..630c920c1 100644 --- a/runtime/darwinia/src/weights/pallet_timestamp.rs +++ b/runtime/darwinia/src/weights/pallet_timestamp.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_treasury.rs b/runtime/darwinia/src/weights/pallet_treasury.rs index 4df45f98c..19184062d 100644 --- a/runtime/darwinia/src/weights/pallet_treasury.rs +++ b/runtime/darwinia/src/weights/pallet_treasury.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_utility.rs b/runtime/darwinia/src/weights/pallet_utility.rs index 02175ebbd..c54567c50 100644 --- a/runtime/darwinia/src/weights/pallet_utility.rs +++ b/runtime/darwinia/src/weights/pallet_utility.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/darwinia/src/weights/pallet_whitelist.rs b/runtime/darwinia/src/weights/pallet_whitelist.rs index 3ab5e4ce4..c6f4a7671 100644 --- a/runtime/darwinia/src/weights/pallet_whitelist.rs +++ b/runtime/darwinia/src/weights/pallet_whitelist.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("darwinia-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/cumulus_pallet_parachain_system.rs b/runtime/koi/src/weights/cumulus_pallet_parachain_system.rs index a9c574df3..04adda031 100644 --- a/runtime/koi/src/weights/cumulus_pallet_parachain_system.rs +++ b/runtime/koi/src/weights/cumulus_pallet_parachain_system.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/koi/src/weights/cumulus_pallet_xcmp_queue.rs index 575dc9a77..16666223a 100644 --- a/runtime/koi/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/koi/src/weights/cumulus_pallet_xcmp_queue.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/darwinia_deposit.rs b/runtime/koi/src/weights/darwinia_deposit.rs index 0624d27ef..97e677b51 100644 --- a/runtime/koi/src/weights/darwinia_deposit.rs +++ b/runtime/koi/src/weights/darwinia_deposit.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/darwinia_staking.rs b/runtime/koi/src/weights/darwinia_staking.rs index 7f567fbaf..03d0265f2 100644 --- a/runtime/koi/src/weights/darwinia_staking.rs +++ b/runtime/koi/src/weights/darwinia_staking.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/frame_system.rs b/runtime/koi/src/weights/frame_system.rs index 0bc1176e4..fae08fab8 100644 --- a/runtime/koi/src/weights/frame_system.rs +++ b/runtime/koi/src/weights/frame_system.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_asset_manager.rs b/runtime/koi/src/weights/pallet_asset_manager.rs index 0230be028..4879f24cd 100644 --- a/runtime/koi/src/weights/pallet_asset_manager.rs +++ b/runtime/koi/src/weights/pallet_asset_manager.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_assets.rs b/runtime/koi/src/weights/pallet_assets.rs index ce534c692..bad371a0a 100644 --- a/runtime/koi/src/weights/pallet_assets.rs +++ b/runtime/koi/src/weights/pallet_assets.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_balances.rs b/runtime/koi/src/weights/pallet_balances.rs index d245aa394..e157c85d5 100644 --- a/runtime/koi/src/weights/pallet_balances.rs +++ b/runtime/koi/src/weights/pallet_balances.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_collective.rs b/runtime/koi/src/weights/pallet_collective.rs index 069d7cc6a..5c64ca9b5 100644 --- a/runtime/koi/src/weights/pallet_collective.rs +++ b/runtime/koi/src/weights/pallet_collective.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_conviction_voting.rs b/runtime/koi/src/weights/pallet_conviction_voting.rs index c701832bc..bb1549dd2 100644 --- a/runtime/koi/src/weights/pallet_conviction_voting.rs +++ b/runtime/koi/src/weights/pallet_conviction_voting.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_message_queue.rs b/runtime/koi/src/weights/pallet_message_queue.rs index e337815e3..9e3a6eda0 100644 --- a/runtime/koi/src/weights/pallet_message_queue.rs +++ b/runtime/koi/src/weights/pallet_message_queue.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_preimage.rs b/runtime/koi/src/weights/pallet_preimage.rs index 7701da5c9..67aece869 100644 --- a/runtime/koi/src/weights/pallet_preimage.rs +++ b/runtime/koi/src/weights/pallet_preimage.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_proxy.rs b/runtime/koi/src/weights/pallet_proxy.rs index a489740a2..b9c53de57 100644 --- a/runtime/koi/src/weights/pallet_proxy.rs +++ b/runtime/koi/src/weights/pallet_proxy.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_referenda.rs b/runtime/koi/src/weights/pallet_referenda.rs index 457612f4c..28c160340 100644 --- a/runtime/koi/src/weights/pallet_referenda.rs +++ b/runtime/koi/src/weights/pallet_referenda.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_scheduler.rs b/runtime/koi/src/weights/pallet_scheduler.rs index 2bc596040..a402cb318 100644 --- a/runtime/koi/src/weights/pallet_scheduler.rs +++ b/runtime/koi/src/weights/pallet_scheduler.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_session.rs b/runtime/koi/src/weights/pallet_session.rs index d4b7aadd4..9b47eb18f 100644 --- a/runtime/koi/src/weights/pallet_session.rs +++ b/runtime/koi/src/weights/pallet_session.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_timestamp.rs b/runtime/koi/src/weights/pallet_timestamp.rs index 8eaff5494..7eb821240 100644 --- a/runtime/koi/src/weights/pallet_timestamp.rs +++ b/runtime/koi/src/weights/pallet_timestamp.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_treasury.rs b/runtime/koi/src/weights/pallet_treasury.rs index 361c805b7..7a6ec22dd 100644 --- a/runtime/koi/src/weights/pallet_treasury.rs +++ b/runtime/koi/src/weights/pallet_treasury.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_tx_pause.rs b/runtime/koi/src/weights/pallet_tx_pause.rs index 08370e3d8..fb30436f6 100644 --- a/runtime/koi/src/weights/pallet_tx_pause.rs +++ b/runtime/koi/src/weights/pallet_tx_pause.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_utility.rs b/runtime/koi/src/weights/pallet_utility.rs index b52edaaa7..9f398fccb 100644 --- a/runtime/koi/src/weights/pallet_utility.rs +++ b/runtime/koi/src/weights/pallet_utility.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: diff --git a/runtime/koi/src/weights/pallet_whitelist.rs b/runtime/koi/src/weights/pallet_whitelist.rs index 196af6433..e4f884372 100644 --- a/runtime/koi/src/weights/pallet_whitelist.rs +++ b/runtime/koi/src/weights/pallet_whitelist.rs @@ -21,7 +21,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Xaviers-MacBook-Pro-16.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("koi-dev")`, DB CACHE: 1024 // Executed Command: From ec6db8b3218ccdc8056bd235fcf720cdf054d104 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 30 Oct 2024 18:02:48 +0800 Subject: [PATCH 15/17] Add migration --- pallet/staking/src/lib.rs | 74 ++++++++++++ runtime/common/src/migration_helper.rs | 150 +------------------------ runtime/crab/src/migration.rs | 6 +- runtime/darwinia/src/migration.rs | 4 + runtime/koi/src/migration.rs | 4 + 5 files changed, 88 insertions(+), 150 deletions(-) diff --git a/pallet/staking/src/lib.rs b/pallet/staking/src/lib.rs index 667c92450..3a53e3c5f 100644 --- a/pallet/staking/src/lib.rs +++ b/pallet/staking/src/lib.rs @@ -27,6 +27,80 @@ #![deny(missing_docs)] #![allow(clippy::needless_borrows_for_generic_args)] +#[allow(missing_docs)] +pub mod migration { + // darwinia + use crate::*; + // polkadot-sdk + use frame_support::migration; + + const PALLET: &[u8] = b"DarwiniaStaking"; + + pub fn migrate() -> (u64, u64) + where + T: Config, + { + fn clear(item: &[u8], r: &mut u64, w: &mut u64) { + let res = migration::clear_storage_prefix(PALLET, item, &[], None, None); + + *r += res.loops as u64; + *w += res.backend as u64; + } + + let rw @ (mut r, mut w) = (1, 1); + + clear(b"Collators", &mut r, &mut w); + clear(b"Nominators", &mut r, &mut w); + clear(b"ExposureCacheStates", &mut r, &mut w); + clear(b"ExposureCache0", &mut r, &mut w); + clear(b"ExposureCache1", &mut r, &mut w); + clear(b"ExposureCache2", &mut r, &mut w); + clear(b"CacheStates", &mut r, &mut w); + clear(b"CollatorsCache0", &mut r, &mut w); + clear(b"CollatorsCache1", &mut r, &mut w); + clear(b"CollatorsCache2", &mut r, &mut w); + clear(b"MigrationStartPoint", &mut r, &mut w); + clear(b"RateLimit", &mut r, &mut w); + clear(b"RateLimitState", &mut r, &mut w); + + if let Some(abc) = migration::take_storage_value::<( + BlockNumberFor, + BTreeMap>, + )>(PALLET, b"AuthoredBlocksCount", &[]) + { + >::put(abc); + } + + rw + } + + pub fn post_check() + where + T: Config, + { + fn assert_is_none(item: &[u8]) { + assert!(!migration::have_storage_value(PALLET, item, &[])); + } + + assert_is_none(b"Collators"); + assert_is_none(b"Nominators"); + assert_is_none(b"ExposureCacheStates"); + assert_is_none(b"ExposureCache0"); + assert_is_none(b"ExposureCache1"); + assert_is_none(b"ExposureCache2"); + assert_is_none(b"CacheStates"); + assert_is_none(b"CollatorsCache0"); + assert_is_none(b"CollatorsCache1"); + assert_is_none(b"CollatorsCache2"); + assert_is_none(b"MigrationStartPoint"); + assert_is_none(b"RateLimit"); + assert_is_none(b"RateLimitState"); + assert_is_none(b"AuthoredBlocksCount"); + + assert!(>::exists()); + } +} + #[cfg(test)] mod mock; #[cfg(test)] diff --git a/runtime/common/src/migration_helper.rs b/runtime/common/src/migration_helper.rs index d7e2ebcfd..2b3a1be50 100644 --- a/runtime/common/src/migration_helper.rs +++ b/runtime/common/src/migration_helper.rs @@ -1,13 +1,7 @@ pub use frame_support::migration; -// crates.io -use codec::{Decode, Encode}; -// darwinia -use dc_primitives::{AccountId, Balance}; // polkadot-sdk -use frame_support::traits::ReservableCurrency; -use sp_runtime::traits::AppendZerosInput; -use sp_std::prelude::*; +use frame_support::migration; /// Pallet migration helper. pub struct PalletCleaner { @@ -37,145 +31,3 @@ impl PalletCleaner { }) } } - -pub fn migrate_identity() -> u64 -where - C: ReservableCurrency, -{ - let w = migration::clear_storage_prefix(b"AccountMigration", b"Identities", &[], None, None) - .backend; - let w1 = migration::storage_iter_with_suffix::(b"Identity", b"IdentityOf", &[]) - .drain() - .fold(0, |acc, (k, v)| { - if k.len() > 20 { - let mut who = [0u8; 20]; - - who.copy_from_slice(&k[k.len() - 20..]); - - let who = AccountId::from(who); - let deposit = v.deposit - + v.judgements - .iter() - .map(|(_, ref j)| if let Judgement::FeePaid(fee) = j { *fee } else { 0 }) - .sum::(); - - C::unreserve(&who, deposit); - - acc + 3 - } else { - acc - } - }); - - (w + w1) as _ -} - -#[cfg_attr(test, derive(Debug, PartialEq))] -#[derive(Encode)] -struct Registration { - judgements: Vec<(u32, Judgement)>, - deposit: Balance, - info: IdentityInfo, -} -impl Decode for Registration { - fn decode(input: &mut I) -> sp_std::result::Result { - let (judgements, deposit, info) = Decode::decode(&mut AppendZerosInput::new(input))?; - Ok(Self { judgements, deposit, info }) - } -} - -#[cfg_attr(test, derive(Debug, PartialEq))] -#[derive(Encode, Decode)] -enum Judgement { - Unknown, - FeePaid(Balance), - Reasonable, - KnownGood, - OutOfDate, - LowQuality, - Erroneous, -} - -#[cfg_attr(test, derive(Debug, PartialEq))] -#[derive(Encode, Decode)] -struct IdentityInfo { - additional: Vec<(Data, Data)>, - display: Data, - legal: Data, - web: Data, - riot: Data, - email: Data, - pgp_fingerprint: Option<[u8; 20]>, - image: Data, - twitter: Data, -} - -#[cfg_attr(test, derive(Debug, PartialEq))] -enum Data { - None, - Raw(Vec), - BlakeTwo256([u8; 32]), - Sha256([u8; 32]), - Keccak256([u8; 32]), - ShaThree256([u8; 32]), -} -impl Decode for Data { - fn decode(input: &mut I) -> sp_std::result::Result { - let b = input.read_byte()?; - Ok(match b { - 0 => Data::None, - n @ 1..=33 => { - let mut r = vec![0u8; n as usize - 1]; - input.read(&mut r[..])?; - Data::Raw(r) - }, - 34 => Data::BlakeTwo256(<[u8; 32]>::decode(input)?), - 35 => Data::Sha256(<[u8; 32]>::decode(input)?), - 36 => Data::Keccak256(<[u8; 32]>::decode(input)?), - 37 => Data::ShaThree256(<[u8; 32]>::decode(input)?), - _ => return Err(codec::Error::from("invalid leading byte")), - }) - } -} -impl Encode for Data { - fn encode(&self) -> Vec { - match self { - Data::None => vec![0u8; 1], - Data::Raw(ref x) => { - let l = x.len().min(32); - let mut r = vec![l as u8 + 1; l + 1]; - r[1..].copy_from_slice(&x[..l]); - r - }, - Data::BlakeTwo256(ref h) => core::iter::once(34u8).chain(h.iter().cloned()).collect(), - Data::Sha256(ref h) => core::iter::once(35u8).chain(h.iter().cloned()).collect(), - Data::Keccak256(ref h) => core::iter::once(36u8).chain(h.iter().cloned()).collect(), - Data::ShaThree256(ref h) => core::iter::once(37u8).chain(h.iter().cloned()).collect(), - } - } -} - -#[test] -fn identity_codec_should_work() { - let chain_raw_data = "0x040100000003008044fe2307236c0500000000000000000f41757265766f69725861766965720b586176696572204c61752168747470733a2f2f6c696e6b74722e65652f61757265766f69727861766965721b4061757265766f69727861766965723a6d61747269782e6f72671078617669657240696e762e636166650000104041757265766f6972586176696572"; - let encoded = array_bytes::hex2bytes_unchecked(chain_raw_data); - let decoded = Registration::decode(&mut &encoded[..]).unwrap(); - let expected = Registration { - judgements: vec![(1, Judgement::KnownGood)], - deposit: 100_025_800_000_000_000_000, - info: IdentityInfo { - additional: Vec::new(), - display: Data::Raw(b"AurevoirXavier".to_vec()), - legal: Data::Raw(b"Xavier Lau".to_vec()), - web: Data::Raw(b"https://linktr.ee/aurevoirxavier".to_vec()), - riot: Data::Raw(b"@aurevoirxavier:matrix.org".to_vec()), - email: Data::Raw(b"xavier@inv.cafe".to_vec()), - pgp_fingerprint: None, - image: Data::None, - twitter: Data::Raw(b"@AurevoirXavier".to_vec()), - }, - }; - - assert_eq!(decoded, expected); - assert_eq!(encoded, expected.encode()) -} diff --git a/runtime/crab/src/migration.rs b/runtime/crab/src/migration.rs index bf373a08e..8b4d07d4a 100644 --- a/runtime/crab/src/migration.rs +++ b/runtime/crab/src/migration.rs @@ -36,6 +36,8 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::DispatchError> { log::info!("post"); + darwinia_staking::migration::post_check::(); + Ok(()) } @@ -49,5 +51,7 @@ fn migrate() -> frame_support::weights::Weight { let _ = System::kill_storage(RuntimeOrigin::root(), vec![k]); } - ::DbWeight::get().reads_writes(0, 1) + let (r, w) = darwinia_staking::migration::migrate::(); + + ::DbWeight::get().reads_writes(r, w + 1) } diff --git a/runtime/darwinia/src/migration.rs b/runtime/darwinia/src/migration.rs index 198778bb6..23959cc6f 100644 --- a/runtime/darwinia/src/migration.rs +++ b/runtime/darwinia/src/migration.rs @@ -36,6 +36,8 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::DispatchError> { log::info!("post"); + darwinia_staking::migration::post_check::(); + Ok(()) } @@ -45,5 +47,7 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { } fn migrate() -> frame_support::weights::Weight { + let (r, w) = darwinia_staking::migration::migrate::(); + ::DbWeight::get().reads_writes(0, 0) } diff --git a/runtime/koi/src/migration.rs b/runtime/koi/src/migration.rs index 198778bb6..23959cc6f 100644 --- a/runtime/koi/src/migration.rs +++ b/runtime/koi/src/migration.rs @@ -36,6 +36,8 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::DispatchError> { log::info!("post"); + darwinia_staking::migration::post_check::(); + Ok(()) } @@ -45,5 +47,7 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { } fn migrate() -> frame_support::weights::Weight { + let (r, w) = darwinia_staking::migration::migrate::(); + ::DbWeight::get().reads_writes(0, 0) } From 036241de1d615d100618e123b7b27e9d67a5e6e5 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Thu, 31 Oct 2024 09:41:37 +0800 Subject: [PATCH 16/17] Fixes --- runtime/common/src/migration_helper.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/runtime/common/src/migration_helper.rs b/runtime/common/src/migration_helper.rs index 2b3a1be50..2798f6055 100644 --- a/runtime/common/src/migration_helper.rs +++ b/runtime/common/src/migration_helper.rs @@ -1,8 +1,5 @@ pub use frame_support::migration; -// polkadot-sdk -use frame_support::migration; - /// Pallet migration helper. pub struct PalletCleaner { pub name: &'static [u8], From 4b2273707624447edeb0c5b7c59caf251812d6ea Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 6 Nov 2024 10:42:24 +0800 Subject: [PATCH 17/17] Correct r/w count Signed-off-by: Xavier Lau --- runtime/darwinia/src/migration.rs | 2 +- runtime/koi/src/migration.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/darwinia/src/migration.rs b/runtime/darwinia/src/migration.rs index 23959cc6f..350ecc858 100644 --- a/runtime/darwinia/src/migration.rs +++ b/runtime/darwinia/src/migration.rs @@ -49,5 +49,5 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { fn migrate() -> frame_support::weights::Weight { let (r, w) = darwinia_staking::migration::migrate::(); - ::DbWeight::get().reads_writes(0, 0) + ::DbWeight::get().reads_writes(r, w) } diff --git a/runtime/koi/src/migration.rs b/runtime/koi/src/migration.rs index 23959cc6f..350ecc858 100644 --- a/runtime/koi/src/migration.rs +++ b/runtime/koi/src/migration.rs @@ -49,5 +49,5 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { fn migrate() -> frame_support::weights::Weight { let (r, w) = darwinia_staking::migration::migrate::(); - ::DbWeight::get().reads_writes(0, 0) + ::DbWeight::get().reads_writes(r, w) }