From 5fba1e0c655b33027c5ad9733ec5e7cf6cc458fa Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 7 Sep 2023 12:31:26 +0000 Subject: [PATCH 001/125] make rewards calculations aware of curve --- pallets/proof-of-stake/src/lib.rs | 48 +-- pallets/proof-of-stake/src/reward_info.rs | 383 ++++++++++++++++------ 2 files changed, 311 insertions(+), 120 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 426009495e..2ad99bcd19 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -25,7 +25,7 @@ use sp_runtime::{traits::SaturatedConversion, Perbill}; use sp_std::{convert::TryInto, prelude::*}; mod reward_info; -use reward_info::RewardInfo; +use reward_info::{AsymptoticCurveRewards, RewardInfo, RewardsCalculator}; mod benchmarking; #[cfg(test)] @@ -294,11 +294,14 @@ impl Pallet { pool_ratio_at_last_checkpoint: pool_ratio_current, missing_at_last_checkpoint: U256::from(0u128), }); - rewards_info.activate_more::( - current_time, - pool_ratio_current, - liquidity_assets_added, + + let calc = RewardsCalculator::::new::( + liquidity_asset_id, + rewards_info, )?; + let rewards_info = calc + .activate_more(liquidity_assets_added) + .map_err(|err| Into::>::into(err))?; RewardsInfo::::insert(user.clone(), liquidity_asset_id, rewards_info); @@ -332,11 +335,14 @@ impl Pallet { Error::::NotEnoughAssets ); - rewards_info.activate_less::( - current_time, - pool_ratio_current, - liquidity_assets_burned, + let calc = RewardsCalculator::::new::( + liquidity_asset_id, + rewards_info, )?; + let rewards_info = calc + .activate_less(liquidity_assets_burned) + .map_err(|err| Into::>::into(err))?; + RewardsInfo::::insert(user.clone(), liquidity_asset_id, rewards_info); TotalActivatedLiquidity::::try_mutate(liquidity_asset_id, |active_amount| { @@ -395,11 +401,13 @@ impl ProofOfStakeRewardsApi for Pallet { let mut rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; - let pool_rewards_ratio_current = Self::get_pool_rewards(liquidity_asset_id)?; - let current_rewards = rewards_info - .calculate_rewards(Self::get_current_rewards_time()?, pool_rewards_ratio_current) - .ok_or(Error::::CalculateRewardsMathError)?; + let calc = RewardsCalculator::::new::( + liquidity_asset_id, + rewards_info.clone(), + )?; + let current_rewards = + calc.calculate_rewards().map_err(|err| Into::>::into(err))?; let total_available_rewards = current_rewards .checked_add(rewards_info.rewards_not_yet_claimed) @@ -483,14 +491,16 @@ impl ProofOfStakeRewardsApi for Pallet { Self::ensure_is_promoted_pool(liquidity_asset_id)?; let rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; + let current_rewards = match rewards_info.activated_amount { 0 => 0u128, - _ => rewards_info - .calculate_rewards( - Self::get_current_rewards_time()?, - Self::get_pool_rewards(liquidity_asset_id)?, - ) - .ok_or(Error::::CalculateRewardsMathError)?, + _ => { + let calc = RewardsCalculator::::new::( + liquidity_asset_id, + rewards_info.clone(), + )?; + calc.calculate_rewards().map_err(|err| Into::>::into(err))? + }, }; Ok(current_rewards diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 6909f83a7b..00f1aec643 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -1,8 +1,8 @@ use frame_support::dispatch::DispatchResult; -use crate::{Config, Error}; +use crate::{Config, Error, Pallet}; use frame_support::pallet_prelude::*; -use mangata_types::Balance; +use mangata_types::{Balance, TokenId}; use sp_core::U256; use sp_std::{convert::TryInto, prelude::*}; @@ -33,118 +33,62 @@ pub struct RewardInfo { pub missing_at_last_checkpoint: U256, } -impl RewardInfo { - pub fn calculate_missing_at_checkpoint(&self, current_time: u32) -> Option { - let time_passed = current_time.checked_sub(self.last_checkpoint).unwrap(); - let q_pow = calculate_q_pow(Q, time_passed); - Some(self.missing_at_last_checkpoint * U256::from(REWARDS_PRECISION) / q_pow) - } - - pub fn activate_more( - &mut self, - current_time: u32, - pool_ratio_current: U256, - liquidity_assets_added: Balance, - ) -> DispatchResult { - let activated_amount = self - .activated_amount - .checked_add(liquidity_assets_added) - .ok_or(Error::::LiquidityCheckpointMathError)?; - - let missing_at_last_checkpoint = self - .calculate_missing_at_checkpoint(current_time) - .and_then(|v| v.checked_add(U256::from(liquidity_assets_added))) - .ok_or(Error::::LiquidityCheckpointMathError)?; +pub struct RewardsContext { + pub current_time: u32, + pub pool_ratio_current: U256, +} - let user_current_rewards = self - .calculate_rewards(current_time, pool_ratio_current) - .ok_or(Error::::CalculateRewardsMathError)?; +pub struct RewardsCalculator { + rewards_context: RewardsContext, + rewards_info: RewardInfo, + _curve: sp_std::marker::PhantomData, +} - let rewards_not_yet_claimed = user_current_rewards - .checked_add(self.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(self.rewards_already_claimed)) - .ok_or(Error::::LiquidityCheckpointMathError)?; - - self.activated_amount = activated_amount; - self.pool_ratio_at_last_checkpoint = pool_ratio_current; - self.rewards_already_claimed = 0_u128; - self.missing_at_last_checkpoint = missing_at_last_checkpoint; - self.rewards_not_yet_claimed = rewards_not_yet_claimed; - self.last_checkpoint = current_time; - Ok(()) +impl RewardsCalculator { + pub fn new( + asset_id: TokenId, + rewards_info: RewardInfo, + ) -> sp_std::result::Result { + Ok(Self { + rewards_context: RewardsContext { + current_time: Pallet::::get_current_rewards_time()?, + pool_ratio_current: Pallet::::get_pool_rewards(asset_id)?, + }, + rewards_info, + _curve: PhantomData::, + }) } +} - pub fn activate_less( - &mut self, - current_time: u32, - pool_ratio_current: U256, - liquidity_assets_removed: Balance, - ) -> DispatchResult { - let activated_amount = self - .activated_amount - .checked_sub(liquidity_assets_removed) - .ok_or(Error::::LiquidityCheckpointMathError)?; - - let missing_at_checkpoint_new = self - .calculate_missing_at_checkpoint(current_time) - .ok_or(Error::::LiquidityCheckpointMathError)?; +pub trait CurveRewards { + fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option; + fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option; +} - let activated_amount_new = self - .activated_amount - .checked_sub(liquidity_assets_removed) - .ok_or(Error::::LiquidityCheckpointMathError)?; - let missing_at_checkpoint_after_burn = U256::from(activated_amount_new) - .checked_mul(missing_at_checkpoint_new) - .and_then(|v| v.checked_div(self.activated_amount.into())) - .ok_or(Error::::LiquidityCheckpointMathError)?; +pub struct AsymptoticCurveRewards(RewardsContext, RewardInfo); - let user_current_rewards = self - .calculate_rewards(current_time, pool_ratio_current) - .ok_or(Error::::CalculateRewardsMathError)?; - let total_available_rewards = user_current_rewards - .checked_add(self.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(self.rewards_already_claimed)) - .ok_or(Error::::LiquidityCheckpointMathError)?; - - self.activated_amount = activated_amount; - self.pool_ratio_at_last_checkpoint = pool_ratio_current; - self.rewards_already_claimed = 0_u128; - self.missing_at_last_checkpoint = missing_at_checkpoint_after_burn; - self.rewards_not_yet_claimed = total_available_rewards; - self.last_checkpoint = current_time; - Ok(()) +impl CurveRewards for AsymptoticCurveRewards { + fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { + let time_passed = ctx.current_time.checked_sub(user_info.last_checkpoint).unwrap(); + let q_pow = calculate_q_pow(Q, time_passed); + Some(user_info.missing_at_last_checkpoint * U256::from(REWARDS_PRECISION) / q_pow) } - pub fn calculate_rewards( - &self, - current_time: u32, - pool_rewards_ratio_current: U256, - ) -> Option { + fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { let pool_rewards_ratio_new = - pool_rewards_ratio_current.checked_sub(self.pool_ratio_at_last_checkpoint)?; + ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; - let user_rewards_base: U256 = U256::from(self.activated_amount) + let rewards_base: U256 = U256::from(user_info.activated_amount) .checked_mul(pool_rewards_ratio_new)? .checked_div(U256::from(u128::MAX))?; // always fit into u128 - let (cumulative_work, cummulative_work_max_possible) = - self.calculate_cumulative_work_max_ratio(current_time)?; - - user_rewards_base - .checked_mul(cumulative_work)? - .checked_div(cummulative_work_max_possible)? - .try_into() - .ok() - } - - fn calculate_cumulative_work_max_ratio(&self, current_time: u32) -> Option<(U256, U256)> { - let time_passed = current_time.checked_sub(self.last_checkpoint).unwrap(); + let time_passed = ctx.current_time.checked_sub(user_info.last_checkpoint).unwrap(); // .ok_or(Error::::PastTimeCalculation)?; let mut cummulative_work = U256::from(0); let mut cummulative_work_max_possible_for_ratio = U256::from(1); - if time_passed != 0 && self.activated_amount != 0 { - let liquidity_assets_amount_u256: U256 = self.activated_amount.into(); + if time_passed != 0 && user_info.activated_amount != 0 { + let liquidity_assets_amount_u256: U256 = user_info.activated_amount.into(); // whole formula: missing_at_last_checkpoint*106/6 - missing_at_last_checkpoint*106*precision/6/q_pow // q_pow is multiplied by precision, thus there needs to be *precision in numenator as well @@ -154,7 +98,7 @@ impl RewardInfo { // whole formula: missing_at_last_checkpoint*Q*100/(Q*100-100) - missing_at_last_checkpoint*Q*100/(Q*100-100)*REWARDS_PRECISION/q_pow // q_pow is multiplied by precision, thus there needs to be *precision in numenator as well - let base = self + let base = user_info .missing_at_last_checkpoint .checked_mul(U256::from(libm::floor(Q * 100_f64) as u128))? .checked_div(U256::from(libm::floor(Q * 100_f64 - 100_f64) as u128))?; @@ -163,12 +107,249 @@ impl RewardInfo { let cummulative_missing_new = base - base * U256::from(REWARDS_PRECISION) / q_pow - - self.missing_at_last_checkpoint; + user_info.missing_at_last_checkpoint; cummulative_work = - cummulative_work_max_possible_for_ratio.checked_sub(cummulative_missing_new)?; + cummulative_work_max_possible_for_ratio.checked_sub(cummulative_missing_new)? } - Some((cummulative_work, cummulative_work_max_possible_for_ratio)) + rewards_base + .checked_mul(cummulative_work)? + .checked_div(cummulative_work_max_possible_for_ratio)? + .try_into() + .ok() } } + +#[derive(Debug)] +pub enum RewardsCalcError { + CheckpointMathError, +} + +impl Into> for RewardsCalcError { + fn into(self) -> Error { + Error::::LiquidityCheckpointMathError + } +} + +impl RewardsCalculator { + pub fn activate_more( + self, + liquidity_assets_added: Balance, + ) -> sp_std::result::Result { + let activated_amount = self + .rewards_info + .activated_amount + .checked_add(liquidity_assets_added) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let missing_at_last_checkpoint = + T::calculate_curve_position(&self.rewards_context, &self.rewards_info) + .and_then(|v| v.checked_add(U256::from(liquidity_assets_added))) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let user_current_rewards = self.calculate_rewards_impl()?; + + let rewards_not_yet_claimed = user_current_rewards + .checked_add(self.rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + Ok(RewardInfo { + activated_amount, + pool_ratio_at_last_checkpoint: self.rewards_context.pool_ratio_current, + rewards_already_claimed: 0_u128, + missing_at_last_checkpoint, + rewards_not_yet_claimed, + last_checkpoint: self.rewards_context.current_time, + }) + } + + pub fn activate_less( + self, + liquidity_assets_removed: Balance, + ) -> sp_std::result::Result { + let activated_amount = self + .rewards_info + .activated_amount + .checked_sub(liquidity_assets_removed) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let missing_at_checkpoint_new = + T::calculate_curve_position(&self.rewards_context, &self.rewards_info) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let activated_amount_new = self + .rewards_info + .activated_amount + .checked_sub(liquidity_assets_removed) + .ok_or(RewardsCalcError::CheckpointMathError)?; + let missing_at_checkpoint_after_burn = U256::from(activated_amount_new) + .checked_mul(missing_at_checkpoint_new) + .and_then(|v| v.checked_div(self.rewards_info.activated_amount.into())) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let user_current_rewards = self.calculate_rewards_impl()?; + + let total_available_rewards = user_current_rewards + .checked_add(self.rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + Ok(RewardInfo { + activated_amount, + pool_ratio_at_last_checkpoint: self.rewards_context.pool_ratio_current, + rewards_already_claimed: 0_u128, + missing_at_last_checkpoint: missing_at_checkpoint_after_burn, + rewards_not_yet_claimed: total_available_rewards, + last_checkpoint: self.rewards_context.current_time, + }) + } + + pub fn calculate_rewards(self) -> sp_std::result::Result { + self.calculate_rewards_impl() + } + + fn calculate_rewards_impl(&self) -> sp_std::result::Result { + T::calculate_curve_rewards(&self.rewards_context, &self.rewards_info) + .ok_or(RewardsCalcError::CheckpointMathError) + } +} + +// impl RewardInfo { +// pub fn calculate_missing_at_checkpoint(&self, current_time: u32) -> Option { +// let time_passed = current_time.checked_sub(self.last_checkpoint).unwrap(); +// let q_pow = calculate_q_pow(Q, time_passed); +// Some(self.missing_at_last_checkpoint * U256::from(REWARDS_PRECISION) / q_pow) +// } +// +// pub fn activate_more( +// &mut self, +// current_time: u32, +// pool_ratio_current: U256, +// liquidity_assets_added: Balance, +// ) -> DispatchResult { +// let activated_amount = self +// .activated_amount +// .checked_add(liquidity_assets_added) +// .ok_or(Error::::LiquidityCheckpointMathError)?; +// +// let missing_at_last_checkpoint = self +// .calculate_missing_at_checkpoint(current_time) +// .and_then(|v| v.checked_add(U256::from(liquidity_assets_added))) +// .ok_or(Error::::LiquidityCheckpointMathError)?; +// +// let user_current_rewards = self +// .calculate_rewards(current_time, pool_ratio_current) +// .ok_or(Error::::CalculateRewardsMathError)?; +// +// let rewards_not_yet_claimed = user_current_rewards +// .checked_add(self.rewards_not_yet_claimed) +// .and_then(|v| v.checked_sub(self.rewards_already_claimed)) +// .ok_or(Error::::LiquidityCheckpointMathError)?; +// +// self.activated_amount = activated_amount; +// self.pool_ratio_at_last_checkpoint = pool_ratio_current; +// self.rewards_already_claimed = 0_u128; +// self.missing_at_last_checkpoint = missing_at_last_checkpoint; +// self.rewards_not_yet_claimed = rewards_not_yet_claimed; +// self.last_checkpoint = current_time; +// Ok(()) +// } +// +// pub fn activate_less( +// &mut self, +// current_time: u32, +// pool_ratio_current: U256, +// liquidity_assets_removed: Balance, +// ) -> DispatchResult { +// let activated_amount = self +// .activated_amount +// .checked_sub(liquidity_assets_removed) +// .ok_or(Error::::LiquidityCheckpointMathError)?; +// +// let missing_at_checkpoint_new = self +// .calculate_missing_at_checkpoint(current_time) +// .ok_or(Error::::LiquidityCheckpointMathError)?; +// +// let activated_amount_new = self +// .activated_amount +// .checked_sub(liquidity_assets_removed) +// .ok_or(Error::::LiquidityCheckpointMathError)?; +// let missing_at_checkpoint_after_burn = U256::from(activated_amount_new) +// .checked_mul(missing_at_checkpoint_new) +// .and_then(|v| v.checked_div(self.activated_amount.into())) +// .ok_or(Error::::LiquidityCheckpointMathError)?; +// +// let user_current_rewards = self +// .calculate_rewards(current_time, pool_ratio_current) +// .ok_or(Error::::CalculateRewardsMathError)?; +// let total_available_rewards = user_current_rewards +// .checked_add(self.rewards_not_yet_claimed) +// .and_then(|v| v.checked_sub(self.rewards_already_claimed)) +// .ok_or(Error::::LiquidityCheckpointMathError)?; +// +// self.activated_amount = activated_amount; +// self.pool_ratio_at_last_checkpoint = pool_ratio_current; +// self.rewards_already_claimed = 0_u128; +// self.missing_at_last_checkpoint = missing_at_checkpoint_after_burn; +// self.rewards_not_yet_claimed = total_available_rewards; +// self.last_checkpoint = current_time; +// Ok(()) +// } +// +// pub fn calculate_rewards( +// &self, +// current_time: u32, +// pool_rewards_ratio_current: U256, +// ) -> Option { +// let pool_rewards_ratio_new = +// pool_rewards_ratio_current.checked_sub(self.pool_ratio_at_last_checkpoint)?; +// +// let user_rewards_base: U256 = U256::from(self.activated_amount) +// .checked_mul(pool_rewards_ratio_new)? +// .checked_div(U256::from(u128::MAX))?; // always fit into u128 +// +// self.calculate_curve_rewards(user_rewards_base, current_time) +// } +// +// fn calculate_curve_rewards(&self, base_rewards: U256, current_time: u32) -> Option { +// let time_passed = current_time.checked_sub(self.last_checkpoint).unwrap(); +// // .ok_or(Error::::PastTimeCalculation)?; +// let mut cummulative_work = U256::from(0); +// let mut cummulative_work_max_possible_for_ratio = U256::from(1); +// +// if time_passed != 0 && self.activated_amount != 0 { +// let liquidity_assets_amount_u256: U256 = self.activated_amount.into(); +// +// // whole formula: missing_at_last_checkpoint*106/6 - missing_at_last_checkpoint*106*precision/6/q_pow +// // q_pow is multiplied by precision, thus there needs to be *precision in numenator as well +// +// cummulative_work_max_possible_for_ratio = +// liquidity_assets_amount_u256.checked_mul(U256::from(time_passed))?; +// +// // whole formula: missing_at_last_checkpoint*Q*100/(Q*100-100) - missing_at_last_checkpoint*Q*100/(Q*100-100)*REWARDS_PRECISION/q_pow +// // q_pow is multiplied by precision, thus there needs to be *precision in numenator as well +// let base = self +// .missing_at_last_checkpoint +// .checked_mul(U256::from(libm::floor(Q * 100_f64) as u128))? +// .checked_div(U256::from(libm::floor(Q * 100_f64 - 100_f64) as u128))?; +// +// let q_pow = calculate_q_pow(Q, time_passed.checked_add(1)?); +// +// let cummulative_missing_new = base - +// base * U256::from(REWARDS_PRECISION) / q_pow - +// self.missing_at_last_checkpoint; +// +// cummulative_work = +// cummulative_work_max_possible_for_ratio.checked_sub(cummulative_missing_new)? +// } +// +// base_rewards +// .checked_mul(cummulative_work)? +// .checked_div(cummulative_work_max_possible_for_ratio)? +// .try_into() +// .ok() +// +// } +// } From 6c4bfdfda48949d1adf3e9a6e33073016f32c2a8 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 12 Sep 2023 05:29:41 +0000 Subject: [PATCH 002/125] add: PoS::reward_pool extrinsic --- Cargo.lock | 2 +- Cargo.toml | 4 +- pallets/proof-of-stake/Cargo.toml | 1 + pallets/proof-of-stake/src/lib.rs | 187 +++++++++++++++++++-- pallets/proof-of-stake/src/mock.rs | 45 +++++- pallets/proof-of-stake/src/tests.rs | 242 +++++++++++++++++++++++++++- runtime/common/src/lib.rs | 8 +- 7 files changed, 465 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 13f334f04a..18ae550c0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6786,6 +6786,7 @@ dependencies = [ "log", "mangata-support", "mangata-types", + "mockall", "orml-tokens", "orml-traits", "pallet-bootstrap", @@ -7381,7 +7382,6 @@ dependencies = [ [[package]] name = "parachain-staking" version = "3.0.0" -source = "git+https://github.com/mangata-finance//moonbeam?branch=mangata-dev#2ac7a339be795ee58603e3cb68e65fedc1b1c295" dependencies = [ "aquamarine", "frame-benchmarking", diff --git a/Cargo.toml b/Cargo.toml index aeae1a639f..c8c03cba34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,8 +55,8 @@ orml-tokens = { git = "https://github.com/mangata-finance//open-runtime-module-l # patch generated by ./scripts/dev_manifest.sh [patch."https://github.com/mangata-finance/moonbeam"] # parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "feature/update-staking-benchmarks" } -parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "mangata-dev" } -# parachain-staking = { path = "../moonbeam/pallets/parachain-staking" } +# parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "mangata-dev" } +parachain-staking = { path = "../moonbeam/pallets/parachain-staking" } [patch."https://github.com/mangata-finance/crowdloan-rewards"] pallet-crowdloan-rewards = { git = "https://github.com/mangata-finance//crowdloan-rewards", branch = "mangata-dev" } diff --git a/pallets/proof-of-stake/Cargo.toml b/pallets/proof-of-stake/Cargo.toml index 68feb0a224..077522c1fd 100644 --- a/pallets/proof-of-stake/Cargo.toml +++ b/pallets/proof-of-stake/Cargo.toml @@ -41,6 +41,7 @@ lazy_static = "1.1.1" env_logger = "0.9.0" serial_test = { version = "0.6.0", default-features = false } test-case = "2.0.2" +mockall = "0.11.0" [features] default = ['std'] diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 2ad99bcd19..bafc0ccd8c 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -3,10 +3,13 @@ use frame_benchmarking::Zero; use frame_support::{ dispatch::{DispatchError, DispatchResult}, - ensure, + ensure }; use frame_system::ensure_signed; +use frame_support::storage::bounded_btree_map::BoundedBTreeMap; use sp_core::U256; +use sp_runtime::traits::AccountIdConversion; +use mangata_support::traits::Valuate; use frame_support::{ pallet_prelude::*, @@ -54,9 +57,14 @@ pub use weights::WeightInfo; type AccountIdOf = ::AccountId; +const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!"); + #[frame_support::pallet] pub mod pallet { - use super::*; + use frame_support::traits::Currency; +use mangata_support::traits::PoolCreateApi; + +use super::*; #[pallet::pallet] #[pallet::without_storage_info] @@ -66,7 +74,7 @@ pub mod pallet { impl Hooks for Pallet {} #[cfg(feature = "runtime-benchmarks")] - pub trait PoSBenchmarkingConfig: pallet_issuance::Config {} + pub trait PoSBenchmarkingConrfig: pallet_issuance::Config {} #[cfg(feature = "runtime-benchmarks")] impl PoSBenchmarkingConfig for T {} @@ -90,7 +98,10 @@ pub mod pallet { type LiquidityMiningIssuanceVault: Get; #[pallet::constant] type RewardsDistributionPeriod: Get; + type RewardsSchedulesLimit: Get; + type MinRewardsPerSession: Get; type WeightInfo: WeightInfo; + type ValuationApi: Valuate; } #[pallet::error] @@ -112,6 +123,10 @@ pub mod pallet { CalculateRewardsAllMathError, MissingRewardsInfoError, DeprecatedExtrinsic, + CannotScheduleRewardsInPast, + PoolDoesNotExist, + TooManySchedules, + TooLittleRewardsPerSession, } #[pallet::event] @@ -135,6 +150,17 @@ pub mod pallet { ValueQuery, >; + // #[pallet::storage] + // pub type UserRewards3rdPartyInfo = StorageDoubleMap< + // _, + // Twox64Concat, + // AccountIdOf, + // Twox64Concat, + // (TokenId, TokenId), + // RewardInfo, + // ValueQuery, + // >; + #[pallet::storage] /// Stores information about pool weight and accumulated rewards. The accumulated /// rewards amount is the number of rewards that can be claimed per liquidity @@ -143,6 +169,26 @@ pub mod pallet { pub type PromotedPoolRewards = StorageValue<_, BTreeMap, ValueQuery>; + #[pallet::storage] + pub type PromotedPoolRewards3rdParty = StorageValue<_, BTreeMap, ValueQuery>; + + #[pallet::storage] + #[pallet::getter(fn schedules)] + pub type RewardsSchedules = + StorageValue<_, BoundedBTreeMap<(T::BlockNumber, TokenId, TokenId, Balance, u64), (), T::RewardsSchedulesLimit>, ValueQuery>; + + #[pallet::storage] + pub type ScheduleId = StorageValue<_, u64, ValueQuery>; + + + // #[pallet::storage] + // pub type Rewards3rdParty = + // StorageValue<_, BTreeMap, ValueQuery>; + // + // #[pallet::storage] + // pub type Rewards3rdParty = + // StorageValue<_, BTreeMap, ValueQuery>; + #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo)] /// Information about single token rewards pub struct PromotedPools { @@ -242,10 +288,88 @@ pub mod pallet { amount, ) } + + /// Schedules rewards for selected liquidity token + /// - tokens - pair of tokens + /// - amount - amount of the token + /// - schedule_end - till when the rewards should be distributed, rewards are + /// distributed starting from the *next* session till + #[transactional] + #[pallet::call_index(4)] + #[pallet::weight(<::WeightInfo>::claim_rewards_all())] + pub fn reward_pool( + origin: OriginFor, + pool: (TokenId, TokenId), + token_id: TokenId, + amount: Balance, + schedule_end: T::BlockNumber, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + let rewarded_token = ::ValuationApi::get_liquidity_asset(pool.0, pool.1) + .map_err(|_| Error::::PoolDoesNotExist)?; + + let current_session = Self::session_index(); + ensure!( + schedule_end.saturated_into::() > current_session, + Error::::CannotScheduleRewardsInPast + ); + + let amount_per_session = schedule_end.saturated_into::() + .checked_sub(current_session) + .and_then(|v| amount.checked_div(v.into())) + .ok_or(Error::::MathOverflow)?; + + // TODO: use valuation instead amount directly + ensure!(amount_per_session >= T::MinRewardsPerSession::get(), Error::::TooLittleRewardsPerSession); + + + T::Currency::transfer( + token_id.into(), + &sender, + &Self::pallet_account(), + amount.into(), + ExistenceRequirement::KeepAlive, + )?; + + let current_session = Self::session_index(); + let schedule_id = ScheduleId::::get(); + + RewardsSchedules::::try_mutate(|map| { + + let key: Option<(_,_,_,_,_)> = map + .first_key_value() + .map(|(x,y)| x.clone()); + + + if let Some(val) = key { + if current_session > val.0.saturated_into::() { + map.remove_entry(&val); + } + } + + map.try_insert((schedule_end, rewarded_token, token_id, amount_per_session, schedule_id), ()) + }).or(Err(Error::::TooManySchedules))?; + + ScheduleId::::mutate(|v| *v += 1); + + Ok(()) + } } } impl Pallet { + fn pallet_account() -> T::AccountId { + PALLET_ID.into_account_truncating() + } + + pub fn session_index() -> u32 { + frame_system::Pallet::::block_number() + .saturated_into::() + .checked_div(T::RewardsDistributionPeriod::get()) + .unwrap_or(0) + } + pub fn rewards_period() -> u32 { ::RewardsDistributionPeriod::get() } @@ -285,27 +409,32 @@ impl Pallet { Self::ensure_is_promoted_pool(liquidity_asset_id)?; let current_time: u32 = Self::get_current_rewards_time()?; let pool_ratio_current = Self::get_pool_rewards(liquidity_asset_id)?; - let mut rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) - .unwrap_or(RewardInfo { + let default_rewards = RewardInfo { activated_amount: 0_u128, rewards_not_yet_claimed: 0_u128, rewards_already_claimed: 0_u128, last_checkpoint: current_time, pool_ratio_at_last_checkpoint: pool_ratio_current, missing_at_last_checkpoint: U256::from(0u128), - }); + }; - let calc = RewardsCalculator::::new::( - liquidity_asset_id, - rewards_info, - )?; - let rewards_info = calc - .activate_more(liquidity_assets_added) - .map_err(|err| Into::>::into(err))?; - RewardsInfo::::insert(user.clone(), liquidity_asset_id, rewards_info); + // Curved rewards + { + let mut rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) + .unwrap_or(default_rewards); + let calc = RewardsCalculator::::new::( + liquidity_asset_id, + rewards_info, + )?; + let rewards_info = calc + .activate_more(liquidity_assets_added) + .map_err(|err| Into::>::into(err))?; + + RewardsInfo::::insert(user.clone(), liquidity_asset_id, rewards_info); + } + - //TODO: refactor storage name TotalActivatedLiquidity::::try_mutate(liquidity_asset_id, |active_amount| { if let Some(val) = active_amount.checked_add(liquidity_assets_added) { *active_amount = val; @@ -513,6 +642,34 @@ impl ProofOfStakeRewardsApi for Pallet { impl LiquidityMiningApi for Pallet { /// Distributs liquidity mining rewards between all the activated tokens based on their weight fn distribute_rewards(liquidity_mining_rewards: Balance) { + + let schedules = RewardsSchedules::::get(); + let mut pools = PromotedPoolRewards3rdParty::::get(); + + let it = schedules + .iter() + .filter_map(|((session, rewarded_token, tokenid, amount, _),())|{ + if (*session).saturated_into::() <= Self::session_index() { + Some((rewarded_token, tokenid, amount)) + } else { + None + } + }); + + for (staked_token, token, amount) in it { + let activated_amount = Self::total_activated_amount(token); + let rewards = pools.get(token).cloned().unwrap_or_default(); + let rewards_for_liquidity = U256::from(*amount) + .checked_mul(U256::from(u128::MAX)) + .and_then(|x| x.checked_div(activated_amount.into())) + .and_then(|x| x.checked_add(rewards)); + + if let Some(val) = rewards_for_liquidity { + pools.insert(*token, val); + } + } + + let _ = PromotedPoolRewards::::try_mutate(|promoted_pools| -> DispatchResult { // benchmark with max of X prom pools let activated_pools: Vec<_> = promoted_pools diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index fa95825027..651feb810d 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -12,7 +12,7 @@ use sp_runtime::{ use crate as pos; use frame_support::{ construct_runtime, parameter_types, - traits::{tokens::currency::MultiTokenCurrency, ConstU32, Contains, Everything}, + traits::{tokens::currency::MultiTokenCurrency, ConstU32, ConstU128, Contains, Everything}, PalletId, }; @@ -202,6 +202,45 @@ lazy_static::lazy_static! { }; } +mockall::mock! { + pub ValuationApi {} + + impl Valuate for ValuationApi { + type Balance = Balance; + type CurrencyId = TokenId; + + fn get_liquidity_asset( + first_asset_id: TokenId, + second_asset_id: TokenId, + ) -> Result; + + fn get_liquidity_token_mga_pool( + liquidity_token_id: TokenId, + ) -> Result<(TokenId, TokenId), DispatchError>; + + fn valuate_liquidity_token( + liquidity_token_id: TokenId, + liquidity_token_amount: Balance, + ) -> Balance; + + fn scale_liquidity_by_mga_valuation( + mga_valuation: Balance, + liquidity_token_amount: Balance, + mga_token_amount: Balance, + ) -> Balance; + + fn get_pool_state(liquidity_token_id: TokenId) -> Option<(Balance, Balance)>; + + fn get_reserves( + first_asset_id: TokenId, + second_asset_id: TokenId, + ) -> Result<(Balance, Balance), DispatchError>; + + + + } +} + impl pos::Config for Test { type RuntimeEvent = RuntimeEvent; type ActivationReservesProvider = TokensActivationPassthrough; @@ -209,7 +248,10 @@ impl pos::Config for Test { type Currency = MultiTokenCurrencyAdapter; type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10>; + type RewardsSchedulesLimit = ConstU32<10>; + type MinRewardsPerSession = ConstU128<10>; type WeightInfo = (); + type ValuationApi = MockValuationApi; } pub struct TokensActivationPassthrough(PhantomData); @@ -327,3 +369,4 @@ macro_rules! assert_event_emitted { } }; } + diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index ea311c85d2..c11a2fac4e 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -3,6 +3,7 @@ #![allow(non_snake_case)] use super::*; +use serial_test::serial; use crate::mock::*; use frame_support::{assert_err, assert_ok}; @@ -34,6 +35,16 @@ fn initialize_liquidity_rewards() { ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); } + +pub(crate) fn roll_to_session(n: u32) { + let block = n * Pallet::::rewards_period(); + + if block < System::block_number().saturated_into::() { + panic!("cannot roll to past block"); + } + forward_to_block(block); +} + fn forward_to_block(n: u32) { forward_to_block_with_custom_rewards(n, 10000); } @@ -41,7 +52,6 @@ fn forward_to_block(n: u32) { fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { while System::block_number().saturated_into::() <= n { if System::block_number().saturated_into::() % ProofOfStake::rewards_period() == 0 { - println!("NEW SESSION"); ProofOfStake::distribute_rewards(rewards); } System::set_block_number(System::block_number().saturated_into::() + 1); @@ -966,6 +976,7 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { }); } + pub(crate) fn roll_to_while_minting(n: u64, expected_amount_minted: Option) { let mut session_number: u32; let mut session_issuance: (Balance, Balance); @@ -1090,3 +1101,232 @@ fn claim_rewards_from_pool_that_has_been_disabled() { assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 0); }); } + +const MILLION: u128 = 1_000_000; +const ALICE: u128 = 2; +const BOB: u128 = 3; + +#[test] +#[serial] +fn user_can_provide_3rdparty_rewards() { + new_test_ext().execute_with(|| { + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(10u32)); + + System::set_block_number(1); + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 10u32.into()).unwrap(); + roll_to_session(5); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 6u32.into()).unwrap(); + }); +} + +#[test] +#[serial] +fn cant_schedule_rewards_in_past() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(10u32)); + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + roll_to_session(5); + assert_err!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair,token_id, amount, 1u32.into()), + Error::::CannotScheduleRewardsInPast + ); + assert_err!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair,token_id, amount, 4u32.into()), + Error::::CannotScheduleRewardsInPast + ); + assert_err!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair,token_id, amount, 5u32.into()), + Error::::CannotScheduleRewardsInPast + ); + }); +} + +#[test] +#[serial] +fn cannot_reward_unexisting_pool() { + new_test_ext().execute_with(|| { + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Err(Error::::PoolDoesNotExist.into())); + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + assert_err!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()), + Error::::PoolDoesNotExist + ); + + }); +} + +#[test] +#[serial] +fn rewards_are_stored_in_pallet_account() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(10u32)); + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + assert_eq!(TokensOf::::free_balance(token_id, &Pallet::::pallet_account()), 0); + assert_eq!(TokensOf::::free_balance(token_id, &ALICE), MILLION); + + assert_ok!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()), + ); + + assert_eq!(TokensOf::::free_balance(token_id, &ALICE), MILLION - amount); + assert_eq!(TokensOf::::free_balance(token_id, &Pallet::::pallet_account()), amount); + }); +} + +#[test] +#[serial] +fn rewards_schedule_is_stored() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let liquidity_token_id = 10u32; + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(liquidity_token_id)); + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + assert_ok!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()), + ); + + assert_eq!( + ProofOfStake::schedules().into_inner(), + BTreeMap::from([((5u64, liquidity_token_id, token_id, amount/5, 0), ())]) + ); + + }); +} + +#[test] +#[serial] +fn number_of_active_schedules_is_limited() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(10u32)); + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + + let max_schedules: u32 = <::RewardsSchedulesLimit as sp_core::Get<_>>::get(); + for i in 0..(max_schedules) { + assert_ok!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, (5u32 + i).into()) + ); + } + + assert_err!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 100u32.into()), + Error::::TooManySchedules + ); + + roll_to_session(10); + + assert_ok!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 100u32.into()) + ); + + }); +} + +#[test] +#[serial] +fn duplicated_schedules_works() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(10u32)); + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + + assert_ok!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()) + ); + + assert_eq!(1, ProofOfStake::schedules().len()); + + assert_ok!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()) + ); + assert_eq!(2, ProofOfStake::schedules().len()); + + }); +} + + +#[test] +#[serial] +fn reject_schedule_with_too_little_rewards_per_session() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(10u32)); + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + roll_to_session(4); + + let min_rewards = <::MinRewardsPerSession as sp_core::Get>::get(); + + assert_err!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, min_rewards - 1, 5u32.into()), + Error::::TooLittleRewardsPerSession + ); + + assert_ok!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, min_rewards, 5u32.into()) + ); + }); +} + + +#[test] +#[serial] +fn user_can_claim_3rdparty_rewards() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(10u32)); + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + + assert_ok!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()) + ); + + }); +} diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 7eb1bfdb64..69c8dd3170 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1150,13 +1150,13 @@ where /// Reward payments delay (number of rounds) pub const RewardPaymentDelay: u32 = 2; /// Minimum collators selected per round, default at genesis and minimum forever after - pub const MinSelectedCandidates: u32 = 25; + pub const MinSelectedCandidates: u32 = 50; /// Maximum collator candidates allowed - pub const MaxCollatorCandidates: u32 = 50; + pub const MaxCollatorCandidates: u32 = 100; /// Maximum delegators allowed per candidate - pub const MaxTotalDelegatorsPerCandidate: u32 = 25; + pub const MaxTotalDelegatorsPerCandidate: u32 = 30; /// Maximum delegators counted per candidate - pub const MaxDelegatorsPerCandidate: u32 = 12; + pub const MaxDelegatorsPerCandidate: u32 = 30; /// Maximum delegations per delegator pub const MaxDelegationsPerDelegator: u32 = 30; /// Default fixed percent a collator takes off the top of due rewards From 1709ea7c9d08359272995a50edcd75c190746bd1 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 15 Sep 2023 11:37:52 +0200 Subject: [PATCH 003/125] preliminary rewards claim --- pallets/proof-of-stake/src/lib.rs | 162 +++++++++++++++++----- pallets/proof-of-stake/src/mock.rs | 1 + pallets/proof-of-stake/src/reward_info.rs | 77 +++++++++- pallets/proof-of-stake/src/tests.rs | 63 ++++++++- 4 files changed, 263 insertions(+), 40 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index bafc0ccd8c..8f567cb557 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -28,7 +28,7 @@ use sp_runtime::{traits::SaturatedConversion, Perbill}; use sp_std::{convert::TryInto, prelude::*}; mod reward_info; -use reward_info::{AsymptoticCurveRewards, RewardInfo, RewardsCalculator}; +use reward_info::{AsymptoticCurveRewards, ConstCurveRewards, RewardInfo, RewardsCalculator}; mod benchmarking; #[cfg(test)] @@ -100,6 +100,7 @@ use super::*; type RewardsDistributionPeriod: Get; type RewardsSchedulesLimit: Get; type MinRewardsPerSession: Get; + type MaxRewardTokensPerPool: Get; type WeightInfo: WeightInfo; type ValuationApi: Valuate; } @@ -127,6 +128,7 @@ use super::*; PoolDoesNotExist, TooManySchedules, TooLittleRewardsPerSession, + PoolRewardTokensLimitExceeded, } #[pallet::event] @@ -150,16 +152,16 @@ use super::*; ValueQuery, >; - // #[pallet::storage] - // pub type UserRewards3rdPartyInfo = StorageDoubleMap< - // _, - // Twox64Concat, - // AccountIdOf, - // Twox64Concat, - // (TokenId, TokenId), - // RewardInfo, - // ValueQuery, - // >; + #[pallet::storage] + pub type UserRewards3rdPartyInfo = StorageDoubleMap< + _, + Twox64Concat, + AccountIdOf, + Twox64Concat, + (TokenId, TokenId), + RewardInfo, + ValueQuery, + >; #[pallet::storage] /// Stores information about pool weight and accumulated rewards. The accumulated @@ -170,13 +172,18 @@ use super::*; StorageValue<_, BTreeMap, ValueQuery>; #[pallet::storage] - pub type PromotedPoolRewards3rdParty = StorageValue<_, BTreeMap, ValueQuery>; + pub type PromotedPoolRewards3rdParty = StorageValue<_, BTreeMap<(TokenId, TokenId), U256>, ValueQuery>; + + // pub type PromotedPoolRewards3rdParty = StorageValue<_, BTreeMap<(TokenId), U256>, ValueQuery>; #[pallet::storage] #[pallet::getter(fn schedules)] pub type RewardsSchedules = StorageValue<_, BoundedBTreeMap<(T::BlockNumber, TokenId, TokenId, Balance, u64), (), T::RewardsSchedulesLimit>, ValueQuery>; + #[pallet::storage] + pub type RewardTokensPerPool = StorageMap<_, Twox64Concat, TokenId, BoundedBTreeMap, ValueQuery>; + #[pallet::storage] pub type ScheduleId = StorageValue<_, u64, ValueQuery>; @@ -322,7 +329,14 @@ use super::*; // TODO: use valuation instead amount directly ensure!(amount_per_session >= T::MinRewardsPerSession::get(), Error::::TooLittleRewardsPerSession); + println!("hello worldd!!!!"); + RewardTokensPerPool::::try_mutate(rewarded_token, |tokens| { + println!("{tokens:?}"); + tokens.try_insert(token_id,()) + }).or(Err(Error::::PoolRewardTokensLimitExceeded))?; + + println!("{rewarded_token} =>>> {:?}",RewardTokensPerPool::::get(rewarded_token)); T::Currency::transfer( token_id.into(), @@ -359,6 +373,50 @@ use super::*; } impl Pallet { + + fn calculate_rewards_amount_3rdparty( + user: AccountIdOf, + liquidity_asset_id: TokenId, + ) -> Result, DispatchError> { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + let mut result: sp_std::vec::Vec<_> = Default::default(); + + // TODO: get rid of collect + let reward_tokens = RewardTokensPerPool::::get(liquidity_asset_id) + .iter() + .map(|(x,_)| *x) + .collect::>(); + + + for i in reward_tokens{ + println!(";iittititiitititit"); + + let rewards_info = UserRewards3rdPartyInfo::::try_get(user.clone(), (liquidity_asset_id, i)); + println!("REWARDS INFO {rewards_info:?}"); + if let Ok(info) = rewards_info{ + let current_rewards = match info.activated_amount { + 0 => 0u128, + _ => { + let calc = RewardsCalculator::::new2::( + user.clone(), + liquidity_asset_id, + i + )?; + calc.calculate_rewards().map_err(|err| Into::>::into(err))? + }, + }; + + let total_rewards = current_rewards + .checked_add(info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(info.rewards_already_claimed)) + .ok_or(Error::::CalculateRewardsMathError)?; + result.push((i, total_rewards)); + } + } + Ok(result) + + } fn pallet_account() -> T::AccountId { PALLET_ID.into_account_truncating() } @@ -385,6 +443,15 @@ impl Pallet { .ok_or(Error::::NotAPromotedPool)?) } + fn get_pool_rewards_3rdparty(liquidity_asset_id: TokenId, reward_asset_id: TokenId) -> Result { + println!("ret_pool_rewards_3rdparty {liquidity_asset_id} {reward_asset_id}"); + Ok(*PromotedPoolRewards3rdParty::::get() + .get(&(liquidity_asset_id, reward_asset_id)) + //TODO: no error or some dedicated error + .ok_or(Error::::NotAPromotedPool)?) + } + + fn get_current_rewards_time() -> Result { >::block_number() .saturated_into::() @@ -394,9 +461,12 @@ impl Pallet { } fn ensure_is_promoted_pool(liquidity_asset_id: TokenId) -> Result<(), DispatchError> { - if Self::get_pool_rewards(liquidity_asset_id).is_ok() { + println!("ensure_is_promoted_pool {liquidity_asset_id}"); + if Self::get_pool_rewards(liquidity_asset_id).is_ok() || !RewardTokensPerPool::::get(liquidity_asset_id).is_empty() { + println!("ensure_is_promoted_pool ok"); Ok(()) } else { + println!("ensure_is_promoted_pool err"); Err(DispatchError::from(Error::::NotAPromotedPool)) } } @@ -407,25 +477,37 @@ impl Pallet { liquidity_assets_added: Balance, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - let current_time: u32 = Self::get_current_rewards_time()?; - let pool_ratio_current = Self::get_pool_rewards(liquidity_asset_id)?; - let default_rewards = RewardInfo { - activated_amount: 0_u128, - rewards_not_yet_claimed: 0_u128, - rewards_already_claimed: 0_u128, - last_checkpoint: current_time, - pool_ratio_at_last_checkpoint: pool_ratio_current, - missing_at_last_checkpoint: U256::from(0u128), - }; + println!("set_liquidity_minting_checkpoint1"); + + { + let reward_tokens = RewardTokensPerPool::::get(liquidity_asset_id) + .iter() + .map(|(x,_)| *x) + // NOTE: get rid of collect + .collect::>(); + + + for i in reward_tokens{ + let calc = RewardsCalculator::::new2::( + user.clone(), + liquidity_asset_id, + i + )?; + + let rewards_info = calc + .activate_more(liquidity_assets_added) + .map_err(|err| Into::>::into(err))?; + + UserRewards3rdPartyInfo::::insert(user.clone(), (liquidity_asset_id,i), rewards_info); + } + } + println!("set_liquidity_minting_checkpoint2"); - // Curved rewards { - let mut rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) - .unwrap_or(default_rewards); let calc = RewardsCalculator::::new::( + user.clone(), liquidity_asset_id, - rewards_info, )?; let rewards_info = calc .activate_more(liquidity_assets_added) @@ -435,11 +517,15 @@ impl Pallet { } + println!("set_liquidity_minting_checkpoint3"); + TotalActivatedLiquidity::::try_mutate(liquidity_asset_id, |active_amount| { if let Some(val) = active_amount.checked_add(liquidity_assets_added) { + println!("!!!!!!!!!!!!!!!!!!!!!!!!!"); *active_amount = val; Ok(()) } else { + println!("$$$$$$$$$$$$$$$$$$$$$$$$$"); Err(()) } }) @@ -465,8 +551,8 @@ impl Pallet { ); let calc = RewardsCalculator::::new::( + user.clone(), liquidity_asset_id, - rewards_info, )?; let rewards_info = calc .activate_less(liquidity_assets_burned) @@ -532,8 +618,8 @@ impl ProofOfStakeRewardsApi for Pallet { .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; let calc = RewardsCalculator::::new::( + user.clone(), liquidity_asset_id, - rewards_info.clone(), )?; let current_rewards = calc.calculate_rewards().map_err(|err| Into::>::into(err))?; @@ -572,6 +658,7 @@ impl ProofOfStakeRewardsApi for Pallet { use_balance_from: Option, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; + println!("activate_liquidity"); ensure!( ::ActivationReservesProvider::can_activate( liquidity_asset_id, @@ -613,6 +700,7 @@ impl ProofOfStakeRewardsApi for Pallet { Ok(()) } + fn calculate_rewards_amount( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -625,8 +713,8 @@ impl ProofOfStakeRewardsApi for Pallet { 0 => 0u128, _ => { let calc = RewardsCalculator::::new::( + user.clone(), liquidity_asset_id, - rewards_info.clone(), )?; calc.calculate_rewards().map_err(|err| Into::>::into(err))? }, @@ -649,7 +737,7 @@ impl LiquidityMiningApi for Pallet { let it = schedules .iter() .filter_map(|((session, rewarded_token, tokenid, amount, _),())|{ - if (*session).saturated_into::() <= Self::session_index() { + if (*session).saturated_into::() > Self::session_index() { Some((rewarded_token, tokenid, amount)) } else { None @@ -657,17 +745,23 @@ impl LiquidityMiningApi for Pallet { }); for (staked_token, token, amount) in it { - let activated_amount = Self::total_activated_amount(token); - let rewards = pools.get(token).cloned().unwrap_or_default(); + println!("STAKED TOKEN: {staked_token} TOKEN: {token} AMOUNT: {amount}"); + + let activated_amount = Self::total_activated_amount(staked_token); + println!("ACTIVATED AMOUNT: {activated_amount}"); + // NOTE: fix + let rewards = pools.get(&(*staked_token, *token)).cloned().unwrap_or_default(); let rewards_for_liquidity = U256::from(*amount) .checked_mul(U256::from(u128::MAX)) .and_then(|x| x.checked_div(activated_amount.into())) .and_then(|x| x.checked_add(rewards)); if let Some(val) = rewards_for_liquidity { - pools.insert(*token, val); + pools.insert((*staked_token,*token), val); } } + println!("STORING POOLS: {pools:?}"); + PromotedPoolRewards3rdParty::::put(pools); let _ = PromotedPoolRewards::::try_mutate(|promoted_pools| -> DispatchResult { diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 651feb810d..2bd2de9286 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -250,6 +250,7 @@ impl pos::Config for Test { type RewardsDistributionPeriod = ConstU32<10>; type RewardsSchedulesLimit = ConstU32<10>; type MinRewardsPerSession = ConstU128<10>; + type MaxRewardTokensPerPool = ConstU32<5>; type WeightInfo = (); type ValuationApi = MockValuationApi; } diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 00f1aec643..0e042cb004 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -44,27 +44,78 @@ pub struct RewardsCalculator { _curve: sp_std::marker::PhantomData, } -impl RewardsCalculator { +impl RewardsCalculator { pub fn new( + user: T::AccountId, asset_id: TokenId, - rewards_info: RewardInfo, ) -> sp_std::result::Result { + let current_time: u32 = Pallet::::get_current_rewards_time()?; + let pool_ratio_current = Pallet::::get_pool_rewards(asset_id)?; + let default_rewards = RewardInfo { + activated_amount: 0_u128, + rewards_not_yet_claimed: 0_u128, + rewards_already_claimed: 0_u128, + last_checkpoint: current_time, + pool_ratio_at_last_checkpoint: pool_ratio_current, + missing_at_last_checkpoint: U256::from(0u128), + }; + + let rewards_info = crate::RewardsInfo::::try_get(user.clone(), asset_id) + .unwrap_or(default_rewards); + Ok(Self { rewards_context: RewardsContext { current_time: Pallet::::get_current_rewards_time()?, pool_ratio_current: Pallet::::get_pool_rewards(asset_id)?, }, rewards_info, - _curve: PhantomData::, + _curve: PhantomData::, }) } } +impl RewardsCalculator { + pub fn new2( + user: T::AccountId, + asset_id: TokenId, + reward_asset_id: TokenId, + ) -> sp_std::result::Result { + + let current_time: u32 = Pallet::::get_current_rewards_time()?; + + // TODO: do not ignore error + let pool_ratio_current = Pallet::::get_pool_rewards_3rdparty(asset_id, reward_asset_id).unwrap_or_default(); + let default_rewards = RewardInfo { + activated_amount: 0_u128, + rewards_not_yet_claimed: 0_u128, + rewards_already_claimed: 0_u128, + last_checkpoint: current_time, + pool_ratio_at_last_checkpoint: pool_ratio_current, + missing_at_last_checkpoint: U256::from(0u128), + }; + + let rewards_info = crate::RewardsInfo::::try_get(user.clone(), asset_id) + .unwrap_or(default_rewards); + + Ok(Self { + rewards_context: RewardsContext { + current_time: Pallet::::get_current_rewards_time()?, + pool_ratio_current, + }, + rewards_info, + _curve: PhantomData::, + }) + + } +} + + pub trait CurveRewards { fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option; fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option; } +pub struct ConstCurveRewards(RewardsContext, RewardInfo); pub struct AsymptoticCurveRewards(RewardsContext, RewardInfo); impl CurveRewards for AsymptoticCurveRewards { @@ -121,6 +172,26 @@ impl CurveRewards for AsymptoticCurveRewards { } } +impl CurveRewards for ConstCurveRewards { + fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { + Some( U256::from(0) ) + } + + fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { + println!("context: {:?}", ctx.pool_ratio_current); + let pool_rewards_ratio_new = + ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; + let rewards_base: U256 = U256::from(user_info.activated_amount) + .checked_mul(pool_rewards_ratio_new)? + .checked_div(U256::from(u128::MAX))?; // always fit into u128 + println!("BASE : {rewards_base}"); + + rewards_base + .try_into() + .ok() + } +} + #[derive(Debug)] pub enum RewardsCalcError { CheckpointMathError, diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index c11a2fac4e..b3f1373736 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1105,6 +1105,8 @@ fn claim_rewards_from_pool_that_has_been_disabled() { const MILLION: u128 = 1_000_000; const ALICE: u128 = 2; const BOB: u128 = 3; +const CHARLIE: u128 = 4; +const EVE: u128 = 5; #[test] #[serial] @@ -1310,23 +1312,78 @@ fn reject_schedule_with_too_little_rewards_per_session() { }); } +#[test] +#[serial] +fn number_of_reward_tokens_per_pool_is_limited() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(10u32)); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + for _ in 0..<::MaxRewardTokensPerPool as sp_core::Get>::get() { + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + assert_ok!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()) + ); + } + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + assert_err!( + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()), + Error::::PoolRewardTokensLimitExceeded + ); + + + + }); +} + #[test] #[serial] fn user_can_claim_3rdparty_rewards() { new_test_ext().execute_with(|| { System::set_block_number(1); + const LIQUIDITY_TOKEN : u32 = 5; let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(10u32)); + valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); let amount = 10_000u128; + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::activate_liquidity(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None).unwrap(); + + roll_to_session(1); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, ), + Ok(vec![(token_id, 1000)]) + ); - assert_ok!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()) + roll_to_session(2); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, ), + Ok(vec![(token_id, 2000)]) ); + + + }); } From 0fb361b9bec2b2ba6c00791ddc585438a85bd271 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 20 Sep 2023 15:12:08 +0200 Subject: [PATCH 004/125] wip --- pallets/proof-of-stake/src/lib.rs | 455 ++++++++++++++++------ pallets/proof-of-stake/src/reward_info.rs | 153 +------- pallets/proof-of-stake/src/tests.rs | 178 ++++++++- 3 files changed, 525 insertions(+), 261 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 8f567cb557..12258cf33d 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -55,6 +55,12 @@ pub use pallet::*; pub mod weights; pub use weights::WeightInfo; +#[derive(Eq, PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +pub enum ScheduleActivationKind { + ActivateKind(Option), + ActivatedLiquidity(TokenId) +} + type AccountIdOf = ::AccountId; const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!"); @@ -212,6 +218,11 @@ use super::*; pub type TotalActivatedLiquidity = StorageMap<_, Twox64Concat, TokenId, u128, ValueQuery>; + // NOTE: possibly merge with above + #[pallet::storage] + pub type TotalActivatedLiquidity3rdParty = + StorageMap<_, Twox64Concat, TokenId, BTreeMap, ValueQuery>; + #[pallet::call] impl Pallet { /// Claims liquidity mining rewards @@ -270,7 +281,7 @@ use super::*; ) -> DispatchResult { let sender = ensure_signed(origin)?; - >::activate_liquidity( + Self::activate_liquidity_for_liquidity_minting( sender, liquidity_token_id, amount, @@ -329,14 +340,14 @@ use super::*; // TODO: use valuation instead amount directly ensure!(amount_per_session >= T::MinRewardsPerSession::get(), Error::::TooLittleRewardsPerSession); - println!("hello worldd!!!!"); + RewardTokensPerPool::::try_mutate(rewarded_token, |tokens| { - println!("{tokens:?}"); + tokens.try_insert(token_id,()) }).or(Err(Error::::PoolRewardTokensLimitExceeded))?; - println!("{rewarded_token} =>>> {:?}",RewardTokensPerPool::::get(rewarded_token)); + T::Currency::transfer( token_id.into(), @@ -369,54 +380,244 @@ use super::*; Ok(()) } + + /// Increases number of tokens used for liquidity mining purposes. + /// + /// Parameters: + /// - liquidity_token_id - id of the token + /// - amount - amount of the token + /// - use_balance_from - where from tokens should be used + #[transactional] + #[pallet::call_index(5)] + #[pallet::weight(<::WeightInfo>::activate_liquidity())] + pub fn activate_liquidity_for_rewards_schedule( + origin: OriginFor, + liquidity_token_id: TokenId, + amount: Balance, + reward_token: TokenId, + use_balance_from: Option, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + Self::activate_liquidity_for_schedule( + sender, + liquidity_token_id, + amount, + use_balance_from.unwrap_or(ScheduleActivationKind::ActivateKind(None)), + reward_token, + ) + } + + /// Increases number of tokens used for liquidity mining purposes. + /// + /// Parameters: + /// - liquidity_token_id - id of the token + /// - amount - amount of the token + /// - use_balance_from - where from tokens should be used + #[transactional] + #[pallet::call_index(6)] + #[pallet::weight(<::WeightInfo>::activate_liquidity())] + pub fn deactivate_liquidity_for_rewards_schedule( + origin: OriginFor, + liquidity_token_id: TokenId, + amount: Balance, + reward_token: TokenId, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + Self::deactivate_liquidity_for_schedule( + sender, + liquidity_token_id, + amount, + reward_token, + ) + } + } } +pub enum RewardsKind{ + RewardsLiquidityMinting, + Rewards3rdParty(TokenId), +} + impl Pallet { - fn calculate_rewards_amount_3rdparty( + fn activate_liquidity_for_schedule( user: AccountIdOf, liquidity_asset_id: TokenId, - ) -> Result, DispatchError> { + amount: Balance, + use_balance_from: ScheduleActivationKind, + reward_token: TokenId + ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - let mut result: sp_std::vec::Vec<_> = Default::default(); + match use_balance_from{ + ScheduleActivationKind::ActivateKind(ref use_balance_from) => { + ensure!( + ::ActivationReservesProvider::can_activate( + liquidity_asset_id, + &user, + amount, + use_balance_from.clone(), + ), + Error::::NotEnoughAssets + ); + }, + ScheduleActivationKind::ActivatedLiquidity(token_id) => { + let already_activated_amount = + UserRewards3rdPartyInfo::::get(user.clone(), (liquidity_asset_id, reward_token)).activated_amount; + let available_amount = + UserRewards3rdPartyInfo::::get(user.clone(), (liquidity_asset_id, token_id)).activated_amount; + println!("already_activated_amount : {already_activated_amount:?}"); + println!("available_amount : {available_amount:?}"); + + ensure!( + already_activated_amount + amount <= available_amount , + Error::::NotEnoughAssets + ); + } + } - // TODO: get rid of collect - let reward_tokens = RewardTokensPerPool::::get(liquidity_asset_id) - .iter() - .map(|(x,_)| *x) - .collect::>(); - - - for i in reward_tokens{ - println!(";iittititiitititit"); - - let rewards_info = UserRewards3rdPartyInfo::::try_get(user.clone(), (liquidity_asset_id, i)); - println!("REWARDS INFO {rewards_info:?}"); - if let Ok(info) = rewards_info{ - let current_rewards = match info.activated_amount { - 0 => 0u128, - _ => { - let calc = RewardsCalculator::::new2::( - user.clone(), - liquidity_asset_id, - i - )?; - calc.calculate_rewards().map_err(|err| Into::>::into(err))? - }, - }; + Self::set_liquidity_minting_checkpoint_3rdparty(user.clone(), liquidity_asset_id, amount, reward_token)?; - let total_rewards = current_rewards - .checked_add(info.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(info.rewards_already_claimed)) - .ok_or(Error::::CalculateRewardsMathError)?; - result.push((i, total_rewards)); - } + if let ScheduleActivationKind::ActivateKind(use_balance_from) = use_balance_from { + ::ActivationReservesProvider::activate( + liquidity_asset_id, + &user, + amount, + use_balance_from, + )?; } - Ok(result) + + Pallet::::deposit_event(Event::LiquidityActivated(user, liquidity_asset_id, amount)); + + Ok(()) + } + + + fn activate_liquidity_for_liquidity_minting( + user: AccountIdOf, + liquidity_asset_id: TokenId, + amount: Balance, + use_balance_from: Option, + ) -> DispatchResult { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + ensure!( + ::ActivationReservesProvider::can_activate( + liquidity_asset_id, + &user, + amount, + use_balance_from.clone() + ), + Error::::NotEnoughAssets + ); + + Self::set_liquidity_minting_checkpoint(user.clone(), liquidity_asset_id, amount)?; + + // This must not fail due storage edits above + ::ActivationReservesProvider::activate( + liquidity_asset_id, + &user, + amount, + use_balance_from, + )?; + Pallet::::deposit_event(Event::LiquidityActivated(user, liquidity_asset_id, amount)); + + Ok(()) + } + + fn deactivate_liquidity_for_liquidity_minting( + user: AccountIdOf, + liquidity_asset_id: TokenId, + amount: Balance, + ) -> DispatchResult { + + if amount > 0 { + Self::set_liquidity_burning_checkpoint(user.clone(), liquidity_asset_id, amount)?; + Pallet::::deposit_event(Event::LiquidityDeactivated( + user, + liquidity_asset_id, + amount, + )); + } + Ok(()) + + } + + fn deactivate_liquidity_for_schedule( + user: AccountIdOf, + liquidity_asset_id: TokenId, + amount: Balance, + rewards_asset_id: TokenId + ) -> DispatchResult { + + if amount > 0 { + Self::set_liquidity_burning_checkpoint_for_schedule(user.clone(), liquidity_asset_id, amount, rewards_asset_id)?; + Pallet::::deposit_event(Event::LiquidityDeactivated( + user, + liquidity_asset_id, + amount, + )); + } + Ok(()) } + + + + + fn calculate_rewards_amount_3rdparty( + user: AccountIdOf, + liquidity_asset_id: TokenId, + rewards_asset_id: TokenId, + ) -> Result { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + // let mut result: sp_std::vec::vec<_> = default::default(); + // + // // todo: get rid of collect + // let reward_tokens = rewardtokensperpool::::get(liquidity_asset_id) + // .iter() + // .filter_map(|(token_id,_)| + // userrewards3rdpartyinfo::::try_get(user.clone(), (liquidity_asset_id, token_id)) + // ) + // .map(|info| (info.last_checkpoint, info.activated_amount) + // .sort() + // .first + // .collect::>(); + // + // + + + // let rewards_info = UserRewards3rdPartyInfo::::try_get(user.clone(), (liquidity_asset_id, rewards_asset_id)); + // + println!("hello world 0000"); + if let Ok(info) = UserRewards3rdPartyInfo::::try_get(user.clone(), (liquidity_asset_id, rewards_asset_id)){ + println!("hello world"); + let current_rewards = match info.activated_amount { + 0 => 0u128, + _ => { + let calc = RewardsCalculator::::new2::( + user.clone(), + liquidity_asset_id, + rewards_asset_id + )?; + calc.calculate_rewards().map_err(|err| Into::>::into(err))? + }, + }; + + Ok(current_rewards + .checked_add(info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(info.rewards_already_claimed)) + .ok_or(Error::::CalculateRewardsMathError)? + ) + }else{ + Ok(0u128) + } + } + fn pallet_account() -> T::AccountId { PALLET_ID.into_account_truncating() } @@ -444,7 +645,7 @@ impl Pallet { } fn get_pool_rewards_3rdparty(liquidity_asset_id: TokenId, reward_asset_id: TokenId) -> Result { - println!("ret_pool_rewards_3rdparty {liquidity_asset_id} {reward_asset_id}"); + Ok(*PromotedPoolRewards3rdParty::::get() .get(&(liquidity_asset_id, reward_asset_id)) //TODO: no error or some dedicated error @@ -461,12 +662,12 @@ impl Pallet { } fn ensure_is_promoted_pool(liquidity_asset_id: TokenId) -> Result<(), DispatchError> { - println!("ensure_is_promoted_pool {liquidity_asset_id}"); + if Self::get_pool_rewards(liquidity_asset_id).is_ok() || !RewardTokensPerPool::::get(liquidity_asset_id).is_empty() { - println!("ensure_is_promoted_pool ok"); + Ok(()) } else { - println!("ensure_is_promoted_pool err"); + Err(DispatchError::from(Error::::NotAPromotedPool)) } } @@ -478,32 +679,6 @@ impl Pallet { ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - println!("set_liquidity_minting_checkpoint1"); - - { - let reward_tokens = RewardTokensPerPool::::get(liquidity_asset_id) - .iter() - .map(|(x,_)| *x) - // NOTE: get rid of collect - .collect::>(); - - - for i in reward_tokens{ - let calc = RewardsCalculator::::new2::( - user.clone(), - liquidity_asset_id, - i - )?; - - let rewards_info = calc - .activate_more(liquidity_assets_added) - .map_err(|err| Into::>::into(err))?; - - UserRewards3rdPartyInfo::::insert(user.clone(), (liquidity_asset_id,i), rewards_info); - } - } - println!("set_liquidity_minting_checkpoint2"); - { let calc = RewardsCalculator::::new::( user.clone(), @@ -512,20 +687,18 @@ impl Pallet { let rewards_info = calc .activate_more(liquidity_assets_added) .map_err(|err| Into::>::into(err))?; + println!("liq minting rewards_info : {rewards_info:?}"); RewardsInfo::::insert(user.clone(), liquidity_asset_id, rewards_info); } - - println!("set_liquidity_minting_checkpoint3"); - TotalActivatedLiquidity::::try_mutate(liquidity_asset_id, |active_amount| { if let Some(val) = active_amount.checked_add(liquidity_assets_added) { - println!("!!!!!!!!!!!!!!!!!!!!!!!!!"); + *active_amount = val; Ok(()) } else { - println!("$$$$$$$$$$$$$$$$$$$$$$$$$"); + Err(()) } }) @@ -534,6 +707,40 @@ impl Pallet { Ok(()) } + fn set_liquidity_minting_checkpoint_3rdparty( + user: AccountIdOf, + liquidity_asset_id: TokenId, + liquidity_assets_added: Balance, + liquidity_assets_reward: TokenId, + ) -> DispatchResult { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + { + let calc = RewardsCalculator::::new2::( + user.clone(), + liquidity_asset_id, + liquidity_assets_reward + )?; + let rewards_info = calc + .activate_more(liquidity_assets_added) + .map_err(|err| Into::>::into(err))?; + + UserRewards3rdPartyInfo::::insert(user.clone(), (liquidity_asset_id, liquidity_assets_reward), rewards_info); + } + + + TotalActivatedLiquidity3rdParty::::mutate(liquidity_asset_id, |activations| { + activations + .entry(liquidity_assets_reward) + // NOTE: handle overflow + .and_modify(|val| *val += liquidity_assets_added) + .or_insert(liquidity_assets_added); + + }); + + Ok(()) + } + fn set_liquidity_burning_checkpoint( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -578,6 +785,42 @@ impl Pallet { Ok(()) } + + + fn set_liquidity_burning_checkpoint_for_schedule( + user: AccountIdOf, + liquidity_asset_id: TokenId, + liquidity_assets_burned: Balance, + reward_token: TokenId, + ) -> DispatchResult { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + let calc = RewardsCalculator::::new2::( + user.clone(), + liquidity_asset_id, + reward_token, + )?; + + let rewards_info = calc + .activate_less(liquidity_assets_burned) + .map_err(|err| Into::>::into(err))?; + + UserRewards3rdPartyInfo::::insert(user.clone(), (liquidity_asset_id, reward_token), rewards_info); + + TotalActivatedLiquidity3rdParty::::mutate(liquidity_asset_id, |activations| { + activations + .entry(reward_token) + .and_modify(|val| *val -= liquidity_assets_burned); + }); + + ::ActivationReservesProvider::deactivate( + liquidity_asset_id, + &user, + liquidity_assets_burned, + ); + + Ok(()) + } } impl ProofOfStakeRewardsApi for Pallet { @@ -657,30 +900,12 @@ impl ProofOfStakeRewardsApi for Pallet { amount: Self::Balance, use_balance_from: Option, ) -> DispatchResult { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; - println!("activate_liquidity"); - ensure!( - ::ActivationReservesProvider::can_activate( - liquidity_asset_id, - &user, - amount, - use_balance_from.clone() - ), - Error::::NotEnoughAssets - ); - - Self::set_liquidity_minting_checkpoint(user.clone(), liquidity_asset_id, amount)?; - - // This must not fail due storage edits above - ::ActivationReservesProvider::activate( + Self::activate_liquidity_for_liquidity_minting( + user, liquidity_asset_id, - &user, amount, use_balance_from, - )?; - Pallet::::deposit_event(Event::LiquidityActivated(user, liquidity_asset_id, amount)); - - Ok(()) + ) } fn deactivate_liquidity( @@ -688,16 +913,11 @@ impl ProofOfStakeRewardsApi for Pallet { liquidity_asset_id: Self::CurrencyId, amount: Self::Balance, ) -> DispatchResult { - if amount > 0 { - Self::set_liquidity_burning_checkpoint(user.clone(), liquidity_asset_id, amount)?; - Pallet::::deposit_event(Event::LiquidityDeactivated( - user, - liquidity_asset_id, - amount, - )); - } - - Ok(()) + Self::deactivate_liquidity_for_liquidity_minting( + user, + liquidity_asset_id, + amount, + ) } @@ -737,7 +957,7 @@ impl LiquidityMiningApi for Pallet { let it = schedules .iter() .filter_map(|((session, rewarded_token, tokenid, amount, _),())|{ - if (*session).saturated_into::() > Self::session_index() { + if (*session).saturated_into::() >= Self::session_index() { Some((rewarded_token, tokenid, amount)) } else { None @@ -745,22 +965,27 @@ impl LiquidityMiningApi for Pallet { }); for (staked_token, token, amount) in it { - println!("STAKED TOKEN: {staked_token} TOKEN: {token} AMOUNT: {amount}"); - let activated_amount = Self::total_activated_amount(staked_token); - println!("ACTIVATED AMOUNT: {activated_amount}"); - // NOTE: fix - let rewards = pools.get(&(*staked_token, *token)).cloned().unwrap_or_default(); - let rewards_for_liquidity = U256::from(*amount) - .checked_mul(U256::from(u128::MAX)) - .and_then(|x| x.checked_div(activated_amount.into())) - .and_then(|x| x.checked_add(rewards)); + let activated_3rdparty_rewards = TotalActivatedLiquidity3rdParty::::get(staked_token); + + if let Some(activated_amount) = activated_3rdparty_rewards.get(&token){ + let activated_amount = U256::from(*activated_amount); + // NOTE: fix + let rewards = pools.get(&(*staked_token, *token)).cloned().unwrap_or_default(); + let rewards_for_liquidity = U256::from(*amount) + .checked_mul(U256::from(u128::MAX)) + .and_then(|x| x.checked_div(activated_amount)) + .and_then(|x| x.checked_add(rewards)); + if let Some(val) = rewards_for_liquidity { pools.insert((*staked_token,*token), val); } + + } } - println!("STORING POOLS: {pools:?}"); + + println!("POOLS : {:?}", pools); PromotedPoolRewards3rdParty::::put(pools); diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 0e042cb004..e5321722bd 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -94,8 +94,12 @@ impl RewardsCalculator { missing_at_last_checkpoint: U256::from(0u128), }; - let rewards_info = crate::RewardsInfo::::try_get(user.clone(), asset_id) - .unwrap_or(default_rewards); + + let rewards_info = crate::UserRewards3rdPartyInfo::::try_get( + user.clone(), + (asset_id, reward_asset_id) + ).unwrap_or(default_rewards); + Ok(Self { rewards_context: RewardsContext { @@ -178,12 +182,16 @@ impl CurveRewards for ConstCurveRewards { } fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { - println!("context: {:?}", ctx.pool_ratio_current); + + println!("pool_ratio_at_last_checkpoint {}", user_info.pool_ratio_at_last_checkpoint); + println!("pool_ratio now {}", ctx.pool_ratio_current); let pool_rewards_ratio_new = ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; + let rewards_base: U256 = U256::from(user_info.activated_amount) .checked_mul(pool_rewards_ratio_new)? .checked_div(U256::from(u128::MAX))?; // always fit into u128 + println!("BASE : {rewards_base}"); rewards_base @@ -226,6 +234,7 @@ impl RewardsCalculator { .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) .ok_or(RewardsCalcError::CheckpointMathError)?; + println!("STORING {}", self.rewards_context.pool_ratio_current); Ok(RewardInfo { activated_amount, pool_ratio_at_last_checkpoint: self.rewards_context.pool_ratio_current, @@ -286,141 +295,3 @@ impl RewardsCalculator { .ok_or(RewardsCalcError::CheckpointMathError) } } - -// impl RewardInfo { -// pub fn calculate_missing_at_checkpoint(&self, current_time: u32) -> Option { -// let time_passed = current_time.checked_sub(self.last_checkpoint).unwrap(); -// let q_pow = calculate_q_pow(Q, time_passed); -// Some(self.missing_at_last_checkpoint * U256::from(REWARDS_PRECISION) / q_pow) -// } -// -// pub fn activate_more( -// &mut self, -// current_time: u32, -// pool_ratio_current: U256, -// liquidity_assets_added: Balance, -// ) -> DispatchResult { -// let activated_amount = self -// .activated_amount -// .checked_add(liquidity_assets_added) -// .ok_or(Error::::LiquidityCheckpointMathError)?; -// -// let missing_at_last_checkpoint = self -// .calculate_missing_at_checkpoint(current_time) -// .and_then(|v| v.checked_add(U256::from(liquidity_assets_added))) -// .ok_or(Error::::LiquidityCheckpointMathError)?; -// -// let user_current_rewards = self -// .calculate_rewards(current_time, pool_ratio_current) -// .ok_or(Error::::CalculateRewardsMathError)?; -// -// let rewards_not_yet_claimed = user_current_rewards -// .checked_add(self.rewards_not_yet_claimed) -// .and_then(|v| v.checked_sub(self.rewards_already_claimed)) -// .ok_or(Error::::LiquidityCheckpointMathError)?; -// -// self.activated_amount = activated_amount; -// self.pool_ratio_at_last_checkpoint = pool_ratio_current; -// self.rewards_already_claimed = 0_u128; -// self.missing_at_last_checkpoint = missing_at_last_checkpoint; -// self.rewards_not_yet_claimed = rewards_not_yet_claimed; -// self.last_checkpoint = current_time; -// Ok(()) -// } -// -// pub fn activate_less( -// &mut self, -// current_time: u32, -// pool_ratio_current: U256, -// liquidity_assets_removed: Balance, -// ) -> DispatchResult { -// let activated_amount = self -// .activated_amount -// .checked_sub(liquidity_assets_removed) -// .ok_or(Error::::LiquidityCheckpointMathError)?; -// -// let missing_at_checkpoint_new = self -// .calculate_missing_at_checkpoint(current_time) -// .ok_or(Error::::LiquidityCheckpointMathError)?; -// -// let activated_amount_new = self -// .activated_amount -// .checked_sub(liquidity_assets_removed) -// .ok_or(Error::::LiquidityCheckpointMathError)?; -// let missing_at_checkpoint_after_burn = U256::from(activated_amount_new) -// .checked_mul(missing_at_checkpoint_new) -// .and_then(|v| v.checked_div(self.activated_amount.into())) -// .ok_or(Error::::LiquidityCheckpointMathError)?; -// -// let user_current_rewards = self -// .calculate_rewards(current_time, pool_ratio_current) -// .ok_or(Error::::CalculateRewardsMathError)?; -// let total_available_rewards = user_current_rewards -// .checked_add(self.rewards_not_yet_claimed) -// .and_then(|v| v.checked_sub(self.rewards_already_claimed)) -// .ok_or(Error::::LiquidityCheckpointMathError)?; -// -// self.activated_amount = activated_amount; -// self.pool_ratio_at_last_checkpoint = pool_ratio_current; -// self.rewards_already_claimed = 0_u128; -// self.missing_at_last_checkpoint = missing_at_checkpoint_after_burn; -// self.rewards_not_yet_claimed = total_available_rewards; -// self.last_checkpoint = current_time; -// Ok(()) -// } -// -// pub fn calculate_rewards( -// &self, -// current_time: u32, -// pool_rewards_ratio_current: U256, -// ) -> Option { -// let pool_rewards_ratio_new = -// pool_rewards_ratio_current.checked_sub(self.pool_ratio_at_last_checkpoint)?; -// -// let user_rewards_base: U256 = U256::from(self.activated_amount) -// .checked_mul(pool_rewards_ratio_new)? -// .checked_div(U256::from(u128::MAX))?; // always fit into u128 -// -// self.calculate_curve_rewards(user_rewards_base, current_time) -// } -// -// fn calculate_curve_rewards(&self, base_rewards: U256, current_time: u32) -> Option { -// let time_passed = current_time.checked_sub(self.last_checkpoint).unwrap(); -// // .ok_or(Error::::PastTimeCalculation)?; -// let mut cummulative_work = U256::from(0); -// let mut cummulative_work_max_possible_for_ratio = U256::from(1); -// -// if time_passed != 0 && self.activated_amount != 0 { -// let liquidity_assets_amount_u256: U256 = self.activated_amount.into(); -// -// // whole formula: missing_at_last_checkpoint*106/6 - missing_at_last_checkpoint*106*precision/6/q_pow -// // q_pow is multiplied by precision, thus there needs to be *precision in numenator as well -// -// cummulative_work_max_possible_for_ratio = -// liquidity_assets_amount_u256.checked_mul(U256::from(time_passed))?; -// -// // whole formula: missing_at_last_checkpoint*Q*100/(Q*100-100) - missing_at_last_checkpoint*Q*100/(Q*100-100)*REWARDS_PRECISION/q_pow -// // q_pow is multiplied by precision, thus there needs to be *precision in numenator as well -// let base = self -// .missing_at_last_checkpoint -// .checked_mul(U256::from(libm::floor(Q * 100_f64) as u128))? -// .checked_div(U256::from(libm::floor(Q * 100_f64 - 100_f64) as u128))?; -// -// let q_pow = calculate_q_pow(Q, time_passed.checked_add(1)?); -// -// let cummulative_missing_new = base - -// base * U256::from(REWARDS_PRECISION) / q_pow - -// self.missing_at_last_checkpoint; -// -// cummulative_work = -// cummulative_work_max_possible_for_ratio.checked_sub(cummulative_missing_new)? -// } -// -// base_rewards -// .checked_mul(cummulative_work)? -// .checked_div(cummulative_work_max_possible_for_ratio)? -// .try_into() -// .ok() -// -// } -// } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index b3f1373736..a7255d1daa 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1368,22 +1368,190 @@ fn user_can_claim_3rdparty_rewards() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 10u32.into()).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None).unwrap(); roll_to_session(1); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, token_id, None).unwrap(); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, ), - Ok(vec![(token_id, 1000)]) + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), + Ok(0) ); + + roll_to_session(2); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, token_id, None).unwrap(); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), + Ok(0) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), + Ok(1000) + ); + + roll_to_session(3); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), + Ok(1500) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), + Ok(500) + ); + }); +} + +#[test] +#[serial] +fn overlapping_3rdparty_rewards_works() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN : u32 = 5; + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + + let first_reward_token = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 200).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_reward_token, amount, 10u32.into()).unwrap(); + + roll_to_session(1); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_reward_token, None).unwrap(); + + roll_to_session(5); + let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_reward_token_id, 100_000, 15u32.into()).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_reward_token_id, None).unwrap(); + + roll_to_session(6); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_reward_token_id), + Ok(10000) + ); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_reward_token), + Ok(5000) + ); + + }); +} + + +#[test] +#[serial] +fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN : u32 = 5; + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + + let first_reward_token = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_reward_token, amount, 10u32.into()).unwrap(); + + roll_to_session(1); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_reward_token, None).unwrap(); + + roll_to_session(5); + let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_reward_token_id, 100_000, 15u32.into()).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_reward_token_id, Some(ScheduleActivationKind::ActivatedLiquidity(first_reward_token)) ).unwrap(); + + roll_to_session(6); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_reward_token_id), + Ok(10000) + ); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_reward_token), + Ok(5000) + ); + }); +} + + +#[test] +#[serial] +fn deactivate_3rdparty_rewards() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN : u32 = 5; + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 10u32.into()).unwrap(); + + roll_to_session(1); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, token_id, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, token_id, None).unwrap(); + roll_to_session(2); + assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, ), - Ok(vec![(token_id, 2000)]) + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), + Ok(500) ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), + Ok(500) + ); + ProofOfStake::deactivate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, token_id).unwrap(); + roll_to_session(3); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), + Ok(1500) + ); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), + Ok(500) + ); }); } + From 5beb83b9238ae6b4d4847e7d09def73bf1f75418 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 21 Sep 2023 07:01:35 +0200 Subject: [PATCH 005/125] nmap --- pallets/proof-of-stake/src/lib.rs | 383 +++++++++++++--------- pallets/proof-of-stake/src/reward_info.rs | 24 +- pallets/proof-of-stake/src/tests.rs | 224 +++++++++++-- 3 files changed, 433 insertions(+), 198 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 12258cf33d..9448a9ac16 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -55,14 +55,20 @@ pub use pallet::*; pub mod weights; pub use weights::WeightInfo; +type AccountIdOf = ::AccountId; + + +/// Wrapper over origin ActivateKind that is used in [`Pallet::activat_liquidity`] +/// with extension that allows activating liquidity that was already used for: +/// - `ActivatedLiquidity` - already activated liquidity (for scheduled rewards) +/// - `LiquidityMining` - already activated liquidity (for liquidity mining rewards) #[derive(Eq, PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] pub enum ScheduleActivationKind { ActivateKind(Option), - ActivatedLiquidity(TokenId) + ActivatedLiquidity(TokenId), + LiquidityMining, } -type AccountIdOf = ::AccountId; - const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!"); #[frame_support::pallet] @@ -104,8 +110,11 @@ use super::*; type LiquidityMiningIssuanceVault: Get; #[pallet::constant] type RewardsDistributionPeriod: Get; + /// The maximum number of schedules that can be active at one moment type RewardsSchedulesLimit: Get; + /// The minimum number of rewards per session for schedule rewards type MinRewardsPerSession: Get; + /// The maximum number of reward tokens per pool type MaxRewardTokensPerPool: Get; type WeightInfo: WeightInfo; type ValuationApi: Valuate; @@ -130,11 +139,14 @@ use super::*; CalculateRewardsAllMathError, MissingRewardsInfoError, DeprecatedExtrinsic, + /// Cannot schedule rewards in past CannotScheduleRewardsInPast, + /// Pool does not exist PoolDoesNotExist, + /// Too many schedules TooManySchedules, + /// Too little rewards per session TooLittleRewardsPerSession, - PoolRewardTokensLimitExceeded, } #[pallet::event] @@ -158,17 +170,6 @@ use super::*; ValueQuery, >; - #[pallet::storage] - pub type UserRewards3rdPartyInfo = StorageDoubleMap< - _, - Twox64Concat, - AccountIdOf, - Twox64Concat, - (TokenId, TokenId), - RewardInfo, - ValueQuery, - >; - #[pallet::storage] /// Stores information about pool weight and accumulated rewards. The accumulated /// rewards amount is the number of rewards that can be claimed per liquidity @@ -177,31 +178,6 @@ use super::*; pub type PromotedPoolRewards = StorageValue<_, BTreeMap, ValueQuery>; - #[pallet::storage] - pub type PromotedPoolRewards3rdParty = StorageValue<_, BTreeMap<(TokenId, TokenId), U256>, ValueQuery>; - - // pub type PromotedPoolRewards3rdParty = StorageValue<_, BTreeMap<(TokenId), U256>, ValueQuery>; - - #[pallet::storage] - #[pallet::getter(fn schedules)] - pub type RewardsSchedules = - StorageValue<_, BoundedBTreeMap<(T::BlockNumber, TokenId, TokenId, Balance, u64), (), T::RewardsSchedulesLimit>, ValueQuery>; - - #[pallet::storage] - pub type RewardTokensPerPool = StorageMap<_, Twox64Concat, TokenId, BoundedBTreeMap, ValueQuery>; - - #[pallet::storage] - pub type ScheduleId = StorageValue<_, u64, ValueQuery>; - - - // #[pallet::storage] - // pub type Rewards3rdParty = - // StorageValue<_, BTreeMap, ValueQuery>; - // - // #[pallet::storage] - // pub type Rewards3rdParty = - // StorageValue<_, BTreeMap, ValueQuery>; - #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo)] /// Information about single token rewards pub struct PromotedPools { @@ -218,11 +194,77 @@ use super::*; pub type TotalActivatedLiquidity = StorageMap<_, Twox64Concat, TokenId, u128, ValueQuery>; - // NOTE: possibly merge with above + // ////////////////////////////////////////////////////////////////////////////////////////////// + // 3rd Party Rewards + // ////////////////////////////////////////////////////////////////////////////////////////////// + + /// Stores information about pool weight and accumulated rewards #[pallet::storage] - pub type TotalActivatedLiquidity3rdParty = + pub type RewardsInfoForScheduleRewards = StorageDoubleMap< + _, + Twox64Concat, + AccountIdOf, + Twox64Concat, + (TokenId, TokenId), + RewardInfo, + ValueQuery, + >; + + /// How much scheduled rewards per single liquidty_token should be distribute_rewards + /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic + #[pallet::storage] + pub type ScheduleRewardsPerSingleLiquidity = StorageValue<_, BTreeMap<(TokenId, TokenId), U256>, ValueQuery>; + + /// List of activated schedules sorted by expiry date + #[pallet::storage] + #[pallet::getter(fn schedules)] + pub type RewardsSchedules = + StorageValue<_, BoundedBTreeMap<(T::BlockNumber, TokenId, TokenId, Balance, u64), (), T::RewardsSchedulesLimit>, ValueQuery>; + + /// Unique id of the schedule + #[pallet::storage] + pub type ScheduleId = StorageValue<_, u64, ValueQuery>; + + /// Maps liquidity token to list of tokens that it ever was rewarded with + #[pallet::storage] + pub type RewardTokensPerPool = StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (), ValueQuery>; + + /// Total amount of activated liquidity for each schedule + /// `BTreeMap` is used because of storage reads write optiomization in `distribute_rewards` + #[pallet::storage] + pub type TotalActivatedLiquidityForSchedules = StorageMap<_, Twox64Concat, TokenId, BTreeMap, ValueQuery>; + /// Tracks how much liquidity user activated for particular (liq token, reward token) pair + /// StorageNMap was used because it only require single read to know if user deactivated all + /// liquidity associated with particular liquidity_token that is rewarded. If so part of the + /// liquididty tokens can be unlocked. + #[pallet::storage] + pub type ActivatedLiquidityForSchedules = StorageNMap< + _, + ( + NMapKey>, + NMapKey, + NMapKey + ), + u128, + OptionQuery, + >; + + /// Tracks how much of the liquidity was activated for schedule rewards and not yet + /// liquidity mining rewards. That information is essential to properly handle tocken unlcocks + /// when liquidity is deactivated. + #[pallet::storage] + pub type ActivatedLockedLiquidityForSchedules = StorageDoubleMap< + _, + Twox64Concat, + AccountIdOf, + Twox64Concat, + TokenId, + u128, + ValueQuery, + >; + #[pallet::call] impl Pallet { /// Claims liquidity mining rewards @@ -310,10 +352,11 @@ use super::*; /// Schedules rewards for selected liquidity token /// - tokens - pair of tokens /// - amount - amount of the token - /// - schedule_end - till when the rewards should be distributed, rewards are - /// distributed starting from the *next* session till + /// - schedule_end - id of the last rewarded seession. Rewards will be distributedd equally between sessions in range (now .. + /// schedule_end). Distribution starts from the *next* session till `schedule_end`. #[transactional] #[pallet::call_index(4)] + // NOTE: implement benchmark #[pallet::weight(<::WeightInfo>::claim_rewards_all())] pub fn reward_pool( origin: OriginFor, @@ -342,12 +385,7 @@ use super::*; ensure!(amount_per_session >= T::MinRewardsPerSession::get(), Error::::TooLittleRewardsPerSession); - RewardTokensPerPool::::try_mutate(rewarded_token, |tokens| { - - tokens.try_insert(token_id,()) - }).or(Err(Error::::PoolRewardTokensLimitExceeded))?; - - + RewardTokensPerPool::::insert(rewarded_token, token_id, ()); T::Currency::transfer( token_id.into(), @@ -386,7 +424,8 @@ use super::*; /// Parameters: /// - liquidity_token_id - id of the token /// - amount - amount of the token - /// - use_balance_from - where from tokens should be used + /// - use_balance_from - where from tokens should be used. If set to `None` then tokens will + /// be taken from available balance #[transactional] #[pallet::call_index(5)] #[pallet::weight(<::WeightInfo>::activate_liquidity())] @@ -443,59 +482,6 @@ pub enum RewardsKind{ impl Pallet { - fn activate_liquidity_for_schedule( - user: AccountIdOf, - liquidity_asset_id: TokenId, - amount: Balance, - use_balance_from: ScheduleActivationKind, - reward_token: TokenId - ) -> DispatchResult { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; - - match use_balance_from{ - ScheduleActivationKind::ActivateKind(ref use_balance_from) => { - ensure!( - ::ActivationReservesProvider::can_activate( - liquidity_asset_id, - &user, - amount, - use_balance_from.clone(), - ), - Error::::NotEnoughAssets - ); - }, - ScheduleActivationKind::ActivatedLiquidity(token_id) => { - let already_activated_amount = - UserRewards3rdPartyInfo::::get(user.clone(), (liquidity_asset_id, reward_token)).activated_amount; - let available_amount = - UserRewards3rdPartyInfo::::get(user.clone(), (liquidity_asset_id, token_id)).activated_amount; - println!("already_activated_amount : {already_activated_amount:?}"); - println!("available_amount : {available_amount:?}"); - - ensure!( - already_activated_amount + amount <= available_amount , - Error::::NotEnoughAssets - ); - } - } - - Self::set_liquidity_minting_checkpoint_3rdparty(user.clone(), liquidity_asset_id, amount, reward_token)?; - - if let ScheduleActivationKind::ActivateKind(use_balance_from) = use_balance_from { - ::ActivationReservesProvider::activate( - liquidity_asset_id, - &user, - amount, - use_balance_from, - )?; - } - - Pallet::::deposit_event(Event::LiquidityActivated(user, liquidity_asset_id, amount)); - - Ok(()) - } - - fn activate_liquidity_for_liquidity_minting( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -516,7 +502,6 @@ impl Pallet { Self::set_liquidity_minting_checkpoint(user.clone(), liquidity_asset_id, amount)?; - // This must not fail due storage edits above ::ActivationReservesProvider::activate( liquidity_asset_id, &user, @@ -546,6 +531,73 @@ impl Pallet { } + fn activate_liquidity_for_schedule( + user: AccountIdOf, + liquidity_asset_id: TokenId, + amount: Balance, + use_balance_from: ScheduleActivationKind, + reward_token: TokenId + ) -> DispatchResult { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + match use_balance_from{ + ScheduleActivationKind::ActivateKind(ref use_balance_from) => { + ensure!( + ::ActivationReservesProvider::can_activate( + liquidity_asset_id, + &user, + amount, + use_balance_from.clone(), + ), + Error::::NotEnoughAssets + ); + ActivatedLockedLiquidityForSchedules::::mutate(user.clone(), liquidity_asset_id, |val| *val += amount); + }, + ScheduleActivationKind::ActivatedLiquidity(token_id) => { + let already_activated_amount = + RewardsInfoForScheduleRewards::::get(user.clone(), (liquidity_asset_id, reward_token)).activated_amount; + let available_amount = + RewardsInfoForScheduleRewards::::get(user.clone(), (liquidity_asset_id, token_id)).activated_amount; + ensure!( + already_activated_amount + amount <= available_amount , + Error::::NotEnoughAssets + ); + } + ScheduleActivationKind::LiquidityMining => { + let already_activated_amount = + RewardsInfoForScheduleRewards::::get(user.clone(), (liquidity_asset_id, reward_token)).activated_amount; + let available_amount = + RewardsInfo::::get(user.clone(), liquidity_asset_id).activated_amount; + ensure!( + already_activated_amount + amount <= available_amount , + Error::::NotEnoughAssets + ); + }, + } + + Self::set_liquidity_minting_checkpoint_3rdparty(user.clone(), liquidity_asset_id, amount, reward_token)?; + + match use_balance_from { + ScheduleActivationKind::ActivateKind(use_balance_from) => { + ::ActivationReservesProvider::activate( + liquidity_asset_id, + &user, + amount, + use_balance_from, + )?; + }, + ScheduleActivationKind::LiquidityMining => { + }, + _ => {} + + } + + Pallet::::deposit_event(Event::LiquidityActivated(user, liquidity_asset_id, amount)); + + Ok(()) + } + + fn deactivate_liquidity_for_schedule( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -575,31 +627,11 @@ impl Pallet { ) -> Result { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - // let mut result: sp_std::vec::vec<_> = default::default(); - // - // // todo: get rid of collect - // let reward_tokens = rewardtokensperpool::::get(liquidity_asset_id) - // .iter() - // .filter_map(|(token_id,_)| - // userrewards3rdpartyinfo::::try_get(user.clone(), (liquidity_asset_id, token_id)) - // ) - // .map(|info| (info.last_checkpoint, info.activated_amount) - // .sort() - // .first - // .collect::>(); - // - // - - - // let rewards_info = UserRewards3rdPartyInfo::::try_get(user.clone(), (liquidity_asset_id, rewards_asset_id)); - // - println!("hello world 0000"); - if let Ok(info) = UserRewards3rdPartyInfo::::try_get(user.clone(), (liquidity_asset_id, rewards_asset_id)){ - println!("hello world"); + if let Ok(info) = RewardsInfoForScheduleRewards::::try_get(user.clone(), (liquidity_asset_id, rewards_asset_id)){ let current_rewards = match info.activated_amount { 0 => 0u128, _ => { - let calc = RewardsCalculator::::new2::( + let calc = RewardsCalculator::schedule_rewards::( user.clone(), liquidity_asset_id, rewards_asset_id @@ -644,15 +676,6 @@ impl Pallet { .ok_or(Error::::NotAPromotedPool)?) } - fn get_pool_rewards_3rdparty(liquidity_asset_id: TokenId, reward_asset_id: TokenId) -> Result { - - Ok(*PromotedPoolRewards3rdParty::::get() - .get(&(liquidity_asset_id, reward_asset_id)) - //TODO: no error or some dedicated error - .ok_or(Error::::NotAPromotedPool)?) - } - - fn get_current_rewards_time() -> Result { >::block_number() .saturated_into::() @@ -662,12 +685,9 @@ impl Pallet { } fn ensure_is_promoted_pool(liquidity_asset_id: TokenId) -> Result<(), DispatchError> { - - if Self::get_pool_rewards(liquidity_asset_id).is_ok() || !RewardTokensPerPool::::get(liquidity_asset_id).is_empty() { - + if Self::get_pool_rewards(liquidity_asset_id).is_ok() || RewardTokensPerPool::::iter_prefix_values(liquidity_asset_id).next().is_some() { Ok(()) } else { - Err(DispatchError::from(Error::::NotAPromotedPool)) } } @@ -680,14 +700,13 @@ impl Pallet { Self::ensure_is_promoted_pool(liquidity_asset_id)?; { - let calc = RewardsCalculator::::new::( + let calc = RewardsCalculator::mining_rewards::( user.clone(), liquidity_asset_id, )?; let rewards_info = calc .activate_more(liquidity_assets_added) .map_err(|err| Into::>::into(err))?; - println!("liq minting rewards_info : {rewards_info:?}"); RewardsInfo::::insert(user.clone(), liquidity_asset_id, rewards_info); } @@ -716,7 +735,7 @@ impl Pallet { Self::ensure_is_promoted_pool(liquidity_asset_id)?; { - let calc = RewardsCalculator::::new2::( + let calc = RewardsCalculator::schedule_rewards::( user.clone(), liquidity_asset_id, liquidity_assets_reward @@ -724,12 +743,26 @@ impl Pallet { let rewards_info = calc .activate_more(liquidity_assets_added) .map_err(|err| Into::>::into(err))?; - - UserRewards3rdPartyInfo::::insert(user.clone(), (liquidity_asset_id, liquidity_assets_reward), rewards_info); + RewardsInfoForScheduleRewards::::insert(user.clone(), (liquidity_asset_id, liquidity_assets_reward), rewards_info); } + ActivatedLiquidityForSchedules::::try_mutate_exists( + (user.clone(), liquidity_asset_id, liquidity_assets_reward ), + |v| + { + match v { + Some(x) => { + v.as_mut().map(|a| *a += liquidity_assets_added); + }, + None => { + *v = Some(liquidity_assets_added); + }, + }; + Ok::<(),Error>(()) + } + )?; - TotalActivatedLiquidity3rdParty::::mutate(liquidity_asset_id, |activations| { + TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, |activations| { activations .entry(liquidity_assets_reward) // NOTE: handle overflow @@ -757,7 +790,7 @@ impl Pallet { Error::::NotEnoughAssets ); - let calc = RewardsCalculator::::new::( + let calc = RewardsCalculator::mining_rewards::( user.clone(), liquidity_asset_id, )?; @@ -795,7 +828,7 @@ impl Pallet { ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - let calc = RewardsCalculator::::new2::( + let calc = RewardsCalculator::schedule_rewards::( user.clone(), liquidity_asset_id, reward_token, @@ -805,19 +838,48 @@ impl Pallet { .activate_less(liquidity_assets_burned) .map_err(|err| Into::>::into(err))?; - UserRewards3rdPartyInfo::::insert(user.clone(), (liquidity_asset_id, reward_token), rewards_info); + RewardsInfoForScheduleRewards::::insert(user.clone(), (liquidity_asset_id, reward_token), rewards_info); - TotalActivatedLiquidity3rdParty::::mutate(liquidity_asset_id, |activations| { + TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, |activations| { activations .entry(reward_token) .and_modify(|val| *val -= liquidity_assets_burned); }); - ::ActivationReservesProvider::deactivate( - liquidity_asset_id, - &user, - liquidity_assets_burned, - ); + ActivatedLiquidityForSchedules::::try_mutate_exists( + (user.clone(), liquidity_asset_id, reward_token), + |v| + { + v.and_then(|a| a.checked_sub(liquidity_assets_burned) + .and_then(|val| { + if val > 0 { + *v = Some(val); + }else{ + *v = None; + } + Some(val) + }) + ).ok_or(Error::::MathOverflow) + } + )?; + + + + if let None = ActivatedLiquidityForSchedules::::iter_prefix_values( (user.clone(), liquidity_asset_id), + ).next(){ + + let amount = ActivatedLockedLiquidityForSchedules::::mutate(user.clone(), liquidity_asset_id, |val| { + let prev = *val; + *val = 0; + prev + }); + + ::ActivationReservesProvider::deactivate( + liquidity_asset_id, + &user, + amount, + ); + } Ok(()) } @@ -860,7 +922,7 @@ impl ProofOfStakeRewardsApi for Pallet { let mut rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; - let calc = RewardsCalculator::::new::( + let calc = RewardsCalculator::mining_rewards::( user.clone(), liquidity_asset_id, )?; @@ -932,7 +994,7 @@ impl ProofOfStakeRewardsApi for Pallet { let current_rewards = match rewards_info.activated_amount { 0 => 0u128, _ => { - let calc = RewardsCalculator::::new::( + let calc = RewardsCalculator::mining_rewards::( user.clone(), liquidity_asset_id, )?; @@ -952,7 +1014,7 @@ impl LiquidityMiningApi for Pallet { fn distribute_rewards(liquidity_mining_rewards: Balance) { let schedules = RewardsSchedules::::get(); - let mut pools = PromotedPoolRewards3rdParty::::get(); + let mut pools = ScheduleRewardsPerSingleLiquidity::::get(); let it = schedules .iter() @@ -966,7 +1028,7 @@ impl LiquidityMiningApi for Pallet { for (staked_token, token, amount) in it { - let activated_3rdparty_rewards = TotalActivatedLiquidity3rdParty::::get(staked_token); + let activated_3rdparty_rewards = TotalActivatedLiquidityForSchedules::::get(staked_token); if let Some(activated_amount) = activated_3rdparty_rewards.get(&token){ let activated_amount = U256::from(*activated_amount); @@ -985,8 +1047,7 @@ impl LiquidityMiningApi for Pallet { } } - println!("POOLS : {:?}", pools); - PromotedPoolRewards3rdParty::::put(pools); + ScheduleRewardsPerSingleLiquidity::::put(pools); let _ = PromotedPoolRewards::::try_mutate(|promoted_pools| -> DispatchResult { diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index e5321722bd..d2707536b8 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -44,8 +44,8 @@ pub struct RewardsCalculator { _curve: sp_std::marker::PhantomData, } -impl RewardsCalculator { - pub fn new( +impl RewardsCalculator { + pub fn mining_rewards( user: T::AccountId, asset_id: TokenId, ) -> sp_std::result::Result { @@ -74,17 +74,27 @@ impl RewardsCalculator { } } -impl RewardsCalculator { - pub fn new2( +impl RewardsCalculator { + pub fn schedule_rewards( user: T::AccountId, asset_id: TokenId, reward_asset_id: TokenId, ) -> sp_std::result::Result { let current_time: u32 = Pallet::::get_current_rewards_time()?; + ensure!( + crate::RewardTokensPerPool::::try_get(asset_id, reward_asset_id).is_ok(), + crate::Error::::NotAPromotedPool + ); + + let pool_map = crate::ScheduleRewardsPerSingleLiquidity::::get(); + + let pool_ratio_current = pool_map.get(&(asset_id, reward_asset_id)) + .cloned() + .unwrap_or(U256::from(0)); + + - // TODO: do not ignore error - let pool_ratio_current = Pallet::::get_pool_rewards_3rdparty(asset_id, reward_asset_id).unwrap_or_default(); let default_rewards = RewardInfo { activated_amount: 0_u128, rewards_not_yet_claimed: 0_u128, @@ -95,7 +105,7 @@ impl RewardsCalculator { }; - let rewards_info = crate::UserRewards3rdPartyInfo::::try_get( + let rewards_info = crate::RewardsInfoForScheduleRewards::::try_get( user.clone(), (asset_id, reward_asset_id) ).unwrap_or(default_rewards); diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index a7255d1daa..ed9bfb4521 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1312,36 +1312,6 @@ fn reject_schedule_with_too_little_rewards_per_session() { }); } -#[test] -#[serial] -fn number_of_reward_tokens_per_pool_is_limited() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(10u32)); - - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - for _ in 0..<::MaxRewardTokensPerPool as sp_core::Get>::get() { - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - assert_ok!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()) - ); - } - - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - assert_err!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()), - Error::::PoolRewardTokensLimitExceeded - ); - - - - }); -} - - #[test] #[serial] fn user_can_claim_3rdparty_rewards() { @@ -1555,3 +1525,197 @@ fn deactivate_3rdparty_rewards() { }); } + +#[test] +#[serial] +fn claim_rewards_from_multiple_schedules_using_single_liquidity() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN : u32 = 5; + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + + let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_token_id, 2 * amount, 10u32.into()).unwrap(); + + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_token_id, Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id))).unwrap(); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), + Ok(0) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_token_id), + Ok(0) + ); + + roll_to_session(1); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), + Ok(1000) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_token_id), + Ok(2000) + ); + + }); +} + +#[test] +#[serial] +fn liquidity_minting_liquidity_can_be_resused() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN : u32 = 5; + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + + let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_token_id, 2 * amount, 10u32.into()).unwrap(); + + ProofOfStake::activate_liquidity(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, Some(ScheduleActivationKind::LiquidityMining)).unwrap(); + + roll_to_session(1); + + assert_eq!( + ProofOfStake::calculate_rewards_amount(BOB, LIQUIDITY_TOKEN), + Ok(200) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), + Ok(1000) + ); + + }); +} + +#[test] +#[serial] +fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN : u32 = 5; + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + + let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_token_id, 2 * amount, 10u32.into()).unwrap(); + + ProofOfStake::activate_liquidity(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None).unwrap(); + assert_err!( + TokensOf::::transfer(LIQUIDITY_TOKEN, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath), + orml_tokens::Error::::BalanceTooLow + ); + + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, Some(ScheduleActivationKind::LiquidityMining)).unwrap(); + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, None).unwrap(); + + ProofOfStake::deactivate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 200, first_token_id).unwrap(); + assert_err!( + TokensOf::::transfer(LIQUIDITY_TOKEN, &BOB, &CHARLIE, 101, ExistenceRequirement::AllowDeath), + orml_tokens::Error::::BalanceTooLow + ); + + assert_ok!( + TokensOf::::transfer(LIQUIDITY_TOKEN, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath) + ); + }); +} + +#[test] +#[serial] +fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN : u32 = 5; + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + + let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_token_id, Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id))).unwrap(); + + assert_err!( + TokensOf::::transfer(0, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath), + orml_tokens::Error::::BalanceTooLow + ); + ProofOfStake::deactivate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id).unwrap(); + assert_err!( + TokensOf::::transfer(LIQUIDITY_TOKEN, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath), + orml_tokens::Error::::BalanceTooLow + ); + ProofOfStake::deactivate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_token_id).unwrap(); + + assert_ok!( + TokensOf::::transfer(LIQUIDITY_TOKEN, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath), + ); + }); +} + From d26c215d5ff1066643de81058ff158168f983258 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 22 Sep 2023 10:43:35 +0200 Subject: [PATCH 006/125] schedule rewards extrinsics --- pallets/proof-of-stake/src/lib.rs | 76 ++++++++++++++++++----- pallets/proof-of-stake/src/reward_info.rs | 19 ++++-- pallets/proof-of-stake/src/tests.rs | 67 ++++++++++++++++++++ 3 files changed, 144 insertions(+), 18 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 9448a9ac16..ebb87cf1dc 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -447,7 +447,7 @@ use super::*; ) } - /// Increases number of tokens used for liquidity mining purposes. + /// Decreases number of tokens used for liquidity mining purposes. /// /// Parameters: /// - liquidity_token_id - id of the token @@ -472,6 +472,28 @@ use super::*; ) } + /// Claims liquidity mining rewards + /// - tokens - pair of tokens + /// - amount - amount of the token + /// - reward_token - id of the token that is rewarded + #[transactional] + #[pallet::call_index(7)] + #[pallet::weight(<::WeightInfo>::activate_liquidity())] + pub fn claim_schedule_rewards_all( + origin: OriginFor, + liquidity_token_id: TokenId, + reward_token: TokenId, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + Self::claim_schedule_rewards_all_impl( + sender, + liquidity_token_id, + reward_token, + )?; + Ok(()) + } + } } @@ -883,6 +905,41 @@ impl Pallet { Ok(()) } + + fn claim_schedule_rewards_all_impl( + user: T::AccountId, + liquidity_asset_id: TokenId, + reward_token: TokenId, + ) -> Result { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + + let calc = RewardsCalculator::schedule_rewards::( + user.clone(), + liquidity_asset_id, + reward_token, + )?; + let (rewards_info, total_available_rewards) = calc.claim_rewards() + .map_err(|err| Into::>::into(err))?; + + ::Currency::transfer( + reward_token.into(), + &Self::pallet_account(), + &user, + total_available_rewards.into(), + ExistenceRequirement::KeepAlive, + )?; + + RewardsInfoForScheduleRewards::::insert(user.clone(), (liquidity_asset_id, reward_token), rewards_info); + + Pallet::::deposit_event(Event::RewardsClaimed( + user, + liquidity_asset_id, + total_available_rewards, + )); + + Ok(total_available_rewards) + } + } impl ProofOfStakeRewardsApi for Pallet { @@ -913,29 +970,19 @@ impl ProofOfStakeRewardsApi for Pallet { PromotedPoolRewards::::get().contains_key(&liquidity_token_id) } + fn claim_rewards_all( user: T::AccountId, liquidity_asset_id: Self::CurrencyId, ) -> Result { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - let mut rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) - .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; - let calc = RewardsCalculator::mining_rewards::( user.clone(), liquidity_asset_id, )?; - let current_rewards = - calc.calculate_rewards().map_err(|err| Into::>::into(err))?; - - let total_available_rewards = current_rewards - .checked_add(rewards_info.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(rewards_info.rewards_already_claimed)) - .ok_or(Error::::CalculateRewardsAllMathError)?; - - rewards_info.rewards_not_yet_claimed = 0_u128; - rewards_info.rewards_already_claimed = current_rewards; + let (rewards_info, total_available_rewards) = calc.claim_rewards() + .map_err(|err| Into::>::into(err))?; ::Currency::transfer( Self::native_token_id().into(), @@ -956,6 +1003,7 @@ impl ProofOfStakeRewardsApi for Pallet { Ok(total_available_rewards) } + fn activate_liquidity( user: T::AccountId, liquidity_asset_id: Self::CurrencyId, diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index d2707536b8..29403f7291 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -193,8 +193,6 @@ impl CurveRewards for ConstCurveRewards { fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { - println!("pool_ratio_at_last_checkpoint {}", user_info.pool_ratio_at_last_checkpoint); - println!("pool_ratio now {}", ctx.pool_ratio_current); let pool_rewards_ratio_new = ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; @@ -202,8 +200,6 @@ impl CurveRewards for ConstCurveRewards { .checked_mul(pool_rewards_ratio_new)? .checked_div(U256::from(u128::MAX))?; // always fit into u128 - println!("BASE : {rewards_base}"); - rewards_base .try_into() .ok() @@ -296,6 +292,21 @@ impl RewardsCalculator { }) } + pub fn claim_rewards(self) -> sp_std::result::Result<(RewardInfo, Balance), RewardsCalcError>{ + let current_rewards = self.calculate_rewards_impl()?; + + let total_available_rewards = current_rewards + .checked_add(self.rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) + .ok_or(RewardsCalcError::CheckpointMathError)?; + + let mut info = self.rewards_info.clone(); + + info.rewards_not_yet_claimed = 0_u128; + info.rewards_already_claimed = current_rewards; + Ok((info, total_available_rewards)) + } + pub fn calculate_rewards(self) -> sp_std::result::Result { self.calculate_rewards_impl() } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index ed9bfb4521..1608d5abd3 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1719,3 +1719,70 @@ fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() }); } + +#[test] +#[serial] +fn can_claim_schedule_rewards() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN : u32 = 5; + let valuation_mock = MockValuationApi::get_liquidity_asset_context(); + valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + + let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_token_id, Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id))).unwrap(); + + roll_to_session(1); + + assert_eq!( + TokensOf::::free_balance(first_token_id, &BOB), + 0, + ); + assert_eq!( + TokensOf::::free_balance(second_token_id, &BOB), + 0, + ); + + ProofOfStake::claim_schedule_rewards_all( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + first_token_id, + ).unwrap(); + ProofOfStake::claim_schedule_rewards_all( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + second_token_id, + ).unwrap(); + + assert_eq!( TokensOf::::free_balance(first_token_id, &BOB), 1000,); + assert_eq!( TokensOf::::free_balance(second_token_id, &BOB), 1000,); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), + Ok(0) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_token_id), + Ok(0) + ); + + }); +} + From 30193b12affde56dc9ffd665641c19a939e3c9e5 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 22 Sep 2023 11:28:18 +0200 Subject: [PATCH 007/125] docs for Proof of Stake --- pallets/proof-of-stake/src/lib.rs | 418 +++++++++------ pallets/proof-of-stake/src/mock.rs | 5 +- pallets/proof-of-stake/src/reward_info.rs | 60 +-- pallets/proof-of-stake/src/tests.rs | 620 +++++++++++++++++----- 4 files changed, 775 insertions(+), 328 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index ebb87cf1dc..464f647800 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -1,15 +1,107 @@ #![cfg_attr(not(feature = "std"), no_std)] +//! # Proof of Stake Module +//! +//! The goal of the Proof of Stake module is to reward people for providing liquidity to the Mangata DEX. +//! +//! ## Types of Rewards +//! +//! ### Liquidity Mining Rewards +//! +//! As described in Mangata tokenomics, during each session, some of the rewards are minted and distributed +//! among promoted pools. The council decides which pool to promote, and each promoted pool has a weight +//! assigned that determines how much of the rewards should +//! be distributed to that pool. +//! +//! The final amount of tokens that a user receives depends on: +//! - the amount of activated liquidity - rewards are distributed proportionally to the amount of +//! activated liquidity. +//! - the liquidity token itself - the more weight is assigned to the pool, the more rewards it receives. +//! - the time of liquidity activation - the longer a user stores liquidity, the more rewards they receive +//! (based on an asymptotic curve). +//! +//! Activated Liquidity cannot be transferred to another account; it is considered locked. The moment +//! liquidity is unlocked, the user loses the ability to claim rewards for that liquidity. +//! +//! #### Storage entries +//! +//! - [`TotalActivatedLiquidity`] - Stores information about the total amount of activated liquidity for +//! each liquidity token. +//! - [`PromotedPoolRewards`] - Stores information about the total amount of rewards for each liquidity +//! token. +//! - [`RewardsInfo`] - Stores information about rewards for liquidity mining. +//! - [`ScheduleActivationKind`] - Wrapper over origin ActivateKind that is used in +//! +//! #### Extrinsics +//! +//! - [`Pallet::activate_liquidity`] - Activates liquidity for liquidity mining rewards. +//! - [`Pallet::deactivate_liquidity`] - Deactivates liquidity for liquidity mining rewards. +//! - [`Pallet::claim_rewards_all`] - Claims all rewards for all liquidity tokens. +//! - [`Pallet::update_pool_promotion`] - Enables/disables the pool for liquidity mining rewards. +//! +//! ### Scheduled Rewards +//! +//! Anyone can provide tokens to reward people who store a particular liquidity token. Any +//! liquidity token can be rewarded with any other token provided by the user. Liquidity can be +//! activated for multiple scheduled rewards related to that liquidity token. Tokens will remain +//! locked (untransferable) as long as there is at least one schedule for which these rewards are +//! activated. +//! +//! #### Storage entries +//! +//! - [`RewardsInfoForScheduleRewards`] - Stores information about rewards for scheduled rewards. +//! - [`ScheduleRewardsPerSingleLiquidity`] - Stores the amount of rewards per single liquidity token. +//! - [`RewardsSchedules`] - Stores information about scheduled rewards. +//! - [`ScheduleId`] - Stores the unique id of the schedule. +//! - [`RewardTokensPerPool`] - Stores information about which reward tokens are used for a particular +//! liquidity token. +//! - [`TotalActivatedLiquidityForSchedules`] - Stores information about the total amount of activated +//! liquidity for each schedule. +//! - [`ActivatedLiquidityForSchedules`] - Stores information about how much liquidity was activated for +//! each schedule. +//! - [`ActivatedLockedLiquidityForSchedules`] - Stores information about how much liquidity was activated +//! for each schedule and not yet liquidity mining rewards. +//! +//! +//! #### Extrinsics +//! +//! - [`Pallet::reward_pool`] - Schedules rewards for the selected liquidity token. +//! - [`Pallet::activate_liquidity_for_rewards_schedule`] - Activates liquidity for scheduled rewards. +//! - [`Pallet::deactivate_liquidity_for_rewards_schedule`] - Deactivates liquidity for scheduled rewards. +//! - [`Pallet::claim_schedule_rewards_all`] - Claims all scheduled rewards for all liquidity tokens. +//! +//! ## Reusing a Single Liquidity Token for Multiple Rewards +//! +//! It may happen that a single liquidity token is rewarded with: +//! - Liquidity Mining Rewards - because the pool was promoted by the council. +//! - Scheduled rewards with token X - because Alice decided to do so. +//! - Scheduled rewards with token Y - because Bob decided to do so. +//! +//! In that case, a single liquidity token can be used to obtain rewards from multiple sources. There are +//! several options to do that: +//! +//! - The user can reuse liquidity used for liquidity mining rewards to claim scheduled rewards. In +//! this case, [`Pallet::activate_liquidity_for_rewards_schedule`] should be used with [`ActivateKind::LiquidityMining`]. +//! +//! - The user can reuse liquidity used for scheduled rewards (X) to sign up for rewards from other tokens (provided by Bob). In that case, [`Pallet::activate_liquidity_for_rewards_schedule`] should be used with [`ActivateKind::ActivatedLiquidity(X)`]. +//! +//! - The user can't directly provide liquidity activated for scheduled rewards to activate it for liquidity mining rewards. Instead: +//! * Liquidity used for schedule rewards can be deactivated [`Pallet::deactivate_liquidity_for_rewards_schedule`]. +//! * Liquidity can be activated for liquidity mining rewards [`Pallet::activate_liquidity`]. +//! * Liquidity can be activated for scheduled rewards [`Pallet::activate_liquidity_for_rewards_schedule`] with [`ScheduleActivationKind::Mining`]. + +use frame_support::pallet_prelude::*; + use frame_benchmarking::Zero; use frame_support::{ dispatch::{DispatchError, DispatchResult}, - ensure + ensure, + storage::bounded_btree_map::BoundedBTreeMap, }; use frame_system::ensure_signed; -use frame_support::storage::bounded_btree_map::BoundedBTreeMap; +use mangata_support::traits::Valuate; use sp_core::U256; use sp_runtime::traits::AccountIdConversion; -use mangata_support::traits::Valuate; use frame_support::{ pallet_prelude::*, @@ -57,7 +149,6 @@ pub use weights::WeightInfo; type AccountIdOf = ::AccountId; - /// Wrapper over origin ActivateKind that is used in [`Pallet::activat_liquidity`] /// with extension that allows activating liquidity that was already used for: /// - `ActivatedLiquidity` - already activated liquidity (for scheduled rewards) @@ -74,9 +165,9 @@ const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!") #[frame_support::pallet] pub mod pallet { use frame_support::traits::Currency; -use mangata_support::traits::PoolCreateApi; + use mangata_support::traits::PoolCreateApi; -use super::*; + use super::*; #[pallet::pallet] #[pallet::without_storage_info] @@ -117,7 +208,10 @@ use super::*; /// The maximum number of reward tokens per pool type MaxRewardTokensPerPool: Get; type WeightInfo: WeightInfo; - type ValuationApi: Valuate; + type ValuationApi: Valuate< + Balance = mangata_types::Balance, + CurrencyId = mangata_types::TokenId, + >; } #[pallet::error] @@ -213,13 +307,21 @@ use super::*; /// How much scheduled rewards per single liquidty_token should be distribute_rewards /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic #[pallet::storage] - pub type ScheduleRewardsPerSingleLiquidity = StorageValue<_, BTreeMap<(TokenId, TokenId), U256>, ValueQuery>; + pub type ScheduleRewardsPerSingleLiquidity = + StorageValue<_, BTreeMap<(TokenId, TokenId), U256>, ValueQuery>; /// List of activated schedules sorted by expiry date #[pallet::storage] #[pallet::getter(fn schedules)] - pub type RewardsSchedules = - StorageValue<_, BoundedBTreeMap<(T::BlockNumber, TokenId, TokenId, Balance, u64), (), T::RewardsSchedulesLimit>, ValueQuery>; + pub type RewardsSchedules = StorageValue< + _, + BoundedBTreeMap< + (T::BlockNumber, TokenId, TokenId, Balance, u64), + (), + T::RewardsSchedulesLimit, + >, + ValueQuery, + >; /// Unique id of the schedule #[pallet::storage] @@ -227,7 +329,8 @@ use super::*; /// Maps liquidity token to list of tokens that it ever was rewarded with #[pallet::storage] - pub type RewardTokensPerPool = StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (), ValueQuery>; + pub type RewardTokensPerPool = + StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (), ValueQuery>; /// Total amount of activated liquidity for each schedule /// `BTreeMap` is used because of storage reads write optiomization in `distribute_rewards` @@ -241,29 +344,22 @@ use super::*; /// liquididty tokens can be unlocked. #[pallet::storage] pub type ActivatedLiquidityForSchedules = StorageNMap< - _, + _, ( - NMapKey>, - NMapKey, - NMapKey - ), + NMapKey>, + NMapKey, + NMapKey, + ), u128, - OptionQuery, + OptionQuery, >; /// Tracks how much of the liquidity was activated for schedule rewards and not yet /// liquidity mining rewards. That information is essential to properly handle tocken unlcocks /// when liquidity is deactivated. #[pallet::storage] - pub type ActivatedLockedLiquidityForSchedules = StorageDoubleMap< - _, - Twox64Concat, - AccountIdOf, - Twox64Concat, - TokenId, - u128, - ValueQuery, - >; + pub type ActivatedLockedLiquidityForSchedules = + StorageDoubleMap<_, Twox64Concat, AccountIdOf, Twox64Concat, TokenId, u128, ValueQuery>; #[pallet::call] impl Pallet { @@ -376,14 +472,17 @@ use super::*; Error::::CannotScheduleRewardsInPast ); - let amount_per_session = schedule_end.saturated_into::() + let amount_per_session = schedule_end + .saturated_into::() .checked_sub(current_session) .and_then(|v| amount.checked_div(v.into())) .ok_or(Error::::MathOverflow)?; // TODO: use valuation instead amount directly - ensure!(amount_per_session >= T::MinRewardsPerSession::get(), Error::::TooLittleRewardsPerSession); - + ensure!( + amount_per_session >= T::MinRewardsPerSession::get(), + Error::::TooLittleRewardsPerSession + ); RewardTokensPerPool::::insert(rewarded_token, token_id, ()); @@ -399,11 +498,7 @@ use super::*; let schedule_id = ScheduleId::::get(); RewardsSchedules::::try_mutate(|map| { - - let key: Option<(_,_,_,_,_)> = map - .first_key_value() - .map(|(x,y)| x.clone()); - + let key: Option<(_, _, _, _, _)> = map.first_key_value().map(|(x, y)| x.clone()); if let Some(val) = key { if current_session > val.0.saturated_into::() { @@ -411,8 +506,12 @@ use super::*; } } - map.try_insert((schedule_end, rewarded_token, token_id, amount_per_session, schedule_id), ()) - }).or(Err(Error::::TooManySchedules))?; + map.try_insert( + (schedule_end, rewarded_token, token_id, amount_per_session, schedule_id), + (), + ) + }) + .or(Err(Error::::TooManySchedules))?; ScheduleId::::mutate(|v| *v += 1); @@ -486,24 +585,18 @@ use super::*; ) -> DispatchResult { let sender = ensure_signed(origin)?; - Self::claim_schedule_rewards_all_impl( - sender, - liquidity_token_id, - reward_token, - )?; + Self::claim_schedule_rewards_all_impl(sender, liquidity_token_id, reward_token)?; Ok(()) } - } } -pub enum RewardsKind{ +pub enum RewardsKind { RewardsLiquidityMinting, Rewards3rdParty(TokenId), } impl Pallet { - fn activate_liquidity_for_liquidity_minting( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -540,7 +633,6 @@ impl Pallet { liquidity_asset_id: TokenId, amount: Balance, ) -> DispatchResult { - if amount > 0 { Self::set_liquidity_burning_checkpoint(user.clone(), liquidity_asset_id, amount)?; Pallet::::deposit_event(Event::LiquidityDeactivated( @@ -550,7 +642,6 @@ impl Pallet { )); } Ok(()) - } fn activate_liquidity_for_schedule( @@ -558,11 +649,11 @@ impl Pallet { liquidity_asset_id: TokenId, amount: Balance, use_balance_from: ScheduleActivationKind, - reward_token: TokenId + reward_token: TokenId, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - match use_balance_from{ + match use_balance_from { ScheduleActivationKind::ActivateKind(ref use_balance_from) => { ensure!( ::ActivationReservesProvider::can_activate( @@ -573,31 +664,49 @@ impl Pallet { ), Error::::NotEnoughAssets ); - ActivatedLockedLiquidityForSchedules::::mutate(user.clone(), liquidity_asset_id, |val| *val += amount); + ActivatedLockedLiquidityForSchedules::::mutate( + user.clone(), + liquidity_asset_id, + |val| *val += amount, + ); }, ScheduleActivationKind::ActivatedLiquidity(token_id) => { - let already_activated_amount = - RewardsInfoForScheduleRewards::::get(user.clone(), (liquidity_asset_id, reward_token)).activated_amount; - let available_amount = - RewardsInfoForScheduleRewards::::get(user.clone(), (liquidity_asset_id, token_id)).activated_amount; + let already_activated_amount = RewardsInfoForScheduleRewards::::get( + user.clone(), + (liquidity_asset_id, reward_token), + ) + .activated_amount; + let available_amount = RewardsInfoForScheduleRewards::::get( + user.clone(), + (liquidity_asset_id, token_id), + ) + .activated_amount; ensure!( - already_activated_amount + amount <= available_amount , + already_activated_amount + amount <= available_amount, Error::::NotEnoughAssets ); - } + }, ScheduleActivationKind::LiquidityMining => { - let already_activated_amount = - RewardsInfoForScheduleRewards::::get(user.clone(), (liquidity_asset_id, reward_token)).activated_amount; + let already_activated_amount = RewardsInfoForScheduleRewards::::get( + user.clone(), + (liquidity_asset_id, reward_token), + ) + .activated_amount; let available_amount = RewardsInfo::::get(user.clone(), liquidity_asset_id).activated_amount; ensure!( - already_activated_amount + amount <= available_amount , + already_activated_amount + amount <= available_amount, Error::::NotEnoughAssets ); }, } - Self::set_liquidity_minting_checkpoint_3rdparty(user.clone(), liquidity_asset_id, amount, reward_token)?; + Self::set_liquidity_minting_checkpoint_3rdparty( + user.clone(), + liquidity_asset_id, + amount, + reward_token, + )?; match use_balance_from { ScheduleActivationKind::ActivateKind(use_balance_from) => { @@ -608,10 +717,8 @@ impl Pallet { use_balance_from, )?; }, - ScheduleActivationKind::LiquidityMining => { - }, - _ => {} - + ScheduleActivationKind::LiquidityMining => {}, + _ => {}, } Pallet::::deposit_event(Event::LiquidityActivated(user, liquidity_asset_id, amount)); @@ -619,16 +726,19 @@ impl Pallet { Ok(()) } - fn deactivate_liquidity_for_schedule( user: AccountIdOf, liquidity_asset_id: TokenId, amount: Balance, - rewards_asset_id: TokenId + rewards_asset_id: TokenId, ) -> DispatchResult { - if amount > 0 { - Self::set_liquidity_burning_checkpoint_for_schedule(user.clone(), liquidity_asset_id, amount, rewards_asset_id)?; + Self::set_liquidity_burning_checkpoint_for_schedule( + user.clone(), + liquidity_asset_id, + amount, + rewards_asset_id, + )?; Pallet::::deposit_event(Event::LiquidityDeactivated( user, liquidity_asset_id, @@ -636,12 +746,8 @@ impl Pallet { )); } Ok(()) - } - - - fn calculate_rewards_amount_3rdparty( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -649,14 +755,17 @@ impl Pallet { ) -> Result { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - if let Ok(info) = RewardsInfoForScheduleRewards::::try_get(user.clone(), (liquidity_asset_id, rewards_asset_id)){ + if let Ok(info) = RewardsInfoForScheduleRewards::::try_get( + user.clone(), + (liquidity_asset_id, rewards_asset_id), + ) { let current_rewards = match info.activated_amount { 0 => 0u128, _ => { let calc = RewardsCalculator::schedule_rewards::( user.clone(), liquidity_asset_id, - rewards_asset_id + rewards_asset_id, )?; calc.calculate_rewards().map_err(|err| Into::>::into(err))? }, @@ -665,9 +774,8 @@ impl Pallet { Ok(current_rewards .checked_add(info.rewards_not_yet_claimed) .and_then(|v| v.checked_sub(info.rewards_already_claimed)) - .ok_or(Error::::CalculateRewardsMathError)? - ) - }else{ + .ok_or(Error::::CalculateRewardsMathError)?) + } else { Ok(0u128) } } @@ -707,7 +815,11 @@ impl Pallet { } fn ensure_is_promoted_pool(liquidity_asset_id: TokenId) -> Result<(), DispatchError> { - if Self::get_pool_rewards(liquidity_asset_id).is_ok() || RewardTokensPerPool::::iter_prefix_values(liquidity_asset_id).next().is_some() { + if Self::get_pool_rewards(liquidity_asset_id).is_ok() || + RewardTokensPerPool::::iter_prefix_values(liquidity_asset_id) + .next() + .is_some() + { Ok(()) } else { Err(DispatchError::from(Error::::NotAPromotedPool)) @@ -722,10 +834,7 @@ impl Pallet { Self::ensure_is_promoted_pool(liquidity_asset_id)?; { - let calc = RewardsCalculator::mining_rewards::( - user.clone(), - liquidity_asset_id, - )?; + let calc = RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; let rewards_info = calc .activate_more(liquidity_assets_added) .map_err(|err| Into::>::into(err))?; @@ -735,11 +844,9 @@ impl Pallet { TotalActivatedLiquidity::::try_mutate(liquidity_asset_id, |active_amount| { if let Some(val) = active_amount.checked_add(liquidity_assets_added) { - *active_amount = val; Ok(()) } else { - Err(()) } }) @@ -760,28 +867,31 @@ impl Pallet { let calc = RewardsCalculator::schedule_rewards::( user.clone(), liquidity_asset_id, - liquidity_assets_reward + liquidity_assets_reward, )?; let rewards_info = calc .activate_more(liquidity_assets_added) .map_err(|err| Into::>::into(err))?; - RewardsInfoForScheduleRewards::::insert(user.clone(), (liquidity_asset_id, liquidity_assets_reward), rewards_info); + RewardsInfoForScheduleRewards::::insert( + user.clone(), + (liquidity_asset_id, liquidity_assets_reward), + rewards_info, + ); } - ActivatedLiquidityForSchedules::::try_mutate_exists( - (user.clone(), liquidity_asset_id, liquidity_assets_reward ), - |v| - { + ActivatedLiquidityForSchedules::::try_mutate_exists( + (user.clone(), liquidity_asset_id, liquidity_assets_reward), + |v| { match v { Some(x) => { v.as_mut().map(|a| *a += liquidity_assets_added); }, None => { - *v = Some(liquidity_assets_added); - }, + *v = Some(liquidity_assets_added); + }, }; - Ok::<(),Error>(()) - } + Ok::<(), Error>(()) + }, )?; TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, |activations| { @@ -790,7 +900,6 @@ impl Pallet { // NOTE: handle overflow .and_modify(|val| *val += liquidity_assets_added) .or_insert(liquidity_assets_added); - }); Ok(()) @@ -812,10 +921,7 @@ impl Pallet { Error::::NotEnoughAssets ); - let calc = RewardsCalculator::mining_rewards::( - user.clone(), - liquidity_asset_id, - )?; + let calc = RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; let rewards_info = calc .activate_less(liquidity_assets_burned) .map_err(|err| Into::>::into(err))?; @@ -841,7 +947,6 @@ impl Pallet { Ok(()) } - fn set_liquidity_burning_checkpoint_for_schedule( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -860,7 +965,11 @@ impl Pallet { .activate_less(liquidity_assets_burned) .map_err(|err| Into::>::into(err))?; - RewardsInfoForScheduleRewards::::insert(user.clone(), (liquidity_asset_id, reward_token), rewards_info); + RewardsInfoForScheduleRewards::::insert( + user.clone(), + (liquidity_asset_id, reward_token), + rewards_info, + ); TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, |activations| { activations @@ -868,33 +977,38 @@ impl Pallet { .and_modify(|val| *val -= liquidity_assets_burned); }); - ActivatedLiquidityForSchedules::::try_mutate_exists( - (user.clone(), liquidity_asset_id, reward_token), - |v| - { - v.and_then(|a| a.checked_sub(liquidity_assets_burned) - .and_then(|val| { + ActivatedLiquidityForSchedules::::try_mutate_exists( + (user.clone(), liquidity_asset_id, reward_token), + |v| { + v.and_then(|a| { + a.checked_sub(liquidity_assets_burned).and_then(|val| { if val > 0 { *v = Some(val); - }else{ + } else { *v = None; } Some(val) }) - ).ok_or(Error::::MathOverflow) - } + }) + .ok_or(Error::::MathOverflow) + }, )?; - - - if let None = ActivatedLiquidityForSchedules::::iter_prefix_values( (user.clone(), liquidity_asset_id), - ).next(){ - - let amount = ActivatedLockedLiquidityForSchedules::::mutate(user.clone(), liquidity_asset_id, |val| { - let prev = *val; - *val = 0; - prev - }); + if let None = ActivatedLiquidityForSchedules::::iter_prefix_values(( + user.clone(), + liquidity_asset_id, + )) + .next() + { + let amount = ActivatedLockedLiquidityForSchedules::::mutate( + user.clone(), + liquidity_asset_id, + |val| { + let prev = *val; + *val = 0; + prev + }, + ); ::ActivationReservesProvider::deactivate( liquidity_asset_id, @@ -918,8 +1032,8 @@ impl Pallet { liquidity_asset_id, reward_token, )?; - let (rewards_info, total_available_rewards) = calc.claim_rewards() - .map_err(|err| Into::>::into(err))?; + let (rewards_info, total_available_rewards) = + calc.claim_rewards().map_err(|err| Into::>::into(err))?; ::Currency::transfer( reward_token.into(), @@ -929,7 +1043,11 @@ impl Pallet { ExistenceRequirement::KeepAlive, )?; - RewardsInfoForScheduleRewards::::insert(user.clone(), (liquidity_asset_id, reward_token), rewards_info); + RewardsInfoForScheduleRewards::::insert( + user.clone(), + (liquidity_asset_id, reward_token), + rewards_info, + ); Pallet::::deposit_event(Event::RewardsClaimed( user, @@ -939,7 +1057,6 @@ impl Pallet { Ok(total_available_rewards) } - } impl ProofOfStakeRewardsApi for Pallet { @@ -970,19 +1087,15 @@ impl ProofOfStakeRewardsApi for Pallet { PromotedPoolRewards::::get().contains_key(&liquidity_token_id) } - fn claim_rewards_all( user: T::AccountId, liquidity_asset_id: Self::CurrencyId, ) -> Result { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - let calc = RewardsCalculator::mining_rewards::( - user.clone(), - liquidity_asset_id, - )?; - let (rewards_info, total_available_rewards) = calc.claim_rewards() - .map_err(|err| Into::>::into(err))?; + let calc = RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; + let (rewards_info, total_available_rewards) = + calc.claim_rewards().map_err(|err| Into::>::into(err))?; ::Currency::transfer( Self::native_token_id().into(), @@ -1003,7 +1116,6 @@ impl ProofOfStakeRewardsApi for Pallet { Ok(total_available_rewards) } - fn activate_liquidity( user: T::AccountId, liquidity_asset_id: Self::CurrencyId, @@ -1023,14 +1135,9 @@ impl ProofOfStakeRewardsApi for Pallet { liquidity_asset_id: Self::CurrencyId, amount: Self::Balance, ) -> DispatchResult { - Self::deactivate_liquidity_for_liquidity_minting( - user, - liquidity_asset_id, - amount, - ) + Self::deactivate_liquidity_for_liquidity_minting(user, liquidity_asset_id, amount) } - fn calculate_rewards_amount( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -1042,10 +1149,8 @@ impl ProofOfStakeRewardsApi for Pallet { let current_rewards = match rewards_info.activated_amount { 0 => 0u128, _ => { - let calc = RewardsCalculator::mining_rewards::( - user.clone(), - liquidity_asset_id, - )?; + let calc = + RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; calc.calculate_rewards().map_err(|err| Into::>::into(err))? }, }; @@ -1060,25 +1165,25 @@ impl ProofOfStakeRewardsApi for Pallet { impl LiquidityMiningApi for Pallet { /// Distributs liquidity mining rewards between all the activated tokens based on their weight fn distribute_rewards(liquidity_mining_rewards: Balance) { - let schedules = RewardsSchedules::::get(); let mut pools = ScheduleRewardsPerSingleLiquidity::::get(); - let it = schedules - .iter() - .filter_map(|((session, rewarded_token, tokenid, amount, _),())|{ - if (*session).saturated_into::() >= Self::session_index() { - Some((rewarded_token, tokenid, amount)) - } else { - None - } - }); + let it = + schedules + .iter() + .filter_map(|((session, rewarded_token, tokenid, amount, _), ())| { + if (*session).saturated_into::() >= Self::session_index() { + Some((rewarded_token, tokenid, amount)) + } else { + None + } + }); for (staked_token, token, amount) in it { + let activated_3rdparty_rewards = + TotalActivatedLiquidityForSchedules::::get(staked_token); - let activated_3rdparty_rewards = TotalActivatedLiquidityForSchedules::::get(staked_token); - - if let Some(activated_amount) = activated_3rdparty_rewards.get(&token){ + if let Some(activated_amount) = activated_3rdparty_rewards.get(&token) { let activated_amount = U256::from(*activated_amount); // NOTE: fix let rewards = pools.get(&(*staked_token, *token)).cloned().unwrap_or_default(); @@ -1087,17 +1192,14 @@ impl LiquidityMiningApi for Pallet { .and_then(|x| x.checked_div(activated_amount)) .and_then(|x| x.checked_add(rewards)); - if let Some(val) = rewards_for_liquidity { - pools.insert((*staked_token,*token), val); + pools.insert((*staked_token, *token), val); } - } } ScheduleRewardsPerSingleLiquidity::::put(pools); - let _ = PromotedPoolRewards::::try_mutate(|promoted_pools| -> DispatchResult { // benchmark with max of X prom pools let activated_pools: Vec<_> = promoted_pools diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 2bd2de9286..32dadbda5a 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -12,7 +12,7 @@ use sp_runtime::{ use crate as pos; use frame_support::{ construct_runtime, parameter_types, - traits::{tokens::currency::MultiTokenCurrency, ConstU32, ConstU128, Contains, Everything}, + traits::{tokens::currency::MultiTokenCurrency, ConstU128, ConstU32, Contains, Everything}, PalletId, }; @@ -248,7 +248,7 @@ impl pos::Config for Test { type Currency = MultiTokenCurrencyAdapter; type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10>; - type RewardsSchedulesLimit = ConstU32<10>; + type RewardsSchedulesLimit = ConstU32<10>; type MinRewardsPerSession = ConstU128<10>; type MaxRewardTokensPerPool = ConstU32<5>; type WeightInfo = (); @@ -370,4 +370,3 @@ macro_rules! assert_event_emitted { } }; } - diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 29403f7291..228989b026 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -52,16 +52,16 @@ impl RewardsCalculator { let current_time: u32 = Pallet::::get_current_rewards_time()?; let pool_ratio_current = Pallet::::get_pool_rewards(asset_id)?; let default_rewards = RewardInfo { - activated_amount: 0_u128, - rewards_not_yet_claimed: 0_u128, - rewards_already_claimed: 0_u128, - last_checkpoint: current_time, - pool_ratio_at_last_checkpoint: pool_ratio_current, - missing_at_last_checkpoint: U256::from(0u128), - }; + activated_amount: 0_u128, + rewards_not_yet_claimed: 0_u128, + rewards_already_claimed: 0_u128, + last_checkpoint: current_time, + pool_ratio_at_last_checkpoint: pool_ratio_current, + missing_at_last_checkpoint: U256::from(0u128), + }; - let rewards_info = crate::RewardsInfo::::try_get(user.clone(), asset_id) - .unwrap_or(default_rewards); + let rewards_info = + crate::RewardsInfo::::try_get(user.clone(), asset_id).unwrap_or(default_rewards); Ok(Self { rewards_context: RewardsContext { @@ -80,7 +80,6 @@ impl RewardsCalculator { asset_id: TokenId, reward_asset_id: TokenId, ) -> sp_std::result::Result { - let current_time: u32 = Pallet::::get_current_rewards_time()?; ensure!( crate::RewardTokensPerPool::::try_get(asset_id, reward_asset_id).is_ok(), @@ -89,27 +88,23 @@ impl RewardsCalculator { let pool_map = crate::ScheduleRewardsPerSingleLiquidity::::get(); - let pool_ratio_current = pool_map.get(&(asset_id, reward_asset_id)) - .cloned() - .unwrap_or(U256::from(0)); - - + let pool_ratio_current = + pool_map.get(&(asset_id, reward_asset_id)).cloned().unwrap_or(U256::from(0)); let default_rewards = RewardInfo { - activated_amount: 0_u128, - rewards_not_yet_claimed: 0_u128, - rewards_already_claimed: 0_u128, - last_checkpoint: current_time, - pool_ratio_at_last_checkpoint: pool_ratio_current, - missing_at_last_checkpoint: U256::from(0u128), - }; - + activated_amount: 0_u128, + rewards_not_yet_claimed: 0_u128, + rewards_already_claimed: 0_u128, + last_checkpoint: current_time, + pool_ratio_at_last_checkpoint: pool_ratio_current, + missing_at_last_checkpoint: U256::from(0u128), + }; let rewards_info = crate::RewardsInfoForScheduleRewards::::try_get( user.clone(), - (asset_id, reward_asset_id) - ).unwrap_or(default_rewards); - + (asset_id, reward_asset_id), + ) + .unwrap_or(default_rewards); Ok(Self { rewards_context: RewardsContext { @@ -119,11 +114,9 @@ impl RewardsCalculator { rewards_info, _curve: PhantomData::, }) - } } - pub trait CurveRewards { fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option; fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option; @@ -186,13 +179,12 @@ impl CurveRewards for AsymptoticCurveRewards { } } -impl CurveRewards for ConstCurveRewards { +impl CurveRewards for ConstCurveRewards { fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { - Some( U256::from(0) ) + Some(U256::from(0)) } fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { - let pool_rewards_ratio_new = ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; @@ -200,9 +192,7 @@ impl CurveRewards for ConstCurveRewards { .checked_mul(pool_rewards_ratio_new)? .checked_div(U256::from(u128::MAX))?; // always fit into u128 - rewards_base - .try_into() - .ok() + rewards_base.try_into().ok() } } @@ -292,7 +282,7 @@ impl RewardsCalculator { }) } - pub fn claim_rewards(self) -> sp_std::result::Result<(RewardInfo, Balance), RewardsCalcError>{ + pub fn claim_rewards(self) -> sp_std::result::Result<(RewardInfo, Balance), RewardsCalcError> { let current_rewards = self.calculate_rewards_impl()?; let total_available_rewards = current_rewards diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 1608d5abd3..8ba8543e55 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -3,9 +3,9 @@ #![allow(non_snake_case)] use super::*; -use serial_test::serial; use crate::mock::*; use frame_support::{assert_err, assert_ok}; +use serial_test::serial; use mangata_support::traits::{ComputeIssuance, GetIssuance}; @@ -35,11 +35,10 @@ fn initialize_liquidity_rewards() { ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); } - pub(crate) fn roll_to_session(n: u32) { let block = n * Pallet::::rewards_period(); - if block < System::block_number().saturated_into::() { + if block < System::block_number().saturated_into::() { panic!("cannot roll to past block"); } forward_to_block(block); @@ -976,7 +975,6 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { }); } - pub(crate) fn roll_to_while_minting(n: u64, expected_amount_minted: Option) { let mut session_number: u32; let mut session_issuance: (Balance, Balance); @@ -1121,9 +1119,23 @@ fn user_can_provide_3rdparty_rewards() { let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 10u32.into(), + ) + .unwrap(); roll_to_session(5); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 6u32.into()).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 6u32.into(), + ) + .unwrap(); }); } @@ -1141,15 +1153,33 @@ fn cant_schedule_rewards_in_past() { roll_to_session(5); assert_err!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair,token_id, amount, 1u32.into()), + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 1u32.into() + ), Error::::CannotScheduleRewardsInPast ); assert_err!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair,token_id, amount, 4u32.into()), + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 4u32.into() + ), Error::::CannotScheduleRewardsInPast ); assert_err!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair,token_id, amount, 5u32.into()), + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 5u32.into() + ), Error::::CannotScheduleRewardsInPast ); }); @@ -1160,17 +1190,24 @@ fn cant_schedule_rewards_in_past() { fn cannot_reward_unexisting_pool() { new_test_ext().execute_with(|| { let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Err(Error::::PoolDoesNotExist.into())); + valuation_mock + .expect() + .return_const(Err(Error::::PoolDoesNotExist.into())); let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); let amount = 10_000u128; assert_err!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()), + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 5u32.into() + ), Error::::PoolDoesNotExist ); - }); } @@ -1189,12 +1226,19 @@ fn rewards_are_stored_in_pallet_account() { assert_eq!(TokensOf::::free_balance(token_id, &Pallet::::pallet_account()), 0); assert_eq!(TokensOf::::free_balance(token_id, &ALICE), MILLION); - assert_ok!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()), - ); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 5u32.into() + ),); assert_eq!(TokensOf::::free_balance(token_id, &ALICE), MILLION - amount); - assert_eq!(TokensOf::::free_balance(token_id, &Pallet::::pallet_account()), amount); + assert_eq!( + TokensOf::::free_balance(token_id, &Pallet::::pallet_account()), + amount + ); }); } @@ -1211,15 +1255,18 @@ fn rewards_schedule_is_stored() { let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); let amount = 10_000u128; - assert_ok!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()), - ); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 5u32.into() + ),); assert_eq!( ProofOfStake::schedules().into_inner(), - BTreeMap::from([((5u64, liquidity_token_id, token_id, amount/5, 0), ())]) + BTreeMap::from([((5u64, liquidity_token_id, token_id, amount / 5, 0), ())]) ); - }); } @@ -1235,25 +1282,38 @@ fn number_of_active_schedules_is_limited() { let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); let amount = 10_000u128; - - let max_schedules: u32 = <::RewardsSchedulesLimit as sp_core::Get<_>>::get(); + let max_schedules: u32 = + <::RewardsSchedulesLimit as sp_core::Get<_>>::get(); for i in 0..(max_schedules) { - assert_ok!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, (5u32 + i).into()) - ); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + (5u32 + i).into() + )); } assert_err!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 100u32.into()), + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 100u32.into() + ), Error::::TooManySchedules ); roll_to_session(10); - assert_ok!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 100u32.into()) - ); - + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 100u32.into() + )); }); } @@ -1269,22 +1329,27 @@ fn duplicated_schedules_works() { let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); let amount = 10_000u128; - - assert_ok!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()) - ); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 5u32.into() + )); assert_eq!(1, ProofOfStake::schedules().len()); - assert_ok!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 5u32.into()) - ); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 5u32.into() + )); assert_eq!(2, ProofOfStake::schedules().len()); - }); } - #[test] #[serial] fn reject_schedule_with_too_little_rewards_per_session() { @@ -1302,13 +1367,23 @@ fn reject_schedule_with_too_little_rewards_per_session() { let min_rewards = <::MinRewardsPerSession as sp_core::Get>::get(); assert_err!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, min_rewards - 1, 5u32.into()), + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + min_rewards - 1, + 5u32.into() + ), Error::::TooLittleRewardsPerSession ); - assert_ok!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, min_rewards, 5u32.into()) - ); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + min_rewards, + 5u32.into() + )); }); } @@ -1317,7 +1392,7 @@ fn reject_schedule_with_too_little_rewards_per_session() { fn user_can_claim_3rdparty_rewards() { new_test_ext().execute_with(|| { System::set_block_number(1); - const LIQUIDITY_TOKEN : u32 = 5; + const LIQUIDITY_TOKEN: u32 = 5; let valuation_mock = MockValuationApi::get_liquidity_asset_context(); valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -1337,18 +1412,38 @@ fn user_can_claim_3rdparty_rewards() { let amount = 10_000u128; ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 10u32.into(), + ) + .unwrap(); roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, token_id, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + token_id, + None, + ) + .unwrap(); assert_eq!( ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), Ok(0) ); - roll_to_session(2); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, token_id, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + token_id, + None, + ) + .unwrap(); assert_eq!( ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), Ok(0) @@ -1375,7 +1470,7 @@ fn user_can_claim_3rdparty_rewards() { fn overlapping_3rdparty_rewards_works() { new_test_ext().execute_with(|| { System::set_block_number(1); - const LIQUIDITY_TOKEN : u32 = 5; + const LIQUIDITY_TOKEN: u32 = 5; let valuation_mock = MockValuationApi::get_liquidity_asset_context(); valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -1393,38 +1488,72 @@ fn overlapping_3rdparty_rewards_works() { let amount = 10_000u128; ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_reward_token, amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + first_reward_token, + amount, + 10u32.into(), + ) + .unwrap(); roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_reward_token, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_reward_token, + None, + ) + .unwrap(); roll_to_session(5); let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_reward_token_id, 100_000, 15u32.into()).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_reward_token_id, None).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + second_reward_token_id, + 100_000, + 15u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + second_reward_token_id, + None, + ) + .unwrap(); roll_to_session(6); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_reward_token_id), + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + second_reward_token_id + ), Ok(10000) ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_reward_token), + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + first_reward_token + ), Ok(5000) ); - }); } - #[test] #[serial] fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { new_test_ext().execute_with(|| { System::set_block_number(1); - const LIQUIDITY_TOKEN : u32 = 5; + const LIQUIDITY_TOKEN: u32 = 5; let valuation_mock = MockValuationApi::get_liquidity_asset_context(); valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -1442,37 +1571,72 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { let amount = 10_000u128; ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_reward_token, amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + first_reward_token, + amount, + 10u32.into(), + ) + .unwrap(); roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_reward_token, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_reward_token, + None, + ) + .unwrap(); roll_to_session(5); let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_reward_token_id, 100_000, 15u32.into()).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_reward_token_id, Some(ScheduleActivationKind::ActivatedLiquidity(first_reward_token)) ).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + second_reward_token_id, + 100_000, + 15u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + second_reward_token_id, + Some(ScheduleActivationKind::ActivatedLiquidity(first_reward_token)), + ) + .unwrap(); roll_to_session(6); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_reward_token_id), + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + second_reward_token_id + ), Ok(10000) ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_reward_token), + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + first_reward_token + ), Ok(5000) ); }); } - #[test] #[serial] fn deactivate_3rdparty_rewards() { new_test_ext().execute_with(|| { System::set_block_number(1); - const LIQUIDITY_TOKEN : u32 = 5; + const LIQUIDITY_TOKEN: u32 = 5; let valuation_mock = MockValuationApi::get_liquidity_asset_context(); valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -1491,11 +1655,32 @@ fn deactivate_3rdparty_rewards() { let amount = 10_000u128; ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + token_id, + amount, + 10u32.into(), + ) + .unwrap(); roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, token_id, None).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, token_id, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + token_id, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + token_id, + None, + ) + .unwrap(); roll_to_session(2); @@ -1508,7 +1693,13 @@ fn deactivate_3rdparty_rewards() { ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), Ok(500) ); - ProofOfStake::deactivate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, token_id).unwrap(); + ProofOfStake::deactivate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + token_id, + ) + .unwrap(); roll_to_session(3); @@ -1521,17 +1712,15 @@ fn deactivate_3rdparty_rewards() { ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), Ok(500) ); - }); } - #[test] #[serial] fn claim_rewards_from_multiple_schedules_using_single_liquidity() { new_test_ext().execute_with(|| { System::set_block_number(1); - const LIQUIDITY_TOKEN : u32 = 5; + const LIQUIDITY_TOKEN: u32 = 5; let valuation_mock = MockValuationApi::get_liquidity_asset_context(); valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -1550,11 +1739,39 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { let amount = 10_000u128; ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_token_id, amount, 10u32.into()).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_token_id, 2 * amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + first_token_id, + amount, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + second_token_id, + 2 * amount, + 10u32.into(), + ) + .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, None).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_token_id, Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id))).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_token_id, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + second_token_id, + Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id)), + ) + .unwrap(); assert_eq!( ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), @@ -1575,7 +1792,6 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_token_id), Ok(2000) ); - }); } @@ -1584,7 +1800,7 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { fn liquidity_minting_liquidity_can_be_resused() { new_test_ext().execute_with(|| { System::set_block_number(1); - const LIQUIDITY_TOKEN : u32 = 5; + const LIQUIDITY_TOKEN: u32 = 5; let valuation_mock = MockValuationApi::get_liquidity_asset_context(); valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -1603,23 +1819,41 @@ fn liquidity_minting_liquidity_can_be_resused() { let amount = 10_000u128; ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_token_id, amount, 10u32.into()).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_token_id, 2 * amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + first_token_id, + amount, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + second_token_id, + 2 * amount, + 10u32.into(), + ) + .unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, Some(ScheduleActivationKind::LiquidityMining)).unwrap(); + ProofOfStake::activate_liquidity(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_token_id, + Some(ScheduleActivationKind::LiquidityMining), + ) + .unwrap(); roll_to_session(1); - assert_eq!( - ProofOfStake::calculate_rewards_amount(BOB, LIQUIDITY_TOKEN), - Ok(200) - ); + assert_eq!(ProofOfStake::calculate_rewards_amount(BOB, LIQUIDITY_TOKEN), Ok(200)); assert_eq!( ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), Ok(1000) ); - }); } @@ -1628,7 +1862,7 @@ fn liquidity_minting_liquidity_can_be_resused() { fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { new_test_ext().execute_with(|| { System::set_block_number(1); - const LIQUIDITY_TOKEN : u32 = 5; + const LIQUIDITY_TOKEN: u32 = 5; let valuation_mock = MockValuationApi::get_liquidity_asset_context(); valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -1647,29 +1881,80 @@ fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { let amount = 10_000u128; ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_token_id, amount, 10u32.into()).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_token_id, 2 * amount, 10u32.into()).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + first_token_id, + amount, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + second_token_id, + 2 * amount, + 10u32.into(), + ) + .unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None).unwrap(); + ProofOfStake::activate_liquidity(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None) + .unwrap(); assert_err!( - TokensOf::::transfer(LIQUIDITY_TOKEN, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath), + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), orml_tokens::Error::::BalanceTooLow ); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, Some(ScheduleActivationKind::LiquidityMining)).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_token_id, + Some(ScheduleActivationKind::LiquidityMining), + ) + .unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, None).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_token_id, + None, + ) + .unwrap(); - ProofOfStake::deactivate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 200, first_token_id).unwrap(); + ProofOfStake::deactivate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 200, + first_token_id, + ) + .unwrap(); assert_err!( - TokensOf::::transfer(LIQUIDITY_TOKEN, &BOB, &CHARLIE, 101, ExistenceRequirement::AllowDeath), + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 101, + ExistenceRequirement::AllowDeath + ), orml_tokens::Error::::BalanceTooLow ); - assert_ok!( - TokensOf::::transfer(LIQUIDITY_TOKEN, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath) - ); + assert_ok!(TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + )); }); } @@ -1678,7 +1963,7 @@ fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() { new_test_ext().execute_with(|| { System::set_block_number(1); - const LIQUIDITY_TOKEN : u32 = 5; + const LIQUIDITY_TOKEN: u32 = 5; let valuation_mock = MockValuationApi::get_liquidity_asset_context(); valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -1697,35 +1982,84 @@ fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() let amount = 10_000u128; ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_token_id, amount, 10u32.into()).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_token_id, amount, 10u32.into()).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, None).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_token_id, Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id))).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + first_token_id, + amount, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + second_token_id, + amount, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_token_id, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + second_token_id, + Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id)), + ) + .unwrap(); assert_err!( TokensOf::::transfer(0, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath), orml_tokens::Error::::BalanceTooLow ); - ProofOfStake::deactivate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id).unwrap(); + ProofOfStake::deactivate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_token_id, + ) + .unwrap(); assert_err!( - TokensOf::::transfer(LIQUIDITY_TOKEN, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath), + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), orml_tokens::Error::::BalanceTooLow ); - ProofOfStake::deactivate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_token_id).unwrap(); + ProofOfStake::deactivate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + second_token_id, + ) + .unwrap(); - assert_ok!( - TokensOf::::transfer(LIQUIDITY_TOKEN, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath), - ); + assert_ok!(TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ),); }); } - #[test] #[serial] fn can_claim_schedule_rewards() { new_test_ext().execute_with(|| { System::set_block_number(1); - const LIQUIDITY_TOKEN : u32 = 5; + const LIQUIDITY_TOKEN: u32 = 5; let valuation_mock = MockValuationApi::get_liquidity_asset_context(); valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -1744,35 +2078,59 @@ fn can_claim_schedule_rewards() { let amount = 10_000u128; ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, first_token_id, amount, 10u32.into()).unwrap(); - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, second_token_id, amount, 10u32.into()).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_token_id, None).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_token_id, Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id))).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + first_token_id, + amount, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + second_token_id, + amount, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_token_id, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + second_token_id, + Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id)), + ) + .unwrap(); roll_to_session(1); - assert_eq!( - TokensOf::::free_balance(first_token_id, &BOB), - 0, - ); - assert_eq!( - TokensOf::::free_balance(second_token_id, &BOB), - 0, - ); + assert_eq!(TokensOf::::free_balance(first_token_id, &BOB), 0,); + assert_eq!(TokensOf::::free_balance(second_token_id, &BOB), 0,); ProofOfStake::claim_schedule_rewards_all( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, first_token_id, - ).unwrap(); + ) + .unwrap(); ProofOfStake::claim_schedule_rewards_all( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, second_token_id, - ).unwrap(); + ) + .unwrap(); - assert_eq!( TokensOf::::free_balance(first_token_id, &BOB), 1000,); - assert_eq!( TokensOf::::free_balance(second_token_id, &BOB), 1000,); + assert_eq!(TokensOf::::free_balance(first_token_id, &BOB), 1000,); + assert_eq!(TokensOf::::free_balance(second_token_id, &BOB), 1000,); assert_eq!( ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), @@ -1782,7 +2140,5 @@ fn can_claim_schedule_rewards() { ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_token_id), Ok(0) ); - }); } - From 9844c685cc7ce91bced46f259e197bb7dbb190ea Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 22 Sep 2023 11:59:43 +0200 Subject: [PATCH 008/125] annotate R/W in distribute_rewards --- pallets/proof-of-stake/src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 464f647800..4fa5528056 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -1165,7 +1165,11 @@ impl ProofOfStakeRewardsApi for Pallet { impl LiquidityMiningApi for Pallet { /// Distributs liquidity mining rewards between all the activated tokens based on their weight fn distribute_rewards(liquidity_mining_rewards: Balance) { + + // R:1 W:0 let schedules = RewardsSchedules::::get(); + + // R:1 W:0 let mut pools = ScheduleRewardsPerSingleLiquidity::::get(); let it = @@ -1180,8 +1184,8 @@ impl LiquidityMiningApi for Pallet { }); for (staked_token, token, amount) in it { - let activated_3rdparty_rewards = - TotalActivatedLiquidityForSchedules::::get(staked_token); + // R: T::RewardsSchedulesLimit - in most pesimistic case + let activated_3rdparty_rewards = TotalActivatedLiquidityForSchedules::::get(staked_token); if let Some(activated_amount) = activated_3rdparty_rewards.get(&token) { let activated_amount = U256::from(*activated_amount); @@ -1198,6 +1202,7 @@ impl LiquidityMiningApi for Pallet { } } + // single write ScheduleRewardsPerSingleLiquidity::::put(pools); let _ = PromotedPoolRewards::::try_mutate(|promoted_pools| -> DispatchResult { From 243ce161e26f65e3d57c9daea81ce81190039db4 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 22 Sep 2023 12:16:35 +0200 Subject: [PATCH 009/125] refactor storage entry type for TotalActivatedLiquidityForSchedules --- pallets/proof-of-stake/src/lib.rs | 56 ++++++++++++++----------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 4fa5528056..04dd8a03fd 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -333,10 +333,9 @@ pub mod pallet { StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (), ValueQuery>; /// Total amount of activated liquidity for each schedule - /// `BTreeMap` is used because of storage reads write optiomization in `distribute_rewards` #[pallet::storage] pub type TotalActivatedLiquidityForSchedules = - StorageMap<_, Twox64Concat, TokenId, BTreeMap, ValueQuery>; + StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, u128, ValueQuery>; /// Tracks how much liquidity user activated for particular (liq token, reward token) pair /// StorageNMap was used because it only require single read to know if user deactivated all @@ -894,13 +893,10 @@ impl Pallet { }, )?; - TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, |activations| { - activations - .entry(liquidity_assets_reward) - // NOTE: handle overflow - .and_modify(|val| *val += liquidity_assets_added) - .or_insert(liquidity_assets_added); - }); + TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |amount| -> DispatchResult { + *amount = amount.checked_add(liquidity_assets_added).ok_or(Error::::MathOverflow)?; + Ok(()) + })?; Ok(()) } @@ -971,11 +967,10 @@ impl Pallet { rewards_info, ); - TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, |activations| { - activations - .entry(reward_token) - .and_modify(|val| *val -= liquidity_assets_burned); - }); + TotalActivatedLiquidityForSchedules::::try_mutate(liquidity_asset_id, reward_token, |amount| -> DispatchResult{ + *amount = amount.checked_sub(liquidity_assets_burned).ok_or(Error::::MathOverflow)?; + Ok(()) + })?; ActivatedLiquidityForSchedules::::try_mutate_exists( (user.clone(), liquidity_asset_id, reward_token), @@ -1183,26 +1178,25 @@ impl LiquidityMiningApi for Pallet { } }); - for (staked_token, token, amount) in it { + for (staked_token, rewarded_token, amount) in it { // R: T::RewardsSchedulesLimit - in most pesimistic case - let activated_3rdparty_rewards = TotalActivatedLiquidityForSchedules::::get(staked_token); - - if let Some(activated_amount) = activated_3rdparty_rewards.get(&token) { - let activated_amount = U256::from(*activated_amount); - // NOTE: fix - let rewards = pools.get(&(*staked_token, *token)).cloned().unwrap_or_default(); - let rewards_for_liquidity = U256::from(*amount) - .checked_mul(U256::from(u128::MAX)) - .and_then(|x| x.checked_div(activated_amount)) - .and_then(|x| x.checked_add(rewards)); - - if let Some(val) = rewards_for_liquidity { - pools.insert((*staked_token, *token), val); - } - } + match TotalActivatedLiquidityForSchedules::::get(staked_token, rewarded_token) { + 0 => {}, + activated_amount => { + let activated_amount = U256::from(activated_amount); + let rewards = pools.get(&(*staked_token, *rewarded_token)).cloned().unwrap_or_default(); + let rewards_for_liquidity = U256::from(*amount) + .checked_mul(U256::from(u128::MAX)) + .and_then(|x| x.checked_div(activated_amount)) + .and_then(|x| x.checked_add(rewards)); + + if let Some(val) = rewards_for_liquidity { + pools.insert((*staked_token, *rewarded_token), val); + } + }, + } } - // single write ScheduleRewardsPerSingleLiquidity::::put(pools); let _ = PromotedPoolRewards::::try_mutate(|promoted_pools| -> DispatchResult { From 398a0baa7094936e317a267d50d0693a6afbc2b3 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 25 Sep 2023 07:43:10 +0200 Subject: [PATCH 010/125] replace proceduram macros with generic fn --- pallets/proof-of-stake/src/benchmarking.rs | 65 +++++++---- pallets/proof-of-stake/src/lib.rs | 86 +++++++++------ pallets/proof-of-stake/src/tests.rs | 120 ++++++++++++--------- 3 files changed, 166 insertions(+), 105 deletions(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 4066363d90..d7bc7f99da 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -12,38 +12,42 @@ use crate::Pallet as PoS; const MILION: u128 = 1_000__000_000__000_000; -#[macro_export] -macro_rules! init { - () => { - frame_system::Pallet::::set_block_number(1_u32.into()); - pallet_issuance::Pallet::::initialize(); - }; +fn init() where + T: frame_system::Config, + T: pallet_issuance::Config, +{ + frame_system::Pallet::::set_block_number(1_u32.into()); + pallet_issuance::Pallet::::initialize(); } -#[macro_export] -macro_rules! forward_to_next_session { - () => { + + +fn forward_to_next_session() where + T: frame_system::Config, + T: pallet_issuance::Config, + T: Config +{ let current_block: u32 = frame_system::Pallet::::block_number().saturated_into::(); let blocks_per_session: u32 = PoS::::rewards_period(); let target_block_nr: u32; let target_session_nr: u32; - if (current_block == 0_u32 || current_block == 1_u32) { + if current_block == 0_u32 || current_block == 1_u32 { target_session_nr = 1_u32; target_block_nr = blocks_per_session; } else { // to fail on user trying to manage block nr on its own assert!(current_block % blocks_per_session == 0); target_session_nr = (current_block / blocks_per_session) + 1_u32; - target_block_nr = (target_session_nr * blocks_per_session); + target_block_nr = target_session_nr * blocks_per_session; } frame_system::Pallet::::set_block_number(target_block_nr.into()); pallet_issuance::Pallet::::compute_issuance(target_session_nr); - }; } + benchmarks! { claim_rewards_all{ // 1. create @@ -52,7 +56,7 @@ benchmarks! { // 4. wait some // 5. claim all - init!(); + init::(); let caller: ::AccountId = whitelisted_caller(); let initial_amount:mangata_types::Balance = 1000000000000000000000; let expected_native_asset_id : TokenId = ::NativeCurrencyId::get().into(); @@ -72,12 +76,12 @@ benchmarks! { let half_of_minted_liquidity = total_minted_liquidity.into() / 2_u128; let quater_of_minted_liquidity = total_minted_liquidity.into() / 4_u128; - forward_to_next_session!(); + forward_to_next_session::(); PoS::::activate_liquidity(RawOrigin::Signed(caller.clone()).into(), liquidity_asset_id.into(), quater_of_minted_liquidity, None).unwrap(); - forward_to_next_session!(); - forward_to_next_session!(); + forward_to_next_session::(); + forward_to_next_session::(); assert!(PoS::::calculate_rewards_amount(caller.clone(), liquidity_asset_id).unwrap() > 0); @@ -113,7 +117,7 @@ benchmarks! { // 4 wait some time // 5 mint some - init!(); + init::(); let caller: ::AccountId = whitelisted_caller(); let initial_amount:mangata_types::Balance = 1000000000000000000000; let expected_native_asset_id : TokenId = ::NativeCurrencyId::get().into(); @@ -140,7 +144,7 @@ benchmarks! { quater_of_minted_liquidity ); - forward_to_next_session!(); + forward_to_next_session::(); }: activate_liquidity(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), quater_of_minted_liquidity, None) verify { @@ -158,7 +162,7 @@ benchmarks! { // 3 mint some tokens // deactivate some tokens (all or some - to be checked) - init!(); + init::(); let caller: ::AccountId = whitelisted_caller(); let initial_amount:mangata_types::Balance = 1000000000000000000000; let expected_native_asset_id : TokenId = ::NativeCurrencyId::get().into(); @@ -184,7 +188,7 @@ benchmarks! { half_of_minted_liquidity ); - forward_to_next_session!(); + forward_to_next_session::(); }: deactivate_liquidity(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), quater_of_minted_liquidity.into()) verify { @@ -194,5 +198,26 @@ benchmarks! { ); } + // reward_pool{ + // // 1 crate pool + // // 2 promote pool + // // 3 mint some tokens + // // deactivate some tokens (all or some - to be checked) + // + // init::(); + // let caller: ::AccountId = whitelisted_caller(); + // let initial_amount:mangata_types::Balance = 1000000000000000000000; + // let expected_native_asset_id : TokenId = ::NativeCurrencyId::get().into(); + // let native_asset_id : TokenId= ::Currency::create(&caller, initial_amount.into()).unwrap().into(); + // let non_native_asset_id : TokenId= ::Currency::create(&caller, initial_amount.into()).unwrap().into(); + // let reward_asset_id : TokenId= ::Currency::create(&caller, ((40000000000000000000_u128/2_u128) + (60000000000000000000_u128/2_u128)).into()).unwrap().into(); + // + // forward_to_next_session::(); + // + // }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,non_native_asset_id), reward_asset_id.into(), 10000, 10u32.into()) + // verify { + // // + // } + impl_benchmark_test_suite!(PoS, crate::mock::new_test_ext(), crate::mock::Test) } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 04dd8a03fd..64b0afe235 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -177,7 +177,7 @@ pub mod pallet { impl Hooks for Pallet {} #[cfg(feature = "runtime-benchmarks")] - pub trait PoSBenchmarkingConrfig: pallet_issuance::Config {} + pub trait PoSBenchmarkingConfig: pallet_issuance::Config {} #[cfg(feature = "runtime-benchmarks")] impl PoSBenchmarkingConfig for T {} @@ -241,6 +241,8 @@ pub mod pallet { TooManySchedules, /// Too little rewards per session TooLittleRewardsPerSession, + /// Reward token not paired with native token + RewardTokenNotPairdWithNativeToken, } #[pallet::event] @@ -462,8 +464,9 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - let rewarded_token = ::ValuationApi::get_liquidity_asset(pool.0, pool.1) - .map_err(|_| Error::::PoolDoesNotExist)?; + let liquidity_token_id = + ::ValuationApi::get_liquidity_asset(pool.0, pool.1) + .map_err(|_| Error::::PoolDoesNotExist)?; let current_session = Self::session_index(); ensure!( @@ -477,13 +480,18 @@ pub mod pallet { .and_then(|v| amount.checked_div(v.into())) .ok_or(Error::::MathOverflow)?; - // TODO: use valuation instead amount directly ensure!( - amount_per_session >= T::MinRewardsPerSession::get(), + pool.0 == Self::native_token_id() || pool.1 == Self::native_token_id(), + Error::::RewardTokenNotPairdWithNativeToken + ); + + ensure!( + ::ValuationApi::valuate_liquidity_token(liquidity_token_id, amount) >= + T::MinRewardsPerSession::get(), Error::::TooLittleRewardsPerSession ); - RewardTokensPerPool::::insert(rewarded_token, token_id, ()); + RewardTokensPerPool::::insert(liquidity_token_id, token_id, ()); T::Currency::transfer( token_id.into(), @@ -506,7 +514,7 @@ pub mod pallet { } map.try_insert( - (schedule_end, rewarded_token, token_id, amount_per_session, schedule_id), + (schedule_end, liquidity_token_id, token_id, amount_per_session, schedule_id), (), ) }) @@ -893,10 +901,15 @@ impl Pallet { }, )?; - TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |amount| -> DispatchResult { - *amount = amount.checked_add(liquidity_assets_added).ok_or(Error::::MathOverflow)?; - Ok(()) - })?; + TotalActivatedLiquidityForSchedules::::mutate( + liquidity_asset_id, + liquidity_assets_reward, + |amount| -> DispatchResult { + *amount = + amount.checked_add(liquidity_assets_added).ok_or(Error::::MathOverflow)?; + Ok(()) + }, + )?; Ok(()) } @@ -967,10 +980,15 @@ impl Pallet { rewards_info, ); - TotalActivatedLiquidityForSchedules::::try_mutate(liquidity_asset_id, reward_token, |amount| -> DispatchResult{ - *amount = amount.checked_sub(liquidity_assets_burned).ok_or(Error::::MathOverflow)?; - Ok(()) - })?; + TotalActivatedLiquidityForSchedules::::try_mutate( + liquidity_asset_id, + reward_token, + |amount| -> DispatchResult { + *amount = + amount.checked_sub(liquidity_assets_burned).ok_or(Error::::MathOverflow)?; + Ok(()) + }, + )?; ActivatedLiquidityForSchedules::::try_mutate_exists( (user.clone(), liquidity_asset_id, reward_token), @@ -1160,11 +1178,10 @@ impl ProofOfStakeRewardsApi for Pallet { impl LiquidityMiningApi for Pallet { /// Distributs liquidity mining rewards between all the activated tokens based on their weight fn distribute_rewards(liquidity_mining_rewards: Balance) { - - // R:1 W:0 + // R:1 W:0 let schedules = RewardsSchedules::::get(); - // R:1 W:0 + // R:1 W:0 let mut pools = ScheduleRewardsPerSingleLiquidity::::get(); let it = @@ -1179,22 +1196,23 @@ impl LiquidityMiningApi for Pallet { }); for (staked_token, rewarded_token, amount) in it { - // R: T::RewardsSchedulesLimit - in most pesimistic case - match TotalActivatedLiquidityForSchedules::::get(staked_token, rewarded_token) { - 0 => {}, - activated_amount => { - let activated_amount = U256::from(activated_amount); - let rewards = pools.get(&(*staked_token, *rewarded_token)).cloned().unwrap_or_default(); - let rewards_for_liquidity = U256::from(*amount) - .checked_mul(U256::from(u128::MAX)) - .and_then(|x| x.checked_div(activated_amount)) - .and_then(|x| x.checked_add(rewards)); - - if let Some(val) = rewards_for_liquidity { - pools.insert((*staked_token, *rewarded_token), val); - } - }, - } + // R: T::RewardsSchedulesLimit - in most pesimistic case + match TotalActivatedLiquidityForSchedules::::get(staked_token, rewarded_token) { + 0 => {}, + activated_amount => { + let activated_amount = U256::from(activated_amount); + let rewards = + pools.get(&(*staked_token, *rewarded_token)).cloned().unwrap_or_default(); + let rewards_for_liquidity = U256::from(*amount) + .checked_mul(U256::from(u128::MAX)) + .and_then(|x| x.checked_div(activated_amount)) + .and_then(|x| x.checked_add(rewards)); + + if let Some(val) = rewards_for_liquidity { + pools.insert((*staked_token, *rewarded_token), val); + } + }, + } } ScheduleRewardsPerSingleLiquidity::::put(pools); diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 8ba8543e55..8fcd8aec11 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1110,8 +1110,10 @@ const EVE: u128 = 5; #[serial] fn user_can_provide_3rdparty_rewards() { new_test_ext().execute_with(|| { - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(10u32)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); System::set_block_number(1); let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); @@ -1144,8 +1146,10 @@ fn user_can_provide_3rdparty_rewards() { fn cant_schedule_rewards_in_past() { new_test_ext().execute_with(|| { System::set_block_number(1); - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(10u32)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); @@ -1189,10 +1193,12 @@ fn cant_schedule_rewards_in_past() { #[serial] fn cannot_reward_unexisting_pool() { new_test_ext().execute_with(|| { - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock .expect() .return_const(Err(Error::::PoolDoesNotExist.into())); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); @@ -1216,8 +1222,10 @@ fn cannot_reward_unexisting_pool() { fn rewards_are_stored_in_pallet_account() { new_test_ext().execute_with(|| { System::set_block_number(1); - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(10u32)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); @@ -1248,8 +1256,10 @@ fn rewards_schedule_is_stored() { new_test_ext().execute_with(|| { System::set_block_number(1); let liquidity_token_id = 10u32; - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(liquidity_token_id)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(liquidity_token_id)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); @@ -1275,8 +1285,10 @@ fn rewards_schedule_is_stored() { fn number_of_active_schedules_is_limited() { new_test_ext().execute_with(|| { System::set_block_number(1); - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(10u32)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); @@ -1322,8 +1334,10 @@ fn number_of_active_schedules_is_limited() { fn duplicated_schedules_works() { new_test_ext().execute_with(|| { System::set_block_number(1); - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(10u32)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); @@ -1355,8 +1369,10 @@ fn duplicated_schedules_works() { fn reject_schedule_with_too_little_rewards_per_session() { new_test_ext().execute_with(|| { System::set_block_number(1); - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(10u32)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(1u128); let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); @@ -1364,26 +1380,10 @@ fn reject_schedule_with_too_little_rewards_per_session() { roll_to_session(4); - let min_rewards = <::MinRewardsPerSession as sp_core::Get>::get(); - assert_err!( - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - token_id, - min_rewards - 1, - 5u32.into() - ), + ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, 1, 5u32.into()), Error::::TooLittleRewardsPerSession ); - - assert_ok!(ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - token_id, - min_rewards, - 5u32.into() - )); }); } @@ -1393,8 +1393,10 @@ fn user_can_claim_3rdparty_rewards() { new_test_ext().execute_with(|| { System::set_block_number(1); const LIQUIDITY_TOKEN: u32 = 5; - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); @@ -1471,8 +1473,10 @@ fn overlapping_3rdparty_rewards_works() { new_test_ext().execute_with(|| { System::set_block_number(1); const LIQUIDITY_TOKEN: u32 = 5; - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); @@ -1554,8 +1558,10 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { new_test_ext().execute_with(|| { System::set_block_number(1); const LIQUIDITY_TOKEN: u32 = 5; - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); @@ -1637,8 +1643,10 @@ fn deactivate_3rdparty_rewards() { new_test_ext().execute_with(|| { System::set_block_number(1); const LIQUIDITY_TOKEN: u32 = 5; - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); @@ -1721,8 +1729,10 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { new_test_ext().execute_with(|| { System::set_block_number(1); const LIQUIDITY_TOKEN: u32 = 5; - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); @@ -1801,8 +1811,10 @@ fn liquidity_minting_liquidity_can_be_resused() { new_test_ext().execute_with(|| { System::set_block_number(1); const LIQUIDITY_TOKEN: u32 = 5; - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); @@ -1863,8 +1875,10 @@ fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { new_test_ext().execute_with(|| { System::set_block_number(1); const LIQUIDITY_TOKEN: u32 = 5; - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); @@ -1964,8 +1978,10 @@ fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() new_test_ext().execute_with(|| { System::set_block_number(1); const LIQUIDITY_TOKEN: u32 = 5; - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); @@ -2060,8 +2076,10 @@ fn can_claim_schedule_rewards() { new_test_ext().execute_with(|| { System::set_block_number(1); const LIQUIDITY_TOKEN: u32 = 5; - let valuation_mock = MockValuationApi::get_liquidity_asset_context(); - valuation_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); From 50cf2228a2ad07c3e667a85e0fc11427e7481075 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 25 Sep 2023 09:49:25 +0200 Subject: [PATCH 011/125] workaround for XYK capabilities in benchmark code --- Cargo.lock | 1 + pallets/proof-of-stake/Cargo.toml | 1 + pallets/proof-of-stake/src/benchmarking.rs | 40 ++++++------ pallets/proof-of-stake/src/lib.rs | 52 ++++++++++++++-- pallets/proof-of-stake/src/mock.rs | 71 +++++++++++++++++++--- 5 files changed, 130 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 18ae550c0f..30825a1e55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6792,6 +6792,7 @@ dependencies = [ "pallet-bootstrap", "pallet-issuance", "pallet-vesting-mangata", + "pallet-xyk", "parity-scale-codec", "rustc-hex", "scale-info", diff --git a/pallets/proof-of-stake/Cargo.toml b/pallets/proof-of-stake/Cargo.toml index 077522c1fd..c222722179 100644 --- a/pallets/proof-of-stake/Cargo.toml +++ b/pallets/proof-of-stake/Cargo.toml @@ -42,6 +42,7 @@ env_logger = "0.9.0" serial_test = { version = "0.6.0", default-features = false } test-case = "2.0.2" mockall = "0.11.0" +pallet-xyk = { path = "../xyk" } [features] default = ['std'] diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index d7bc7f99da..f5ab3b6bf9 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -198,26 +198,26 @@ benchmarks! { ); } - // reward_pool{ - // // 1 crate pool - // // 2 promote pool - // // 3 mint some tokens - // // deactivate some tokens (all or some - to be checked) - // - // init::(); - // let caller: ::AccountId = whitelisted_caller(); - // let initial_amount:mangata_types::Balance = 1000000000000000000000; - // let expected_native_asset_id : TokenId = ::NativeCurrencyId::get().into(); - // let native_asset_id : TokenId= ::Currency::create(&caller, initial_amount.into()).unwrap().into(); - // let non_native_asset_id : TokenId= ::Currency::create(&caller, initial_amount.into()).unwrap().into(); - // let reward_asset_id : TokenId= ::Currency::create(&caller, ((40000000000000000000_u128/2_u128) + (60000000000000000000_u128/2_u128)).into()).unwrap().into(); - // - // forward_to_next_session::(); - // - // }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,non_native_asset_id), reward_asset_id.into(), 10000, 10u32.into()) - // verify { - // // - // } + reward_pool{ + // 1 crate pool + // 2 promote pool + // 3 mint some tokens + // deactivate some tokens (all or some - to be checked) + + init::(); + let caller: ::AccountId = whitelisted_caller(); + let initial_amount:mangata_types::Balance = 1000000000000000000000; + let expected_native_asset_id : TokenId = ::NativeCurrencyId::get().into(); + let native_asset_id : TokenId= ::Currency::create(&caller, initial_amount.into()).unwrap().into(); + let non_native_asset_id : TokenId= ::Currency::create(&caller, initial_amount.into()).unwrap().into(); + let reward_asset_id : TokenId= ::Currency::create(&caller, ((40000000000000000000_u128/2_u128) + (60000000000000000000_u128/2_u128)).into()).unwrap().into(); + + forward_to_next_session::(); + + }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,non_native_asset_id), reward_asset_id.into(), 10000, 10u32.into()) + verify { + // + } impl_benchmark_test_suite!(PoS, crate::mock::new_test_ext(), crate::mock::Test) } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 64b0afe235..be949ab226 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -93,6 +93,7 @@ use frame_support::pallet_prelude::*; use frame_benchmarking::Zero; +use frame_support::traits::Nothing; use frame_support::{ dispatch::{DispatchError, DispatchResult}, ensure, @@ -110,7 +111,7 @@ use frame_support::{ }; use frame_system::pallet_prelude::*; use mangata_support::traits::{ - ActivationReservesProviderTrait, LiquidityMiningApi, ProofOfStakeRewardsApi, + ActivationReservesProviderTrait, LiquidityMiningApi, ProofOfStakeRewardsApi, XykFunctionsTrait }; use mangata_types::{multipurpose_liquidity::ActivateKind, Balance, TokenId}; use orml_tokens::{MultiTokenCurrencyExtended, MultiTokenReservableCurrency}; @@ -183,10 +184,45 @@ pub mod pallet { #[cfg(not(feature = "runtime-benchmarks"))] pub trait PoSBenchmarkingConfig {} - #[cfg(not(feature = "runtime-benchmarks"))] impl PoSBenchmarkingConfig for T {} + + #[cfg(not(feature = "runtime-benchmarks"))] + pub trait ValutationApiTrait: Valuate< + Balance = mangata_types::Balance, + CurrencyId = mangata_types::TokenId, + >{} + + #[cfg(feature = "runtime-benchmarks")] + pub trait ValutationApiTrait: Valuate< + Balance = mangata_types::Balance, + CurrencyId = mangata_types::TokenId, + > + XykFunctionsTrait{} + + + #[cfg(not(feature = "runtime-benchmarks"))] + impl ValutationApiTrait for T where + C: Config, + T: Valuate< + Balance = mangata_types::Balance, + CurrencyId = mangata_types::TokenId, + >, + { + } + + #[cfg(feature = "runtime-benchmarks")] + impl ValutationApiTrait for T where + C: Config, + T: Valuate< + Balance = mangata_types::Balance, + CurrencyId = mangata_types::TokenId, + >, + T : XykFunctionsTrait + { + } + + #[pallet::config] pub trait Config: frame_system::Config + PoSBenchmarkingConfig { type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -208,10 +244,14 @@ pub mod pallet { /// The maximum number of reward tokens per pool type MaxRewardTokensPerPool: Get; type WeightInfo: WeightInfo; - type ValuationApi: Valuate< - Balance = mangata_types::Balance, - CurrencyId = mangata_types::TokenId, - >; + type ValuationApi: ValutationApiTrait; + + // type ValuationApi: Valuate< + // Balance = mangata_types::Balance, + // CurrencyId = mangata_types::TokenId, + // >; + // #[cfg(feature = "runtime-benchmarks")] + // type Xyk: XykFunctionsTrait; } #[pallet::error] diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 32dadbda5a..d3080e65db 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -1,9 +1,11 @@ // Copyright (C) 2020 Mangata team use super::*; +use mangata_support::traits::GetMaintenanceStatusTrait; use sp_core::H256; +use pallet_xyk::AssetMetadataMutationTrait; use sp_runtime::{ testing::Header, traits::{AccountIdConversion, BlakeTwo256, IdentityLookup}, @@ -43,6 +45,7 @@ construct_runtime!( ProofOfStake: pos::{Pallet, Call, Storage, Event}, Vesting: pallet_vesting_mangata::{Pallet, Call, Storage, Event}, Issuance: pallet_issuance::{Pallet, Event, Storage}, + Xyk: pallet_xyk::{Pallet, Event, Storage}, } ); @@ -193,15 +196,6 @@ lazy_static::lazy_static! { }; } -pub struct MockMaintenanceStatusProvider; - -lazy_static::lazy_static! { - static ref MAINTENANCE_STATUS: Mutex = { - let m: bool = false; - Mutex::new(m) - }; -} - mockall::mock! { pub ValuationApi {} @@ -235,12 +229,55 @@ mockall::mock! { first_asset_id: TokenId, second_asset_id: TokenId, ) -> Result<(Balance, Balance), DispatchError>; + } +} +pub struct AssetMetadataMutation; +impl AssetMetadataMutationTrait for AssetMetadataMutation { + fn set_asset_info( + _asset: TokenId, + _name: Vec, + _symbol: Vec, + _decimals: u32, + ) -> DispatchResult { + Ok(()) + } +} +pub struct MockMaintenanceStatusProvider; +impl GetMaintenanceStatusTrait for MockMaintenanceStatusProvider { + fn is_maintenance() -> bool { + false + } + fn is_upgradable() -> bool { + true } } + +impl pallet_xyk::XykBenchmarkingConfig for Test {} + +impl pallet_xyk::Config for Test { + type RuntimeEvent = RuntimeEvent; + type MaintenanceStatusProvider = MockMaintenanceStatusProvider; + type ActivationReservesProvider = TokensActivationPassthrough; + type Currency = MultiTokenCurrencyAdapter; + type NativeCurrencyId = NativeCurrencyId; + type TreasuryPalletId = TreasuryPalletId; + type BnbTreasurySubAccDerive = BnbTreasurySubAccDerive; + type LiquidityMiningRewards = ProofOfStake; + type PoolFeePercentage = ConstU128<20>; + type TreasuryFeePercentage = ConstU128<5>; + type BuyAndBurnFeePercentage = ConstU128<5>; + type WeightInfo = (); + type DisallowedPools = (); + type DisabledTokens = Nothing; + type VestingProvider = Vesting; + type AssetMetadataMutation = AssetMetadataMutation; +} + +#[cfg(not(feature = "runtime-benchmarks"))] impl pos::Config for Test { type RuntimeEvent = RuntimeEvent; type ActivationReservesProvider = TokensActivationPassthrough; @@ -255,6 +292,22 @@ impl pos::Config for Test { type ValuationApi = MockValuationApi; } + +#[cfg(feature = "runtime-benchmarks")] +impl pos::Config for Test { + type RuntimeEvent = RuntimeEvent; + type ActivationReservesProvider = TokensActivationPassthrough; + type NativeCurrencyId = NativeCurrencyId; + type Currency = MultiTokenCurrencyAdapter; + type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; + type RewardsDistributionPeriod = ConstU32<10>; + type RewardsSchedulesLimit = ConstU32<10>; + type MinRewardsPerSession = ConstU128<10>; + type MaxRewardTokensPerPool = ConstU32<5>; + type WeightInfo = (); + type ValuationApi = Xyk; +} + pub struct TokensActivationPassthrough(PhantomData); impl ActivationReservesProviderTrait for TokensActivationPassthrough From 1cc2256a9f3a7ec8220695b515a9d2ec571dbfb8 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 25 Sep 2023 12:35:21 +0200 Subject: [PATCH 012/125] benchmark for PoS::reward_pool --- pallets/proof-of-stake/src/benchmarking.rs | 119 +++++++++++++++------ pallets/proof-of-stake/src/lib.rs | 42 ++++---- pallets/proof-of-stake/src/mock.rs | 2 - 3 files changed, 104 insertions(+), 59 deletions(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index f5ab3b6bf9..8435259eed 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -12,7 +12,8 @@ use crate::Pallet as PoS; const MILION: u128 = 1_000__000_000__000_000; -fn init() where +fn init() +where T: frame_system::Config, T: pallet_issuance::Config, { @@ -20,34 +21,36 @@ fn init() where pallet_issuance::Pallet::::initialize(); } +type TokensOf = ::Currency; +type AccountIdOf = ::AccountId; +type XykOf = ::ValuationApi; - -fn forward_to_next_session() where +fn forward_to_next_session() +where T: frame_system::Config, T: pallet_issuance::Config, - T: Config + T: Config, { - let current_block: u32 = frame_system::Pallet::::block_number().saturated_into::(); - - let blocks_per_session: u32 = PoS::::rewards_period(); - let target_block_nr: u32; - let target_session_nr: u32; - - if current_block == 0_u32 || current_block == 1_u32 { - target_session_nr = 1_u32; - target_block_nr = blocks_per_session; - } else { - // to fail on user trying to manage block nr on its own - assert!(current_block % blocks_per_session == 0); - target_session_nr = (current_block / blocks_per_session) + 1_u32; - target_block_nr = target_session_nr * blocks_per_session; - } + let current_block: u32 = frame_system::Pallet::::block_number().saturated_into::(); + + let blocks_per_session: u32 = PoS::::rewards_period(); + let target_block_nr: u32; + let target_session_nr: u32; + + if current_block == 0_u32 || current_block == 1_u32 { + target_session_nr = 1_u32; + target_block_nr = blocks_per_session; + } else { + // to fail on user trying to manage block nr on its own + assert!(current_block % blocks_per_session == 0); + target_session_nr = (current_block / blocks_per_session) + 1_u32; + target_block_nr = target_session_nr * blocks_per_session; + } - frame_system::Pallet::::set_block_number(target_block_nr.into()); - pallet_issuance::Pallet::::compute_issuance(target_session_nr); + frame_system::Pallet::::set_block_number(target_block_nr.into()); + pallet_issuance::Pallet::::compute_issuance(target_session_nr); } - benchmarks! { claim_rewards_all{ // 1. create @@ -199,25 +202,75 @@ benchmarks! { } reward_pool{ - // 1 crate pool - // 2 promote pool - // 3 mint some tokens - // deactivate some tokens (all or some - to be checked) + // 1 crate as many schedules as possible + // 2 wait for one of the schedules to expire + // 3 create new schedule that will replace the expired one init::(); + + let schedules_limit = ::RewardsSchedulesLimit::get(); let caller: ::AccountId = whitelisted_caller(); - let initial_amount:mangata_types::Balance = 1000000000000000000000; - let expected_native_asset_id : TokenId = ::NativeCurrencyId::get().into(); - let native_asset_id : TokenId= ::Currency::create(&caller, initial_amount.into()).unwrap().into(); - let non_native_asset_id : TokenId= ::Currency::create(&caller, initial_amount.into()).unwrap().into(); - let reward_asset_id : TokenId= ::Currency::create(&caller, ((40000000000000000000_u128/2_u128) + (60000000000000000000_u128/2_u128)).into()).unwrap().into(); + let native_asset_id = ::NativeCurrencyId::get(); + loop { + let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + if token_id > native_asset_id { + break; + } + } + + let native_asset_amount: u128 = MILION * Into::::into(schedules_limit); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + + for _ in 0 .. schedules_limit - 1 { + let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), token_id.into(), MILION.into()).unwrap(); + let reward_token = token_id + 1; + + PoS::::reward_pool( + RawOrigin::Signed(caller.clone().into()).into(), + (native_asset_id, token_id), + reward_token.into(), + MILION, + 10u32.into(), + ).unwrap(); + } + + let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), token_id.into(), MILION.into()).unwrap(); + let reward_token = token_id + 1; + PoS::::reward_pool( + RawOrigin::Signed(caller.clone().into()).into(), + (native_asset_id, token_id), + reward_token.into(), + MILION, + 2u32.into(), + ).unwrap(); + + forward_to_next_session::(); + forward_to_next_session::(); forward_to_next_session::(); - }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,non_native_asset_id), reward_asset_id.into(), 10000, 10u32.into()) + let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), token_id.into(), MILION.into()).unwrap(); + let reward_token = token_id + 1; + + assert_eq!( + RewardsSchedules::::get().len() as u32, + schedules_limit + ); + + }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,token_id), reward_token.into(), MILION, 10u32.into()) verify { - // + + assert_eq!( + RewardsSchedules::::get().len() as u32, + schedules_limit + ); + } + + impl_benchmark_test_suite!(PoS, crate::mock::new_test_ext(), crate::mock::Test) } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index be949ab226..422f2948b0 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -93,11 +93,11 @@ use frame_support::pallet_prelude::*; use frame_benchmarking::Zero; -use frame_support::traits::Nothing; use frame_support::{ dispatch::{DispatchError, DispatchResult}, ensure, storage::bounded_btree_map::BoundedBTreeMap, + traits::Nothing, }; use frame_system::ensure_signed; use mangata_support::traits::Valuate; @@ -111,7 +111,7 @@ use frame_support::{ }; use frame_system::pallet_prelude::*; use mangata_support::traits::{ - ActivationReservesProviderTrait, LiquidityMiningApi, ProofOfStakeRewardsApi, XykFunctionsTrait + ActivationReservesProviderTrait, LiquidityMiningApi, ProofOfStakeRewardsApi, XykFunctionsTrait, }; use mangata_types::{multipurpose_liquidity::ActivateKind, Balance, TokenId}; use orml_tokens::{MultiTokenCurrencyExtended, MultiTokenReservableCurrency}; @@ -187,42 +187,36 @@ pub mod pallet { #[cfg(not(feature = "runtime-benchmarks"))] impl PoSBenchmarkingConfig for T {} - #[cfg(not(feature = "runtime-benchmarks"))] - pub trait ValutationApiTrait: Valuate< - Balance = mangata_types::Balance, - CurrencyId = mangata_types::TokenId, - >{} + pub trait ValutationApiTrait: + Valuate + { + } #[cfg(feature = "runtime-benchmarks")] - pub trait ValutationApiTrait: Valuate< - Balance = mangata_types::Balance, - CurrencyId = mangata_types::TokenId, - > + XykFunctionsTrait{} - + pub trait ValutationApiTrait: + Valuate + + XykFunctionsTrait + { + } #[cfg(not(feature = "runtime-benchmarks"))] - impl ValutationApiTrait for T where + impl ValutationApiTrait for T + where C: Config, - T: Valuate< - Balance = mangata_types::Balance, - CurrencyId = mangata_types::TokenId, - >, + T: Valuate, { } #[cfg(feature = "runtime-benchmarks")] - impl ValutationApiTrait for T where + impl ValutationApiTrait for T + where C: Config, - T: Valuate< - Balance = mangata_types::Balance, - CurrencyId = mangata_types::TokenId, - >, - T : XykFunctionsTrait + T: Valuate, + T: XykFunctionsTrait, { } - #[pallet::config] pub trait Config: frame_system::Config + PoSBenchmarkingConfig { type RuntimeEvent: From> + IsType<::RuntimeEvent>; diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index d3080e65db..1209e57255 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -255,7 +255,6 @@ impl GetMaintenanceStatusTrait for MockMaintenanceStatusProvider { } } - impl pallet_xyk::XykBenchmarkingConfig for Test {} impl pallet_xyk::Config for Test { @@ -292,7 +291,6 @@ impl pos::Config for Test { type ValuationApi = MockValuationApi; } - #[cfg(feature = "runtime-benchmarks")] impl pos::Config for Test { type RuntimeEvent = RuntimeEvent; From 74a6ddd7d286b290ac92ed0f55017746f90598be Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 25 Sep 2023 13:51:04 +0200 Subject: [PATCH 013/125] benchmark for PoS::activate_liquidity_for_rewards_schedule --- pallets/proof-of-stake/src/benchmarking.rs | 48 ++++++++++++++++++++++ pallets/proof-of-stake/src/lib.rs | 8 +++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 8435259eed..b879e4c074 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -270,6 +270,54 @@ benchmarks! { } + activate_liquidity_for_rewards_schedule{ + // 1 create pool that can be rewarded + // 2 create token that is githeven as reward + // 3 create new schedule that will replace the expired one + + init::(); + + let schedules_limit = ::RewardsSchedulesLimit::get(); + let caller: ::AccountId = whitelisted_caller(); + let native_asset_id = ::NativeCurrencyId::get(); + + loop { + let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + if token_id > native_asset_id { + break; + } + } + + let native_asset_amount: u128 = MILION * Into::::into(schedules_limit); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + + let first_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), first_token_id.into(), MILION.into()).unwrap(); + let liquidity_asset_id = first_token_id + 1; + + let second_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), second_token_id.into(), MILION.into()).unwrap(); + let reward_token_id = second_token_id + 1; + + let rewards_amount = 20_000u128; + + PoS::::reward_pool( + RawOrigin::Signed(caller.clone().into()).into(), + (native_asset_id, first_token_id), + reward_token_id.into(), + rewards_amount, + 2u32.into(), + ).unwrap(); + + }: activate_liquidity_for_rewards_schedule(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id, None) + verify { + forward_to_next_session::(); + assert_eq!( + PoS::::calculate_rewards_amount_3rdparty(caller, liquidity_asset_id, reward_token_id).unwrap(), + rewards_amount/2 + ) + } + impl_benchmark_test_suite!(PoS, crate::mock::new_test_ext(), crate::mock::Test) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 422f2948b0..f9d424b652 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -390,7 +390,7 @@ pub mod pallet { >; /// Tracks how much of the liquidity was activated for schedule rewards and not yet - /// liquidity mining rewards. That information is essential to properly handle tocken unlcocks + /// liquidity mining rewards. That information is essential to properly handle token unlcocks /// when liquidity is deactivated. #[pallet::storage] pub type ActivatedLockedLiquidityForSchedules = @@ -695,6 +695,7 @@ impl Pallet { Self::ensure_is_promoted_pool(liquidity_asset_id)?; match use_balance_from { + // 1R 1W ScheduleActivationKind::ActivateKind(ref use_balance_from) => { ensure!( ::ActivationReservesProvider::can_activate( @@ -711,6 +712,7 @@ impl Pallet { |val| *val += amount, ); }, + // 2R ScheduleActivationKind::ActivatedLiquidity(token_id) => { let already_activated_amount = RewardsInfoForScheduleRewards::::get( user.clone(), @@ -856,6 +858,7 @@ impl Pallet { } fn ensure_is_promoted_pool(liquidity_asset_id: TokenId) -> Result<(), DispatchError> { + //NOTE: 2 separate functions for separate rewards if Self::get_pool_rewards(liquidity_asset_id).is_ok() || RewardTokensPerPool::::iter_prefix_values(liquidity_asset_id) .next() @@ -1295,3 +1298,6 @@ impl LiquidityMiningApi for Pallet { }); } } + +// TODO: valuate rewards in MGX +// TODO: dedicated ensures for every activation kind From 7dc7046fcd3ab89ba06fc0e15706f80dce830309 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 26 Sep 2023 09:30:01 +0200 Subject: [PATCH 014/125] Benchmarks for PoS::deactivate_liquidity_for_rewards_schedule --- pallets/proof-of-stake/src/benchmarking.rs | 84 +++++++++++++++++++++- pallets/proof-of-stake/src/lib.rs | 6 ++ 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index b879e4c074..3582b8697d 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -3,6 +3,7 @@ use super::*; use frame_benchmarking::{account, benchmarks, whitelisted_caller}; +use frame_support::traits::WithdrawReasons; use frame_system::RawOrigin; use mangata_support::traits::{ComputeIssuance, ProofOfStakeRewardsApi}; use orml_tokens::MultiTokenCurrencyExtended; @@ -272,8 +273,8 @@ benchmarks! { activate_liquidity_for_rewards_schedule{ // 1 create pool that can be rewarded - // 2 create token that is githeven as reward - // 3 create new schedule that will replace the expired one + // 2 create token that is used as reward + // 3 activate rewards init::(); @@ -318,7 +319,86 @@ benchmarks! { ) } + deactivate_liquidity_for_rewards_schedule{ + // 1 create pool that can be rewarded + // 2 create token that is used as reward + // 3 activate rewards + // 4 deactivate rewards and unlock them + + init::(); + + let schedules_limit = ::RewardsSchedulesLimit::get(); + let caller: ::AccountId = whitelisted_caller(); + let native_asset_id = ::NativeCurrencyId::get(); + + loop { + let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + if token_id > native_asset_id { + break; + } + } + + let native_asset_amount: u128 = MILION * Into::::into(schedules_limit); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + + let first_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), first_token_id.into(), MILION.into()).unwrap(); + let liquidity_asset_id = first_token_id + 1; + + let second_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), second_token_id.into(), MILION.into()).unwrap(); + let reward_token_id = second_token_id + 1; + + let rewards_amount = 20_000u128; + + PoS::::reward_pool( + RawOrigin::Signed(caller.clone().into()).into(), + (native_asset_id, first_token_id), + reward_token_id.into(), + rewards_amount, + 2u32.into(), + ).unwrap(); + + // println!("{:?}", TokensOf::::free_balance(reward_token_id.into(), &caller)); + + assert!(TokensOf::::ensure_can_withdraw( + liquidity_asset_id.into(), + &caller, + MILION.into(), + WithdrawReasons::all(), + Default::default(), + ).is_ok()); + + PoS::::activate_liquidity_for_rewards_schedule( + RawOrigin::Signed(caller.clone().into()).into(), + liquidity_asset_id, + 10_000u128, + reward_token_id, + None + ).unwrap(); + + assert!( + TokensOf::::ensure_can_withdraw( + liquidity_asset_id.into(), + &caller, + MILION.into(), + WithdrawReasons::all(), + Default::default(), + ).is_err() + ); + + }: deactivate_liquidity_for_rewards_schedule(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id) + verify { + + assert!(TokensOf::::ensure_can_withdraw( + liquidity_asset_id.into(), + &caller, + MILION.into(), + WithdrawReasons::all(), + Default::default(), + ).is_ok()); + } impl_benchmark_test_suite!(PoS, crate::mock::new_test_ext(), crate::mock::Test) } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index f9d424b652..19e325613c 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -658,6 +658,7 @@ impl Pallet { Self::set_liquidity_minting_checkpoint(user.clone(), liquidity_asset_id, amount)?; + println!("activate"); ::ActivationReservesProvider::activate( liquidity_asset_id, &user, @@ -753,6 +754,7 @@ impl Pallet { match use_balance_from { ScheduleActivationKind::ActivateKind(use_balance_from) => { + println!("activate"); ::ActivationReservesProvider::activate( liquidity_asset_id, &user, @@ -923,6 +925,7 @@ impl Pallet { ); } + println!("MINTING : {user:?} {liquidity_asset_id} {liquidity_assets_reward}"); ActivatedLiquidityForSchedules::::try_mutate_exists( (user.clone(), liquidity_asset_id, liquidity_assets_reward), |v| { @@ -1027,10 +1030,12 @@ impl Pallet { }, )?; + println!("BURNING : {user} {liquidity_asset_id} {reward_token}"); ActivatedLiquidityForSchedules::::try_mutate_exists( (user.clone(), liquidity_asset_id, reward_token), |v| { v.and_then(|a| { + println!("{a} {liquidity_assets_burned}"); a.checked_sub(liquidity_assets_burned).and_then(|val| { if val > 0 { *v = Some(val); @@ -1060,6 +1065,7 @@ impl Pallet { }, ); + println!("deactivate"); ::ActivationReservesProvider::deactivate( liquidity_asset_id, &user, From 9ce2c487ce95c24a9b49e4f7314d6555867bd3e6 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 26 Sep 2023 09:45:04 +0200 Subject: [PATCH 015/125] include new extrinsics in PoS::Weight --- pallets/proof-of-stake/src/lib.rs | 6 +++--- pallets/proof-of-stake/src/weights.rs | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 19e325613c..d188f86523 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -488,7 +488,7 @@ pub mod pallet { #[transactional] #[pallet::call_index(4)] // NOTE: implement benchmark - #[pallet::weight(<::WeightInfo>::claim_rewards_all())] + #[pallet::weight(<::WeightInfo>::reward_pool())] pub fn reward_pool( origin: OriginFor, pool: (TokenId, TokenId), @@ -568,7 +568,7 @@ pub mod pallet { /// be taken from available balance #[transactional] #[pallet::call_index(5)] - #[pallet::weight(<::WeightInfo>::activate_liquidity())] + #[pallet::weight(<::WeightInfo>::activate_liquidity_for_rewards_schedule())] pub fn activate_liquidity_for_rewards_schedule( origin: OriginFor, liquidity_token_id: TokenId, @@ -595,7 +595,7 @@ pub mod pallet { /// - use_balance_from - where from tokens should be used #[transactional] #[pallet::call_index(6)] - #[pallet::weight(<::WeightInfo>::activate_liquidity())] + #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_rewards_schedule())] pub fn deactivate_liquidity_for_rewards_schedule( origin: OriginFor, liquidity_token_id: TokenId, diff --git a/pallets/proof-of-stake/src/weights.rs b/pallets/proof-of-stake/src/weights.rs index 49e10aa4c8..024cc3133e 100644 --- a/pallets/proof-of-stake/src/weights.rs +++ b/pallets/proof-of-stake/src/weights.rs @@ -59,6 +59,9 @@ pub trait WeightInfo { fn update_pool_promotion() -> Weight; fn activate_liquidity() -> Weight; fn deactivate_liquidity() -> Weight; + fn deactivate_liquidity_for_rewards_schedule() -> Weight; + fn activate_liquidity_for_rewards_schedule() -> Weight; + fn reward_pool() -> Weight; } // For backwards compatibility and tests @@ -97,4 +100,22 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + + fn deactivate_liquidity_for_rewards_schedule() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn activate_liquidity_for_rewards_schedule() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn reward_pool() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } } From 504710499acc8d64e6aed2d98cb48b912c3e6a87 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 26 Sep 2023 11:01:12 +0200 Subject: [PATCH 016/125] valuate MGX rewards properly --- pallets/proof-of-stake/src/lib.rs | 9 ++++++--- pallets/proof-of-stake/src/tests.rs | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index d188f86523..b75a5a5800 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -188,7 +188,7 @@ pub mod pallet { impl PoSBenchmarkingConfig for T {} #[cfg(not(feature = "runtime-benchmarks"))] - pub trait ValutationApiTrait: + pub trait ValutationApiTrait: Valuate { } @@ -521,7 +521,9 @@ pub mod pallet { ensure!( ::ValuationApi::valuate_liquidity_token(liquidity_token_id, amount) >= - T::MinRewardsPerSession::get(), + T::MinRewardsPerSession::get() || + ((token_id == Into::::into(Self::native_token_id())) && + amount_per_session >= T::MinRewardsPerSession::get()), Error::::TooLittleRewardsPerSession ); @@ -1305,5 +1307,6 @@ impl LiquidityMiningApi for Pallet { } } -// TODO: valuate rewards in MGX // TODO: dedicated ensures for every activation kind +// TODO: clean up test setup +// TODO: test schedule rewards without liquidity mining rewards diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 8fcd8aec11..0de86ee514 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1387,6 +1387,35 @@ fn reject_schedule_with_too_little_rewards_per_session() { }); } +#[test] +#[serial] +fn accept_schedule_valuated_in_native_token() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(1u128); + + let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(ProofOfStake::native_token_id(), &ALICE, 10).unwrap(); + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + + roll_to_session(4); + + assert_ok!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + ProofOfStake::native_token_id(), + 10, + 5u32.into() + ), + // Error::::TooLittleRewardsPerSession + ); + }); +} + #[test] #[serial] fn user_can_claim_3rdparty_rewards() { From 280a56b095081a55b43b85e7d2ca2b20b4b676b3 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 26 Sep 2023 11:11:46 +0200 Subject: [PATCH 017/125] remove unnecessary pool promotion --- pallets/proof-of-stake/src/lib.rs | 1 - pallets/proof-of-stake/src/tests.rs | 5 ----- 2 files changed, 6 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index b75a5a5800..911febfb85 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -1309,4 +1309,3 @@ impl LiquidityMiningApi for Pallet { // TODO: dedicated ensures for every activation kind // TODO: clean up test setup -// TODO: test schedule rewards without liquidity mining rewards diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 0de86ee514..626729dc2a 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1442,7 +1442,6 @@ fn user_can_claim_3rdparty_rewards() { let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); let amount = 10_000u128; - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), pair, @@ -1520,7 +1519,6 @@ fn overlapping_3rdparty_rewards_works() { let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); let amount = 10_000u128; - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), pair, @@ -1605,7 +1603,6 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); let amount = 10_000u128; - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), pair, @@ -1691,7 +1688,6 @@ fn deactivate_3rdparty_rewards() { let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); let amount = 10_000u128; - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), pair, @@ -1777,7 +1773,6 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); let amount = 10_000u128; - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), pair, From 6c84c1106976c8ad28c095c29f32da77ff25236c Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 26 Sep 2023 13:06:33 +0200 Subject: [PATCH 018/125] wip --- pallets/proof-of-stake/src/lib.rs | 4 +- pallets/proof-of-stake/src/mock.rs | 34 +++++ pallets/proof-of-stake/src/tests.rs | 184 ++++++++++++++++++++-------- 3 files changed, 171 insertions(+), 51 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 911febfb85..7bc6f04b0a 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -764,7 +764,6 @@ impl Pallet { use_balance_from, )?; }, - ScheduleActivationKind::LiquidityMining => {}, _ => {}, } @@ -927,7 +926,6 @@ impl Pallet { ); } - println!("MINTING : {user:?} {liquidity_asset_id} {liquidity_assets_reward}"); ActivatedLiquidityForSchedules::::try_mutate_exists( (user.clone(), liquidity_asset_id, liquidity_assets_reward), |v| { @@ -1307,5 +1305,5 @@ impl LiquidityMiningApi for Pallet { } } -// TODO: dedicated ensures for every activation kind // TODO: clean up test setup +// TODO: dedicated 3rdparty rewards api diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 1209e57255..a70a73d077 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -394,6 +394,40 @@ pub fn new_test_ext() -> sp_io::TestExternalities { ext } +pub struct ExtBuilder { + ext: sp_io::TestExternalities, +} + +impl ExtBuilder { + pub fn new() -> Self { + let t = frame_system::GenesisConfig::default() + .build_storage::() + .expect("Frame system builds valid default genesis config"); + + let mut ext = sp_io::TestExternalities::new(t); + Self { ext } + } + + fn create_if_does_not_exists(&mut self, token_id: TokenId) { + self.ext.execute_with(|| { + while token_id >= Tokens::next_asset_id() { + Tokens::create(RuntimeOrigin::root(), 0, 0).unwrap(); + } + }); + } + + pub fn issue(mut self, who: AccountId, token_id: TokenId, balance: Balance) -> Self { + self.create_if_does_not_exists(token_id); + self.ext + .execute_with(|| Tokens::mint(RuntimeOrigin::root(), token_id, who, balance).unwrap()); + return self + } + + pub fn build(self) -> sp_io::TestExternalities { + self.ext + } +} + /// Compares the system events with passed in events /// Prints highlighted diff iff assert_eq fails #[macro_export] diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 626729dc2a..72ccb8648c 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1101,6 +1101,10 @@ fn claim_rewards_from_pool_that_has_been_disabled() { } const MILLION: u128 = 1_000_000; +const REWARDED_PAIR: (TokenId, TokenId) = (0u32, 4u32); +const REWARD_AMOUNT: u128 = 10_000u128; +const REWARD_TOKEN: u32 = 5u32; +const LIQUIDITY_TOKEN: u32 = 10; const ALICE: u128 = 2; const BOB: u128 = 3; const CHARLIE: u128 = 4; @@ -1109,32 +1113,31 @@ const EVE: u128 = 5; #[test] #[serial] fn user_can_provide_3rdparty_rewards() { - new_test_ext().execute_with(|| { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); System::set_block_number(1); - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT/2, 10u32.into(), ) .unwrap(); + roll_to_session(5); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT/2, 6u32.into(), ) .unwrap(); @@ -1144,24 +1147,23 @@ fn user_can_provide_3rdparty_rewards() { #[test] #[serial] fn cant_schedule_rewards_in_past() { - new_test_ext().execute_with(|| { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { System::set_block_number(1); let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); get_liquidity_asset_mock.expect().return_const(Ok(10u32)); let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - roll_to_session(5); assert_err!( ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, 1u32.into() ), Error::::CannotScheduleRewardsInPast @@ -1169,9 +1171,9 @@ fn cant_schedule_rewards_in_past() { assert_err!( ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, 4u32.into() ), Error::::CannotScheduleRewardsInPast @@ -1179,9 +1181,9 @@ fn cant_schedule_rewards_in_past() { assert_err!( ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, 5u32.into() ), Error::::CannotScheduleRewardsInPast @@ -1192,24 +1194,23 @@ fn cant_schedule_rewards_in_past() { #[test] #[serial] fn cannot_reward_unexisting_pool() { - new_test_ext().execute_with(|| { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); get_liquidity_asset_mock .expect() .return_const(Err(Error::::PoolDoesNotExist.into())); let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; assert_err!( ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, 5u32.into() ), Error::::PoolDoesNotExist @@ -1220,32 +1221,32 @@ fn cannot_reward_unexisting_pool() { #[test] #[serial] fn rewards_are_stored_in_pallet_account() { - new_test_ext().execute_with(|| { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); get_liquidity_asset_mock.expect().return_const(Ok(10u32)); let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - assert_eq!(TokensOf::::free_balance(token_id, &Pallet::::pallet_account()), 0); - assert_eq!(TokensOf::::free_balance(token_id, &ALICE), MILLION); + assert_eq!(TokensOf::::free_balance(REWARD_TOKEN, &Pallet::::pallet_account()), 0); + assert_eq!(TokensOf::::free_balance(REWARD_TOKEN, &ALICE), REWARD_AMOUNT); assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, 5u32.into() ),); - assert_eq!(TokensOf::::free_balance(token_id, &ALICE), MILLION - amount); + assert_eq!(TokensOf::::free_balance(REWARD_TOKEN, &ALICE), 0); assert_eq!( - TokensOf::::free_balance(token_id, &Pallet::::pallet_account()), - amount + TokensOf::::free_balance(REWARD_TOKEN, &Pallet::::pallet_account()), + REWARD_AMOUNT ); }); } @@ -2184,3 +2185,90 @@ fn can_claim_schedule_rewards() { ); }); } + +#[test] +#[serial] +fn can_not_provide_liquidity_for_schedule_rewards_when_its_only_activated_for_liq_minting() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN: u32 = 5; + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + + let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); + + assert_err!( + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_token_id, + None, + ), + Error::::NotAPromotedPool + ); + }); +} + + +#[test] +#[serial] +fn can_not_provide_liquidity_for_mining_rewards_when_its_only_activated_for_schedule_rewards() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN: u32 = 5; + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); + assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + + let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + first_token_id, + amount, + 10u32.into(), + ) + .unwrap(); + + assert_err!( + ProofOfStake::activate_liquidity( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + None, + ), + Error::::NotAPromotedPool + ); + }); +} From bf719f6919da892192249b4d1b4d015ca83a113e Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 26 Sep 2023 17:00:15 +0200 Subject: [PATCH 019/125] tests cleanup --- pallets/proof-of-stake/src/mock.rs | 2 +- pallets/proof-of-stake/src/tests.rs | 1936 +++++++++++++-------------- 2 files changed, 957 insertions(+), 981 deletions(-) diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index a70a73d077..a7541ee8a3 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -417,7 +417,7 @@ impl ExtBuilder { } pub fn issue(mut self, who: AccountId, token_id: TokenId, balance: Balance) -> Self { - self.create_if_does_not_exists(token_id); + self.create_if_does_not_exists(token_id); self.ext .execute_with(|| Tokens::mint(RuntimeOrigin::root(), token_id, who, balance).unwrap()); return self diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 72ccb8648c..82a4f99737 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1104,6 +1104,8 @@ const MILLION: u128 = 1_000_000; const REWARDED_PAIR: (TokenId, TokenId) = (0u32, 4u32); const REWARD_AMOUNT: u128 = 10_000u128; const REWARD_TOKEN: u32 = 5u32; +const FIRST_REWARD_TOKEN: u32 = REWARD_TOKEN; +const SECOND_REWARD_TOKEN: u32 = 6u32; const LIQUIDITY_TOKEN: u32 = 10; const ALICE: u128 = 2; const BOB: u128 = 3; @@ -1113,196 +1115,196 @@ const EVE: u128 = 5; #[test] #[serial] fn user_can_provide_3rdparty_rewards() { - ExtBuilder::new() - .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .build() - .execute_with(|| { - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - System::set_block_number(1); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - REWARD_AMOUNT/2, - 10u32.into(), - ) - .unwrap(); + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + System::set_block_number(1); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT / 2, + 10u32.into(), + ) + .unwrap(); - roll_to_session(5); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - REWARD_AMOUNT/2, - 6u32.into(), - ) - .unwrap(); - }); + roll_to_session(5); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT / 2, + 6u32.into(), + ) + .unwrap(); + }); } #[test] #[serial] fn cant_schedule_rewards_in_past() { - ExtBuilder::new() - .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .build() - .execute_with(|| { - System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(10u32)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - roll_to_session(5); - assert_err!( - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - REWARD_AMOUNT, - 1u32.into() - ), - Error::::CannotScheduleRewardsInPast - ); - assert_err!( - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - REWARD_AMOUNT, - 4u32.into() - ), - Error::::CannotScheduleRewardsInPast - ); - assert_err!( - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - REWARD_AMOUNT, - 5u32.into() - ), - Error::::CannotScheduleRewardsInPast - ); - }); + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + roll_to_session(5); + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 1u32.into() + ), + Error::::CannotScheduleRewardsInPast + ); + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 4u32.into() + ), + Error::::CannotScheduleRewardsInPast + ); + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 5u32.into() + ), + Error::::CannotScheduleRewardsInPast + ); + }); } #[test] #[serial] fn cannot_reward_unexisting_pool() { - ExtBuilder::new() - .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .build() - .execute_with(|| { - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock - .expect() - .return_const(Err(Error::::PoolDoesNotExist.into())); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - assert_err!( - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - REWARD_AMOUNT, - 5u32.into() - ), - Error::::PoolDoesNotExist - ); - }); + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock + .expect() + .return_const(Err(Error::::PoolDoesNotExist.into())); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 5u32.into() + ), + Error::::PoolDoesNotExist + ); + }); } #[test] #[serial] fn rewards_are_stored_in_pallet_account() { - ExtBuilder::new() - .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .build() - .execute_with(|| { - - System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(10u32)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - assert_eq!(TokensOf::::free_balance(REWARD_TOKEN, &Pallet::::pallet_account()), 0); - assert_eq!(TokensOf::::free_balance(REWARD_TOKEN, &ALICE), REWARD_AMOUNT); + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + assert_eq!( + TokensOf::::free_balance(REWARD_TOKEN, &Pallet::::pallet_account()), + 0 + ); + assert_eq!(TokensOf::::free_balance(REWARD_TOKEN, &ALICE), REWARD_AMOUNT); - assert_ok!(ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - REWARD_AMOUNT, - 5u32.into() - ),); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 5u32.into() + ),); - assert_eq!(TokensOf::::free_balance(REWARD_TOKEN, &ALICE), 0); - assert_eq!( - TokensOf::::free_balance(REWARD_TOKEN, &Pallet::::pallet_account()), - REWARD_AMOUNT - ); - }); + assert_eq!(TokensOf::::free_balance(REWARD_TOKEN, &ALICE), 0); + assert_eq!( + TokensOf::::free_balance(REWARD_TOKEN, &Pallet::::pallet_account()), + REWARD_AMOUNT + ); + }); } #[test] #[serial] fn rewards_schedule_is_stored() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let liquidity_token_id = 10u32; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(liquidity_token_id)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - assert_ok!(ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, - 5u32.into() - ),); - - assert_eq!( - ProofOfStake::schedules().into_inner(), - BTreeMap::from([((5u64, liquidity_token_id, token_id, amount / 5, 0), ())]) - ); - }); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 5u32.into() + ),); + + let rewards_per_session = REWARD_AMOUNT / 5; + assert_eq!( + ProofOfStake::schedules().into_inner(), + BTreeMap::from([( + (5u64, LIQUIDITY_TOKEN, REWARD_TOKEN, rewards_per_session, 0), + () + )]) + ); + }); } #[test] #[serial] fn number_of_active_schedules_is_limited() { - new_test_ext().execute_with(|| { + ExtBuilder::new().issue(ALICE, REWARD_TOKEN, MILLION).build().execute_with(|| { System::set_block_number(1); let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); get_liquidity_asset_mock.expect().return_const(Ok(10u32)); let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - let max_schedules: u32 = <::RewardsSchedulesLimit as sp_core::Get<_>>::get(); for i in 0..(max_schedules) { assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, (5u32 + i).into() )); } @@ -1310,9 +1312,9 @@ fn number_of_active_schedules_is_limited() { assert_err!( ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, 100u32.into() ), Error::::TooManySchedules @@ -1322,9 +1324,9 @@ fn number_of_active_schedules_is_limited() { assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, 100u32.into() )); }); @@ -1333,942 +1335,916 @@ fn number_of_active_schedules_is_limited() { #[test] #[serial] fn duplicated_schedules_works() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(10u32)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); - assert_ok!(ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, - 5u32.into() - )); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT / 2, + 5u32.into() + )); - assert_eq!(1, ProofOfStake::schedules().len()); + assert_eq!(1, ProofOfStake::schedules().len()); - assert_ok!(ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, - 5u32.into() - )); - assert_eq!(2, ProofOfStake::schedules().len()); - }); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT / 2, + 5u32.into() + )); + assert_eq!(2, ProofOfStake::schedules().len()); + }); } #[test] #[serial] fn reject_schedule_with_too_little_rewards_per_session() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(10u32)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(1u128); - - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - roll_to_session(4); - - assert_err!( - ProofOfStake::reward_pool(RuntimeOrigin::signed(ALICE), pair, token_id, 1, 5u32.into()), - Error::::TooLittleRewardsPerSession - ); - }); + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(1u128); + + roll_to_session(4); + + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 1, + 5u32.into() + ), + Error::::TooLittleRewardsPerSession + ); + }); } #[test] #[serial] fn accept_schedule_valuated_in_native_token() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(10u32)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(1u128); - - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(ProofOfStake::native_token_id(), &ALICE, 10).unwrap(); - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + ExtBuilder::new() + .issue(ALICE, ProofOfStake::native_token_id(), REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(1u128); + + roll_to_session(4); - roll_to_session(4); - - assert_ok!( - ProofOfStake::reward_pool( + assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - pair, + REWARDED_PAIR, ProofOfStake::native_token_id(), 10, 5u32.into() - ), - // Error::::TooLittleRewardsPerSession - ); - }); + ),); + }); } #[test] #[serial] fn user_can_claim_3rdparty_rewards() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .issue(EVE, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); + + let amount = 10_000u128; - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); + roll_to_session(1); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(0) + ); + + roll_to_session(2); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(0) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1000) + ); + + roll_to_session(3); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1500) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(500) + ); + }); +} - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; +#[test] +#[serial] +fn overlapping_3rdparty_rewards_works() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + const LIQUIDITY_TOKEN: u32 = 5; + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + let first_reward_token = TokensOf::::create(&ALICE, MILLION).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 200).unwrap(); + + let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); + let amount = 10_000u128; - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, - 10u32.into(), - ) - .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + first_reward_token, + amount, + 10u32.into(), + ) + .unwrap(); - roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - token_id, - None, - ) - .unwrap(); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), - Ok(0) - ); + roll_to_session(1); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_reward_token, + None, + ) + .unwrap(); - roll_to_session(2); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(CHARLIE), - LIQUIDITY_TOKEN, - 100, - token_id, - None, - ) - .unwrap(); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), - Ok(0) - ); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), - Ok(1000) - ); + roll_to_session(5); + let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + second_reward_token_id, + 100_000, + 15u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + second_reward_token_id, + None, + ) + .unwrap(); - roll_to_session(3); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), - Ok(1500) - ); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), - Ok(500) - ); - }); + roll_to_session(6); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + second_reward_token_id + ), + Ok(10000) + ); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + first_reward_token + ), + Ok(5000) + ); + }); } #[test] #[serial] -fn overlapping_3rdparty_rewards_works() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); +fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 200) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); - let first_reward_token = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 200).unwrap(); + roll_to_session(1); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; + roll_to_session(5); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 100_000, + 15u32.into(), + ) + .unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - first_reward_token, - amount, - 10u32.into(), - ) - .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + Some(ScheduleActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + ) + .unwrap(); - roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_reward_token, - None, - ) - .unwrap(); + roll_to_session(6); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN + ), + Ok(10000) + ); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN + ), + Ok(5000) + ); + }); +} - roll_to_session(5); - let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - second_reward_token_id, - 100_000, - 15u32.into(), - ) - .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - second_reward_token_id, - None, - ) - .unwrap(); +#[test] +#[serial] +fn deactivate_3rdparty_rewards() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); - roll_to_session(6); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( - BOB, + roll_to_session(1); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, - second_reward_token_id - ), - Ok(10000) - ); + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( - BOB, + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, - first_reward_token - ), - Ok(5000) - ); - }); + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session(2); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(500) + ); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(500) + ); + ProofOfStake::deactivate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + ) + .unwrap(); + + roll_to_session(3); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1500) + ); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(500) + ); + }); } #[test] #[serial] -fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); - - let first_reward_token = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - first_reward_token, - amount, - 10u32.into(), - ) - .unwrap(); - - roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_reward_token, - None, - ) - .unwrap(); - - roll_to_session(5); - let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - second_reward_token_id, - 100_000, - 15u32.into(), - ) - .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - second_reward_token_id, - Some(ScheduleActivationKind::ActivatedLiquidity(first_reward_token)), - ) - .unwrap(); +fn claim_rewards_from_multiple_schedules_using_single_liquidity() { + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + System::set_block_number(1); - roll_to_session(6); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 2 * REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( - BOB, + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, - second_reward_token_id - ), - Ok(10000) - ); - - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( - BOB, + 100, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, - first_reward_token - ), - Ok(5000) - ); - }); -} - -#[test] -#[serial] -fn deactivate_3rdparty_rewards() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); - - let token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); - - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - token_id, - amount, - 10u32.into(), - ) - .unwrap(); - - roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - token_id, - None, - ) - .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(CHARLIE), - LIQUIDITY_TOKEN, - 100, - token_id, - None, - ) - .unwrap(); - - roll_to_session(2); - - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), - Ok(500) - ); - - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), - Ok(500) - ); - ProofOfStake::deactivate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(CHARLIE), - LIQUIDITY_TOKEN, - 100, - token_id, - ) - .unwrap(); - - roll_to_session(3); - - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, token_id), - Ok(1500) - ); - - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(CHARLIE, LIQUIDITY_TOKEN, token_id), - Ok(500) - ); - }); -} - -#[test] -#[serial] -fn claim_rewards_from_multiple_schedules_using_single_liquidity() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); - - let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - first_token_id, - amount, - 10u32.into(), - ) - .unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - second_token_id, - 2 * amount, - 10u32.into(), - ) - .unwrap(); - - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_token_id, - None, - ) - .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - second_token_id, - Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id)), - ) - .unwrap(); - - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), - Ok(0) - ); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_token_id), - Ok(0) - ); - - roll_to_session(1); + 100, + SECOND_REWARD_TOKEN, + Some(ScheduleActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + ) + .unwrap(); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), - Ok(1000) - ); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_token_id), - Ok(2000) - ); - }); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN + ), + Ok(0) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN + ), + Ok(0) + ); + + roll_to_session(1); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN + ), + Ok(1000) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN + ), + Ok(2000) + ); + }); } #[test] #[serial] fn liquidity_minting_liquidity_can_be_resused() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); - - let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - first_token_id, - amount, - 10u32.into(), - ) - .unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - second_token_id, - 2 * amount, - 10u32.into(), - ) - .unwrap(); - - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None) + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 2 * REWARD_AMOUNT, + 10u32.into(), + ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_token_id, - Some(ScheduleActivationKind::LiquidityMining), - ) - .unwrap(); - roll_to_session(1); + ProofOfStake::activate_liquidity( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + Some(ScheduleActivationKind::LiquidityMining), + ) + .unwrap(); - assert_eq!(ProofOfStake::calculate_rewards_amount(BOB, LIQUIDITY_TOKEN), Ok(200)); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), - Ok(1000) - ); - }); + roll_to_session(1); + + assert_eq!(ProofOfStake::calculate_rewards_amount(BOB, LIQUIDITY_TOKEN), Ok(200)); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN + ), + Ok(1000) + ); + }); } #[test] #[serial] fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); - - let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - first_token_id, - amount, - 10u32.into(), - ) - .unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - second_token_id, - 2 * amount, - 10u32.into(), - ) - .unwrap(); + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 2 * REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None) + ProofOfStake::activate_liquidity( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + None, + ) .unwrap(); - assert_err!( - TokensOf::::transfer( + assert_err!( + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, - &BOB, - &CHARLIE, 100, - ExistenceRequirement::AllowDeath - ), - orml_tokens::Error::::BalanceTooLow - ); - - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_token_id, - Some(ScheduleActivationKind::LiquidityMining), - ) - .unwrap(); + FIRST_REWARD_TOKEN, + Some(ScheduleActivationKind::LiquidityMining), + ) + .unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_token_id, - None, - ) - .unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); - ProofOfStake::deactivate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 200, - first_token_id, - ) - .unwrap(); - assert_err!( - TokensOf::::transfer( + ProofOfStake::deactivate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 200, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + assert_err!( + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 101, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + + assert_ok!(TokensOf::::transfer( LIQUIDITY_TOKEN, &BOB, &CHARLIE, - 101, + 100, ExistenceRequirement::AllowDeath - ), - orml_tokens::Error::::BalanceTooLow - ); - - assert_ok!(TokensOf::::transfer( - LIQUIDITY_TOKEN, - &BOB, - &CHARLIE, - 100, - ExistenceRequirement::AllowDeath - )); - }); + )); + }); } #[test] #[serial] fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 2 * REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); - let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + Some(ScheduleActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + ) + .unwrap(); - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - first_token_id, - amount, - 10u32.into(), - ) - .unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - second_token_id, - amount, - 10u32.into(), - ) - .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_token_id, - None, - ) - .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - second_token_id, - Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id)), - ) - .unwrap(); + assert_err!( + TokensOf::::transfer( + 0, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + ProofOfStake::deactivate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + assert_err!( + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + ProofOfStake::deactivate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + ) + .unwrap(); - assert_err!( - TokensOf::::transfer(0, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath), - orml_tokens::Error::::BalanceTooLow - ); - ProofOfStake::deactivate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_token_id, - ) - .unwrap(); - assert_err!( - TokensOf::::transfer( + assert_ok!(TokensOf::::transfer( LIQUIDITY_TOKEN, &BOB, &CHARLIE, 100, ExistenceRequirement::AllowDeath - ), - orml_tokens::Error::::BalanceTooLow - ); - ProofOfStake::deactivate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - second_token_id, - ) - .unwrap(); - - assert_ok!(TokensOf::::transfer( - LIQUIDITY_TOKEN, - &BOB, - &CHARLIE, - 100, - ExistenceRequirement::AllowDeath - ),); - }); + ),); + }); } #[test] #[serial] fn can_claim_schedule_rewards() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); - - let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + System::set_block_number(1); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - first_token_id, - amount, - 10u32.into(), - ) - .unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - second_token_id, - amount, - 10u32.into(), - ) - .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_token_id, - None, - ) - .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - second_token_id, - Some(ScheduleActivationKind::ActivatedLiquidity(first_token_id)), - ) - .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + SECOND_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + Some(ScheduleActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + ) + .unwrap(); - roll_to_session(1); + roll_to_session(1); - assert_eq!(TokensOf::::free_balance(first_token_id, &BOB), 0,); - assert_eq!(TokensOf::::free_balance(second_token_id, &BOB), 0,); + assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 0,); + assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 0,); - ProofOfStake::claim_schedule_rewards_all( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - first_token_id, - ) - .unwrap(); - ProofOfStake::claim_schedule_rewards_all( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - second_token_id, - ) - .unwrap(); + ProofOfStake::claim_schedule_rewards_all( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(); - assert_eq!(TokensOf::::free_balance(first_token_id, &BOB), 1000,); - assert_eq!(TokensOf::::free_balance(second_token_id, &BOB), 1000,); + ProofOfStake::claim_schedule_rewards_all( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, first_token_id), - Ok(0) - ); - assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, second_token_id), - Ok(0) - ); - }); + assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 1000,); + assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 1000,); + + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN + ), + Ok(0) + ); + assert_eq!( + ProofOfStake::calculate_rewards_amount_3rdparty( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN + ), + Ok(0) + ); + }); } #[test] #[serial] fn can_not_provide_liquidity_for_schedule_rewards_when_its_only_activated_for_liq_minting() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); - - let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8).unwrap(); - - assert_err!( - ProofOfStake::activate_liquidity_for_rewards_schedule( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_token_id, - None, - ), - Error::::NotAPromotedPool - ); - }); + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + System::set_block_number(1); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + + assert_err!( + ProofOfStake::activate_liquidity_for_rewards_schedule( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ), + Error::::NotAPromotedPool + ); + }); } - #[test] #[serial] fn can_not_provide_liquidity_for_mining_rewards_when_its_only_activated_for_schedule_rewards() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - const LIQUIDITY_TOKEN: u32 = 5; - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - - assert_eq!(0, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(1, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(2, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(3, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(4, TokensOf::::create(&ALICE, 0).unwrap()); - assert_eq!(5, TokensOf::::create(&ALICE, 0).unwrap()); - - let first_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - let second_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - - let pair: (TokenId, TokenId) = (0u32.into(), 4u32.into()); - let amount = 10_000u128; - - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - first_token_id, - amount, - 10u32.into(), - ) - .unwrap(); + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); - assert_err!( - ProofOfStake::activate_liquidity( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - None, - ), - Error::::NotAPromotedPool - ); - }); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + assert_err!( + ProofOfStake::activate_liquidity( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + None, + ), + Error::::NotAPromotedPool + ); + }); } From 4b5f06acccc904e35f36b42e329d8d93d812f9a0 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 27 Sep 2023 12:19:02 +0200 Subject: [PATCH 020/125] wip rpc/runtime api --- node/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node/Cargo.toml b/node/Cargo.toml index 000f3df6aa..7c74378f50 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -143,6 +143,8 @@ polkadot-test-service = { git = "https://github.com/mangata-finance/polkadot", b # Mangata dependencies xyk-rpc = { default-features = false, version = '2.0.0', path = '../pallets/xyk/rpc' } xyk-runtime-api = { default-features = false, version = '2.0.0', path = '../pallets/xyk/runtime-api' } +proof-of-stake-runtime-api = { default-features = false, version = '2.0.0', path = '../pallets/proof-of-stake/runtime-api' } +proof-of-stake-rpc = { default-features = false, version = '2.0.0', path = '../pallets/proof-of-stake/runtime-api' } [dev-dependencies] From 87f7df41326289f0a882dd99ae5ff7a90eaae78d Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 27 Sep 2023 13:01:10 +0200 Subject: [PATCH 021/125] rpc/runtime api --- Cargo.lock | 127 ++++++++++++++++++ node/Cargo.toml | 2 +- pallets/proof-of-stake/rpc/Cargo.toml | 36 +++++ pallets/proof-of-stake/rpc/src/lib.rs | 78 +++++++++++ pallets/proof-of-stake/runtime-api/Cargo.toml | 30 +++++ pallets/proof-of-stake/runtime-api/src/lib.rs | 122 +++++++++++++++++ 6 files changed, 394 insertions(+), 1 deletion(-) create mode 100644 pallets/proof-of-stake/rpc/Cargo.toml create mode 100644 pallets/proof-of-stake/rpc/src/lib.rs create mode 100644 pallets/proof-of-stake/runtime-api/Cargo.toml create mode 100644 pallets/proof-of-stake/runtime-api/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 30825a1e55..1b8d1058a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3235,6 +3235,10 @@ name = "futures-timer" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper", +] [[package]] name = "futures-util" @@ -3370,6 +3374,51 @@ dependencies = [ "regex", ] +[[package]] +name = "gloo-net" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "group" version = "0.12.1" @@ -3638,6 +3687,7 @@ dependencies = [ "rustls-native-certs", "tokio", "tokio-rustls", + "webpki-roots", ] [[package]] @@ -3906,10 +3956,13 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" dependencies = [ + "jsonrpsee-client-transport", "jsonrpsee-core", + "jsonrpsee-http-client", "jsonrpsee-proc-macros", "jsonrpsee-server", "jsonrpsee-types", + "jsonrpsee-wasm-client", "jsonrpsee-ws-client", "tracing", ] @@ -3920,7 +3973,11 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" dependencies = [ + "anyhow", + "futures-channel", + "futures-timer", "futures-util", + "gloo-net", "http", "jsonrpsee-core", "jsonrpsee-types", @@ -3961,6 +4018,26 @@ dependencies = [ "thiserror", "tokio", "tracing", + "wasm-bindgen-futures", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core", + "jsonrpsee-types", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", ] [[package]] @@ -4012,6 +4089,17 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-wasm-client" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77310456f43c6c89bcba1f6b2fc2a28300da7c341f320f5128f8c83cc63232d" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + [[package]] name = "jsonrpsee-ws-client" version = "0.16.2" @@ -5014,6 +5102,8 @@ dependencies = [ "polkadot-runtime-common", "polkadot-service", "polkadot-test-service", + "proof-of-stake-rpc", + "proof-of-stake-runtime-api", "sc-basic-authorship-ver", "sc-block-builder-ver", "sc-chain-spec", @@ -9185,6 +9275,37 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "proof-of-stake-rpc" +version = "2.0.0" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "proof-of-stake-runtime-api", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "proof-of-stake-runtime-api" +version = "2.0.0" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "serde_json", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "prost" version = "0.11.9" @@ -11427,6 +11548,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "separator" version = "0.4.1" diff --git a/node/Cargo.toml b/node/Cargo.toml index 7c74378f50..9b0b2abac1 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -144,7 +144,7 @@ polkadot-test-service = { git = "https://github.com/mangata-finance/polkadot", b xyk-rpc = { default-features = false, version = '2.0.0', path = '../pallets/xyk/rpc' } xyk-runtime-api = { default-features = false, version = '2.0.0', path = '../pallets/xyk/runtime-api' } proof-of-stake-runtime-api = { default-features = false, version = '2.0.0', path = '../pallets/proof-of-stake/runtime-api' } -proof-of-stake-rpc = { default-features = false, version = '2.0.0', path = '../pallets/proof-of-stake/runtime-api' } +proof-of-stake-rpc = { default-features = false, version = '2.0.0', path = '../pallets/proof-of-stake/rpc' } [dev-dependencies] diff --git a/pallets/proof-of-stake/rpc/Cargo.toml b/pallets/proof-of-stake/rpc/Cargo.toml new file mode 100644 index 0000000000..705babe0f5 --- /dev/null +++ b/pallets/proof-of-stake/rpc/Cargo.toml @@ -0,0 +1,36 @@ +[package] +authors = ['Mangata team'] +name = "proof-of-stake-rpc" +version = "2.0.0" +edition = "2018" +description = "RPC calls for Proof of Stake" +license = "GPL-3.0-or-later" + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0" } +jsonrpsee = { version = "0.16.2", features = ["server", "client", "macros"] } +serde = { version = "1.0.126", features = ["derive"], optional = true } + +# Substrate packages + +sp-api = { version = '4.0.0-dev', default-features = false , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-blockchain = { version = '4.0.0-dev', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-rpc = { version = '6.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-core = { version = '7.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-std = { version = '5.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-runtime = { version = '7.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } + +# local packages + +proof-of-stake-runtime-api = { version = "2.0.0", path = "../runtime-api", default-features = false } + +[features] +default = ["std"] +std = [ + "serde", + "sp-api/std", + "sp-core/std", + "sp-std/std", + "sp-runtime/std", + "proof-of-stake-runtime-api/std" +] diff --git a/pallets/proof-of-stake/rpc/src/lib.rs b/pallets/proof-of-stake/rpc/src/lib.rs new file mode 100644 index 0000000000..64a893a87d --- /dev/null +++ b/pallets/proof-of-stake/rpc/src/lib.rs @@ -0,0 +1,78 @@ +// Copyright (C) 2021 Mangata team + +use codec::Codec; +use jsonrpsee::{ + core::{async_trait, Error as JsonRpseeError, RpcResult}, + proc_macros::rpc, + types::error::{CallError, ErrorObject}, +}; +use sp_api::ProvideRuntimeApi; +use sp_blockchain::HeaderBackend; +use sp_core::U256; +use sp_rpc::number::NumberOrHex; +use sp_runtime::{ + generic::BlockId, + traits::{Block as BlockT, MaybeDisplay, MaybeFromStr}, +}; +use sp_std::convert::{TryFrom, TryInto}; +use std::sync::Arc; +pub use proof_of_stake_runtime_api::XykApi as XykRuntimeApi; +use proof_of_stake_runtime_api::{RpcAmountsResult, RpcAssetMetadata, XYKRpcResult}; + +#[rpc(client, server)] +pub trait ProofOfStakeApi< + BlockHash, + Balance, + TokenId, + AccountId +> +{ + #[method(name = "foo")] + fn foo( + &self, + account: AccountId, + liquidity_token: TokenId, + reward_token: TokenId, + at: Option, + ) -> RpcResult; +} + +pub struct ProofOfStake { + client: Arc, + _marker: std::marker::PhantomData, +} + +impl ProofOfStake { + pub fn new(client: Arc) -> Self { + Self { client, _marker: Default::default() } + } +} + +#[async_trait] +impl + ProofOfStakeApiServer< + ::Hash, + NumberOrHex, + TokenId, + AccountId + > for ProofOfStake +where + Block: BlockT, + C: Send + Sync + 'static, + C: ProvideRuntimeApi, + C: HeaderBackend, + C::Api: XykRuntimeApi, + Balance: Codec + MaybeDisplay + MaybeFromStr + TryFrom, + TokenId: Codec + MaybeDisplay + MaybeFromStr, + AccountId: Codec + MaybeDisplay + MaybeFromStr, +{ + fn foo( + &self, + account: AccountId, + liquidity_token: TokenId, + reward_token: TokenId, + at: Option, + ) -> RpcResult> { + } + +} diff --git a/pallets/proof-of-stake/runtime-api/Cargo.toml b/pallets/proof-of-stake/runtime-api/Cargo.toml new file mode 100644 index 0000000000..34d8be4bf3 --- /dev/null +++ b/pallets/proof-of-stake/runtime-api/Cargo.toml @@ -0,0 +1,30 @@ +[package] +authors = ['Mangata team'] +name = "proof-of-stake-runtime-api" +version = "2.0.0" +edition = "2018" +license = "GPL-3.0-or-later" + +[dependencies] +serde = { version = "1.0.126", optional = true, features = ["derive"] } +sp-api = { version = '4.0.0-dev', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-std = { default-features = false, version = '5.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-runtime = { default-features = false, version = '7.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +frame-support = { default-features = false, version = '4.0.0-dev' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +frame-system = { default-features = false, version = '4.0.0-dev' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-core = { default-features = false, version = '7.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } + +[dev-dependencies] +serde_json = "1.0.68" + +[features] +default = ["std"] +std = [ + "serde", + "sp-api/std", + "codec/std", + "sp-runtime/std", + "frame-support/std", + 'frame-system/std' +] diff --git a/pallets/proof-of-stake/runtime-api/src/lib.rs b/pallets/proof-of-stake/runtime-api/src/lib.rs new file mode 100644 index 0000000000..9af1f6bfc2 --- /dev/null +++ b/pallets/proof-of-stake/runtime-api/src/lib.rs @@ -0,0 +1,122 @@ +// Copyright (C) 2021 Mangata team +#![cfg_attr(not(feature = "std"), no_std)] +#![allow(clippy::too_many_arguments)] +#![allow(clippy::unnecessary_mut_passed)] +use codec::{Codec, Decode, Encode}; +#[cfg(feature = "std")] +use serde::{Deserialize, Deserializer, Serialize, Serializer}; +use sp_runtime::traits::{MaybeDisplay, MaybeFromStr}; +use sp_std::vec::Vec; +// Workaround for substrate/serde issue +#[derive(Eq, PartialEq, Encode, Decode, Default)] +#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] +#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] +pub struct XYKRpcResult { + #[cfg_attr(feature = "std", serde(bound(serialize = "Balance: std::fmt::Display")))] + #[cfg_attr(feature = "std", serde(serialize_with = "serialize_as_string"))] + #[cfg_attr(feature = "std", serde(bound(deserialize = "Balance: std::str::FromStr")))] + #[cfg_attr(feature = "std", serde(deserialize_with = "deserialize_from_string"))] + pub price: Balance, +} + +#[derive(Eq, PartialEq, Encode, Decode, Default)] +#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] +#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] +pub struct RpcAmountsResult { + #[cfg_attr(feature = "std", serde(bound(serialize = "Balance: std::fmt::Display")))] + #[cfg_attr(feature = "std", serde(serialize_with = "serialize_as_string"))] + #[cfg_attr(feature = "std", serde(bound(deserialize = "Balance: std::str::FromStr")))] + #[cfg_attr(feature = "std", serde(deserialize_with = "deserialize_from_string"))] + pub first_asset_amount: Balance, + #[cfg_attr(feature = "std", serde(bound(serialize = "Balance: std::fmt::Display")))] + #[cfg_attr(feature = "std", serde(serialize_with = "serialize_as_string"))] + #[cfg_attr(feature = "std", serde(bound(deserialize = "Balance: std::str::FromStr")))] + #[cfg_attr(feature = "std", serde(deserialize_with = "deserialize_from_string"))] + pub second_asset_amount: Balance, +} + +#[derive(Eq, PartialEq, Encode, Decode, Default)] +#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] +#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] +pub struct RpcAssetMetadata { + pub token_id: TokenId, + pub decimals: u32, + pub name: Vec, + pub symbol: Vec, +} + +#[cfg(feature = "std")] +fn serialize_as_string( + t: &T, + serializer: S, +) -> Result { + serializer.serialize_str(&t.to_string()) +} + +#[cfg(feature = "std")] +fn deserialize_from_string<'de, D: Deserializer<'de>, T: std::str::FromStr>( + deserializer: D, +) -> Result { + let s = String::deserialize(deserializer)?; + s.parse::().map_err(|_| serde::de::Error::custom("Parse from string failed")) +} + +sp_api::decl_runtime_apis! { + pub trait XykApi where + Balance: Codec + MaybeDisplay + MaybeFromStr, + TokenId: Codec + MaybeDisplay + MaybeFromStr, + AccountId: Codec + MaybeDisplay + MaybeFromStr,{ + fn calculate_sell_price( + input_reserve: Balance, + output_reserve: Balance, + sell_amount: Balance + ) -> XYKRpcResult; + fn calculate_buy_price( + input_reserve: Balance, + output_reserve: Balance, + buy_amount: Balance + ) -> XYKRpcResult; + fn calculate_sell_price_id( + sold_token_id: TokenId, + bought_token_id: TokenId, + sell_amount: Balance + ) -> XYKRpcResult; + fn calculate_buy_price_id( + sold_token_id: TokenId, + bought_token_id: TokenId, + buy_amount: Balance + ) -> XYKRpcResult; + fn get_burn_amount( + first_asset_id: TokenId, + second_asset_id: TokenId, + liquidity_asset_amount: Balance, + ) -> RpcAmountsResult; + fn get_max_instant_burn_amount( + user: AccountId, + liquidity_asset_id: TokenId, + ) -> XYKRpcResult; + fn get_max_instant_unreserve_amount( + user: AccountId, + liquidity_asset_id: TokenId, + ) -> XYKRpcResult; + fn calculate_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + ) -> XYKRpcResult; + fn calculate_balanced_sell_amount( + total_amount: Balance, + reserve_amount: Balance, + ) -> XYKRpcResult; + fn get_liq_tokens_for_trading( + ) -> Vec; + fn is_buy_asset_lock_free( + path: sp_std::vec::Vec, + input_amount: Balance, + ) -> Option; + fn is_sell_asset_lock_free( + path: sp_std::vec::Vec, + input_amount: Balance, + ) -> Option; + fn get_tradeable_tokens() -> Vec>; + } +} From 9792895f15c104d0fd366edbc5a861fa4b3e9132 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 27 Sep 2023 12:55:37 +0000 Subject: [PATCH 022/125] renaming --- Cargo.lock | 1 + pallets/proof-of-stake/runtime-api/src/lib.rs | 115 ++----------- pallets/proof-of-stake/src/benchmarking.rs | 8 +- pallets/proof-of-stake/src/lib.rs | 149 +++++++++++----- pallets/proof-of-stake/src/mock.rs | 1 - pallets/proof-of-stake/src/tests.rs | 160 +++++++++--------- pallets/proof-of-stake/src/weights.rs | 26 ++- runtime/mangata-kusama/Cargo.toml | 2 + runtime/mangata-kusama/src/lib.rs | 30 +++- .../src/weights/pallet_proof_of_stake.rs | 41 +++++ 10 files changed, 291 insertions(+), 242 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b8d1058a6..b47f9a9963 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5031,6 +5031,7 @@ dependencies = [ "polkadot-parachain", "polkadot-primitives", "polkadot-runtime-common", + "proof-of-stake-runtime-api", "scale-info", "serde", "smallvec", diff --git a/pallets/proof-of-stake/runtime-api/src/lib.rs b/pallets/proof-of-stake/runtime-api/src/lib.rs index 9af1f6bfc2..812438f4bf 100644 --- a/pallets/proof-of-stake/runtime-api/src/lib.rs +++ b/pallets/proof-of-stake/runtime-api/src/lib.rs @@ -1,122 +1,29 @@ // Copyright (C) 2021 Mangata team #![cfg_attr(not(feature = "std"), no_std)] -#![allow(clippy::too_many_arguments)] -#![allow(clippy::unnecessary_mut_passed)] use codec::{Codec, Decode, Encode}; -#[cfg(feature = "std")] -use serde::{Deserialize, Deserializer, Serialize, Serializer}; use sp_runtime::traits::{MaybeDisplay, MaybeFromStr}; use sp_std::vec::Vec; -// Workaround for substrate/serde issue -#[derive(Eq, PartialEq, Encode, Decode, Default)] -#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] -pub struct XYKRpcResult { - #[cfg_attr(feature = "std", serde(bound(serialize = "Balance: std::fmt::Display")))] - #[cfg_attr(feature = "std", serde(serialize_with = "serialize_as_string"))] - #[cfg_attr(feature = "std", serde(bound(deserialize = "Balance: std::str::FromStr")))] - #[cfg_attr(feature = "std", serde(deserialize_with = "deserialize_from_string"))] - pub price: Balance, -} - -#[derive(Eq, PartialEq, Encode, Decode, Default)] -#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] -pub struct RpcAmountsResult { - #[cfg_attr(feature = "std", serde(bound(serialize = "Balance: std::fmt::Display")))] - #[cfg_attr(feature = "std", serde(serialize_with = "serialize_as_string"))] - #[cfg_attr(feature = "std", serde(bound(deserialize = "Balance: std::str::FromStr")))] - #[cfg_attr(feature = "std", serde(deserialize_with = "deserialize_from_string"))] - pub first_asset_amount: Balance, - #[cfg_attr(feature = "std", serde(bound(serialize = "Balance: std::fmt::Display")))] - #[cfg_attr(feature = "std", serde(serialize_with = "serialize_as_string"))] - #[cfg_attr(feature = "std", serde(bound(deserialize = "Balance: std::str::FromStr")))] - #[cfg_attr(feature = "std", serde(deserialize_with = "deserialize_from_string"))] - pub second_asset_amount: Balance, -} - -#[derive(Eq, PartialEq, Encode, Decode, Default)] -#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] -pub struct RpcAssetMetadata { - pub token_id: TokenId, - pub decimals: u32, - pub name: Vec, - pub symbol: Vec, -} - -#[cfg(feature = "std")] -fn serialize_as_string( - t: &T, - serializer: S, -) -> Result { - serializer.serialize_str(&t.to_string()) -} - -#[cfg(feature = "std")] -fn deserialize_from_string<'de, D: Deserializer<'de>, T: std::str::FromStr>( - deserializer: D, -) -> Result { - let s = String::deserialize(deserializer)?; - s.parse::().map_err(|_| serde::de::Error::custom("Parse from string failed")) -} sp_api::decl_runtime_apis! { - pub trait XykApi where + pub trait ProofOfStakeApi where Balance: Codec + MaybeDisplay + MaybeFromStr, TokenId: Codec + MaybeDisplay + MaybeFromStr, AccountId: Codec + MaybeDisplay + MaybeFromStr,{ - fn calculate_sell_price( - input_reserve: Balance, - output_reserve: Balance, - sell_amount: Balance - ) -> XYKRpcResult; - fn calculate_buy_price( - input_reserve: Balance, - output_reserve: Balance, - buy_amount: Balance - ) -> XYKRpcResult; - fn calculate_sell_price_id( - sold_token_id: TokenId, - bought_token_id: TokenId, - sell_amount: Balance - ) -> XYKRpcResult; - fn calculate_buy_price_id( - sold_token_id: TokenId, - bought_token_id: TokenId, - buy_amount: Balance - ) -> XYKRpcResult; - fn get_burn_amount( - first_asset_id: TokenId, - second_asset_id: TokenId, - liquidity_asset_amount: Balance, - ) -> RpcAmountsResult; - fn get_max_instant_burn_amount( + + fn calculate_native_rewards_amount( user: AccountId, liquidity_asset_id: TokenId, - ) -> XYKRpcResult; - fn get_max_instant_unreserve_amount( + ) -> Balance; + + fn calculate_3rdparty_rewards_amount( user: AccountId, liquidity_asset_id: TokenId, - ) -> XYKRpcResult; - fn calculate_rewards_amount( + reward_asset_id: TokenId, + ) -> Balance; + + fn calculate_3rdparty_rewards_amount_all( user: AccountId, liquidity_asset_id: TokenId, - ) -> XYKRpcResult; - fn calculate_balanced_sell_amount( - total_amount: Balance, - reserve_amount: Balance, - ) -> XYKRpcResult; - fn get_liq_tokens_for_trading( - ) -> Vec; - fn is_buy_asset_lock_free( - path: sp_std::vec::Vec, - input_amount: Balance, - ) -> Option; - fn is_sell_asset_lock_free( - path: sp_std::vec::Vec, - input_amount: Balance, - ) -> Option; - fn get_tradeable_tokens() -> Vec>; + ) -> Vec<(TokenId, Balance)>; } } diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 3582b8697d..78bf94e4df 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -159,7 +159,7 @@ benchmarks! { ) } - deactivate_liquidity{ + deactivate_liquidity_for_native_rewards{ // deactivate // 1 crate pool // 2 promote pool @@ -194,7 +194,7 @@ benchmarks! { forward_to_next_session::(); - }: deactivate_liquidity(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), quater_of_minted_liquidity.into()) + }: deactivate_liquidity_for_native_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), quater_of_minted_liquidity.into()) verify { assert_eq!( PoS::::get_rewards_info(caller.clone(), liquidity_asset_id).activated_amount, @@ -319,7 +319,7 @@ benchmarks! { ) } - deactivate_liquidity_for_rewards_schedule{ + deactivate_liquidity_for_native_rewards_for_rewards_schedule{ // 1 create pool that can be rewarded // 2 create token that is used as reward // 3 activate rewards @@ -388,7 +388,7 @@ benchmarks! { ); - }: deactivate_liquidity_for_rewards_schedule(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id) + }: deactivate_liquidity_for_native_rewards_for_rewards_schedule(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id) verify { assert!(TokensOf::::ensure_can_withdraw( diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 7bc6f04b0a..8eb471b919 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -30,13 +30,13 @@ //! - [`PromotedPoolRewards`] - Stores information about the total amount of rewards for each liquidity //! token. //! - [`RewardsInfo`] - Stores information about rewards for liquidity mining. -//! - [`ScheduleActivationKind`] - Wrapper over origin ActivateKind that is used in +//! - [`ThirdPartyActivationKind`] - Wrapper over origin ActivateKind that is used in //! //! #### Extrinsics //! //! - [`Pallet::activate_liquidity`] - Activates liquidity for liquidity mining rewards. -//! - [`Pallet::deactivate_liquidity`] - Deactivates liquidity for liquidity mining rewards. -//! - [`Pallet::claim_rewards_all`] - Claims all rewards for all liquidity tokens. +//! - [`Pallet::deactivate_liquidity_for_native_rewards`] - Deactivates liquidity for liquidity mining rewards. +//! - [`Pallet::claim_native_rewards`] - Claims all rewards for all liquidity tokens. //! - [`Pallet::update_pool_promotion`] - Enables/disables the pool for liquidity mining rewards. //! //! ### Scheduled Rewards @@ -66,9 +66,9 @@ //! #### Extrinsics //! //! - [`Pallet::reward_pool`] - Schedules rewards for the selected liquidity token. -//! - [`Pallet::activate_liquidity_for_rewards_schedule`] - Activates liquidity for scheduled rewards. -//! - [`Pallet::deactivate_liquidity_for_rewards_schedule`] - Deactivates liquidity for scheduled rewards. -//! - [`Pallet::claim_schedule_rewards_all`] - Claims all scheduled rewards for all liquidity tokens. +//! - [`Pallet::activate_liquidity_for_3rdparty_rewards`] - Activates liquidity for scheduled rewards. +//! - [`Pallet::deactivate_liquidity_for_3rdparty_rewards`] - Deactivates liquidity for scheduled rewards. +//! - [`Pallet::claim_3rdparty_rewards`] - Claims all scheduled rewards for all liquidity tokens. //! //! ## Reusing a Single Liquidity Token for Multiple Rewards //! @@ -81,14 +81,15 @@ //! several options to do that: //! //! - The user can reuse liquidity used for liquidity mining rewards to claim scheduled rewards. In -//! this case, [`Pallet::activate_liquidity_for_rewards_schedule`] should be used with [`ActivateKind::LiquidityMining`]. +//! this case, [`Pallet::activate_liquidity_for_3rdparty_rewards`] should be used with [`ActivateKind::LiquidityMining`]. //! -//! - The user can reuse liquidity used for scheduled rewards (X) to sign up for rewards from other tokens (provided by Bob). In that case, [`Pallet::activate_liquidity_for_rewards_schedule`] should be used with [`ActivateKind::ActivatedLiquidity(X)`]. +//! - The user can reuse liquidity used for scheduled rewards (X) to sign up for rewards from other tokens (provided by Bob). In that case, [`Pallet::activate_liquidity_for_3rdparty_rewards`] should be used with [`ActivateKind::ActivatedLiquidity(X)`]. //! //! - The user can't directly provide liquidity activated for scheduled rewards to activate it for liquidity mining rewards. Instead: -//! * Liquidity used for schedule rewards can be deactivated [`Pallet::deactivate_liquidity_for_rewards_schedule`]. +//! * Liquidity used for schedule rewards can be deactivated +//! [`Pallet::deactivate_liquidity_for_3rdparty_rewards`]. //! * Liquidity can be activated for liquidity mining rewards [`Pallet::activate_liquidity`]. -//! * Liquidity can be activated for scheduled rewards [`Pallet::activate_liquidity_for_rewards_schedule`] with [`ScheduleActivationKind::Mining`]. +//! * Liquidity can be activated for scheduled rewards [`Pallet::activate_liquidity_for_3rdparty_rewards`] with [`ThirdPartyActivationKind::Mining`]. use frame_support::pallet_prelude::*; @@ -155,7 +156,7 @@ type AccountIdOf = ::AccountId; /// - `ActivatedLiquidity` - already activated liquidity (for scheduled rewards) /// - `LiquidityMining` - already activated liquidity (for liquidity mining rewards) #[derive(Eq, PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] -pub enum ScheduleActivationKind { +pub enum ThirdPartyActivationKind { ActivateKind(Option), ActivatedLiquidity(TokenId), LiquidityMining, @@ -235,17 +236,8 @@ pub mod pallet { type RewardsSchedulesLimit: Get; /// The minimum number of rewards per session for schedule rewards type MinRewardsPerSession: Get; - /// The maximum number of reward tokens per pool - type MaxRewardTokensPerPool: Get; type WeightInfo: WeightInfo; type ValuationApi: ValutationApiTrait; - - // type ValuationApi: Valuate< - // Balance = mangata_types::Balance, - // CurrencyId = mangata_types::TokenId, - // >; - // #[cfg(feature = "runtime-benchmarks")] - // type Xyk: XykFunctionsTrait; } #[pallet::error] @@ -401,7 +393,8 @@ pub mod pallet { /// Claims liquidity mining rewards #[transactional] #[pallet::call_index(0)] - #[pallet::weight(<::WeightInfo>::claim_rewards_all())] + #[pallet::weight(<::WeightInfo>::claim_native_rewards())] + #[deprecated(note = "claim_native_rewards should be used instead")] pub fn claim_rewards_all( origin: OriginFor, liquidity_token_id: TokenId, @@ -446,6 +439,7 @@ pub mod pallet { #[transactional] #[pallet::call_index(2)] #[pallet::weight(<::WeightInfo>::activate_liquidity())] + #[deprecated(note = "activate_liquidity_for_native_rewards should be used instead")] pub fn activate_liquidity( origin: OriginFor, liquidity_token_id: TokenId, @@ -454,7 +448,7 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - Self::activate_liquidity_for_liquidity_minting( + Self::activate_liquidity_for_native_rewards_impl( sender, liquidity_token_id, amount, @@ -465,7 +459,8 @@ pub mod pallet { /// Decreases number of tokens used for liquidity mining purposes #[transactional] #[pallet::call_index(3)] - #[pallet::weight(<::WeightInfo>::deactivate_liquidity())] + #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_native_rewards())] + #[deprecated(note = "deactivate_liquidity_for_native_rewards should be used instead")] pub fn deactivate_liquidity( origin: OriginFor, liquidity_token_id: TokenId, @@ -473,7 +468,7 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - >::deactivate_liquidity( + Self::deactivate_liquidity_for_native_rewards_impl( sender, liquidity_token_id, amount, @@ -487,7 +482,6 @@ pub mod pallet { /// schedule_end). Distribution starts from the *next* session till `schedule_end`. #[transactional] #[pallet::call_index(4)] - // NOTE: implement benchmark #[pallet::weight(<::WeightInfo>::reward_pool())] pub fn reward_pool( origin: OriginFor, @@ -570,21 +564,21 @@ pub mod pallet { /// be taken from available balance #[transactional] #[pallet::call_index(5)] - #[pallet::weight(<::WeightInfo>::activate_liquidity_for_rewards_schedule())] - pub fn activate_liquidity_for_rewards_schedule( + #[pallet::weight(<::WeightInfo>::activate_liquidity_for_3rdparty_rewards())] + pub fn activate_liquidity_for_3rdparty_rewards( origin: OriginFor, liquidity_token_id: TokenId, amount: Balance, reward_token: TokenId, - use_balance_from: Option, + use_balance_from: Option, ) -> DispatchResult { let sender = ensure_signed(origin)?; - Self::activate_liquidity_for_schedule( + Self::activate_liquidity_for_3rdparty_rewards_impl( sender, liquidity_token_id, amount, - use_balance_from.unwrap_or(ScheduleActivationKind::ActivateKind(None)), + use_balance_from.unwrap_or(ThirdPartyActivationKind::ActivateKind(None)), reward_token, ) } @@ -597,8 +591,8 @@ pub mod pallet { /// - use_balance_from - where from tokens should be used #[transactional] #[pallet::call_index(6)] - #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_rewards_schedule())] - pub fn deactivate_liquidity_for_rewards_schedule( + #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_3rdparty_rewards())] + pub fn deactivate_liquidity_for_3rdparty_rewards( origin: OriginFor, liquidity_token_id: TokenId, amount: Balance, @@ -606,7 +600,7 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - Self::deactivate_liquidity_for_schedule( + Self::deactivate_liquidity_for_3rdparty_rewards_impl( sender, liquidity_token_id, amount, @@ -620,8 +614,8 @@ pub mod pallet { /// - reward_token - id of the token that is rewarded #[transactional] #[pallet::call_index(7)] - #[pallet::weight(<::WeightInfo>::activate_liquidity())] - pub fn claim_schedule_rewards_all( + #[pallet::weight(<::WeightInfo>::claim_3rdparty_rewards())] + pub fn claim_3rdparty_rewards( origin: OriginFor, liquidity_token_id: TokenId, reward_token: TokenId, @@ -631,6 +625,68 @@ pub mod pallet { Self::claim_schedule_rewards_all_impl(sender, liquidity_token_id, reward_token)?; Ok(()) } + + /// Increases number of tokens used for liquidity mining purposes. + /// + /// Parameters: + /// - liquidity_token_id - id of the token + /// - amount - amount of the token + /// - use_balance_from - where from tokens should be used + #[transactional] + #[pallet::call_index(8)] + #[pallet::weight(<::WeightInfo>::activate_liquidity())] + pub fn activate_liquidity_for_native_rewards( + origin: OriginFor, + liquidity_token_id: TokenId, + amount: Balance, + use_balance_from: Option, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + Self::activate_liquidity_for_native_rewards_impl( + sender, + liquidity_token_id, + amount, + use_balance_from, + ) + } + + /// Decreases number of tokens used for liquidity mining purposes + #[transactional] + #[pallet::call_index(9)] + #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_native_rewards())] + pub fn deactivate_liquidity_for_native_rewards( + origin: OriginFor, + liquidity_token_id: TokenId, + amount: Balance, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + Self::deactivate_liquidity_for_native_rewards_impl( + sender, + liquidity_token_id, + amount, + ) + } + + #[transactional] + #[pallet::call_index(10)] + #[pallet::weight(<::WeightInfo>::claim_native_rewards())] + #[deprecated(note = "claim_native_rewards should be used instead")] + pub fn claim_native_rewards( + origin: OriginFor, + liquidity_token_id: TokenId, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + + >::claim_rewards_all( + sender, + liquidity_token_id, + )?; + + Ok(()) + } + } } @@ -640,7 +696,7 @@ pub enum RewardsKind { } impl Pallet { - fn activate_liquidity_for_liquidity_minting( + fn activate_liquidity_for_native_rewards_impl( user: AccountIdOf, liquidity_asset_id: TokenId, amount: Balance, @@ -672,7 +728,7 @@ impl Pallet { Ok(()) } - fn deactivate_liquidity_for_liquidity_minting( + fn deactivate_liquidity_for_native_rewards_impl( user: AccountIdOf, liquidity_asset_id: TokenId, amount: Balance, @@ -688,18 +744,18 @@ impl Pallet { Ok(()) } - fn activate_liquidity_for_schedule( + fn activate_liquidity_for_3rdparty_rewards_impl( user: AccountIdOf, liquidity_asset_id: TokenId, amount: Balance, - use_balance_from: ScheduleActivationKind, + use_balance_from: ThirdPartyActivationKind, reward_token: TokenId, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; match use_balance_from { // 1R 1W - ScheduleActivationKind::ActivateKind(ref use_balance_from) => { + ThirdPartyActivationKind::ActivateKind(ref use_balance_from) => { ensure!( ::ActivationReservesProvider::can_activate( liquidity_asset_id, @@ -716,7 +772,7 @@ impl Pallet { ); }, // 2R - ScheduleActivationKind::ActivatedLiquidity(token_id) => { + ThirdPartyActivationKind::ActivatedLiquidity(token_id) => { let already_activated_amount = RewardsInfoForScheduleRewards::::get( user.clone(), (liquidity_asset_id, reward_token), @@ -732,7 +788,7 @@ impl Pallet { Error::::NotEnoughAssets ); }, - ScheduleActivationKind::LiquidityMining => { + ThirdPartyActivationKind::LiquidityMining => { let already_activated_amount = RewardsInfoForScheduleRewards::::get( user.clone(), (liquidity_asset_id, reward_token), @@ -755,7 +811,7 @@ impl Pallet { )?; match use_balance_from { - ScheduleActivationKind::ActivateKind(use_balance_from) => { + ThirdPartyActivationKind::ActivateKind(use_balance_from) => { println!("activate"); ::ActivationReservesProvider::activate( liquidity_asset_id, @@ -772,7 +828,7 @@ impl Pallet { Ok(()) } - fn deactivate_liquidity_for_schedule( + fn deactivate_liquidity_for_3rdparty_rewards_impl( user: AccountIdOf, liquidity_asset_id: TokenId, amount: Balance, @@ -1178,7 +1234,7 @@ impl ProofOfStakeRewardsApi for Pallet { amount: Self::Balance, use_balance_from: Option, ) -> DispatchResult { - Self::activate_liquidity_for_liquidity_minting( + Self::activate_liquidity_for_native_rewards_impl( user, liquidity_asset_id, amount, @@ -1191,7 +1247,7 @@ impl ProofOfStakeRewardsApi for Pallet { liquidity_asset_id: Self::CurrencyId, amount: Self::Balance, ) -> DispatchResult { - Self::deactivate_liquidity_for_liquidity_minting(user, liquidity_asset_id, amount) + Self::deactivate_liquidity_for_native_rewards_impl(user, liquidity_asset_id, amount) } fn calculate_rewards_amount( @@ -1307,3 +1363,4 @@ impl LiquidityMiningApi for Pallet { // TODO: clean up test setup // TODO: dedicated 3rdparty rewards api +// benchmark for claim 3rdparty rewards diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index a7541ee8a3..14aed844e8 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -286,7 +286,6 @@ impl pos::Config for Test { type RewardsDistributionPeriod = ConstU32<10>; type RewardsSchedulesLimit = ConstU32<10>; type MinRewardsPerSession = ConstU128<10>; - type MaxRewardTokensPerPool = ConstU32<5>; type WeightInfo = (); type ValuationApi = MockValuationApi; } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 82a4f99737..7f98c4a5ce 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -13,7 +13,7 @@ type TokensOf = ::Currency; fn mint_and_activate_tokens(who: AccountId, token_id: TokenId, amount: Balance) { TokensOf::::mint(token_id, &who, amount).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(who), token_id, amount, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(who), token_id, amount, None).unwrap(); } fn initialize_liquidity_rewards() { @@ -32,7 +32,7 @@ fn initialize_liquidity_rewards() { pools.get_mut(&4).unwrap().rewards = U256::from(0); }); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); } pub(crate) fn roll_to_session(n: u32) { @@ -75,7 +75,7 @@ fn liquidity_rewards_single_user_mint_W() { let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 2u8).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) .unwrap(); let rewards_info = ProofOfStake::get_rewards_info(2, 4); @@ -144,7 +144,7 @@ fn liquidity_rewards_three_users_burn_W() { TokensOf::::transfer(1, &2, &4, 1000000, ExistenceRequirement::AllowDeath).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) .unwrap(); forward_to_block(100); @@ -156,7 +156,7 @@ fn liquidity_rewards_three_users_burn_W() { mint_and_activate_tokens(4, 4, 10000); forward_to_block(240); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(4), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 5000).unwrap(); forward_to_block(400); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 95965); @@ -189,14 +189,14 @@ fn liquidity_rewards_claim_W() { TokensOf::::create(&acc_id, 10000).unwrap(); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) .unwrap(); forward_to_block(10); forward_to_block(90); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 12142); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); forward_to_block(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 2562); @@ -260,7 +260,7 @@ fn liquidity_rewards_work_after_burn_W() { TokensOf::::transfer(1, &2, &4, 1000000, ExistenceRequirement::AllowDeath).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) .unwrap(); forward_to_block(100); @@ -272,7 +272,7 @@ fn liquidity_rewards_work_after_burn_W() { mint_and_activate_tokens(4, 4, 10000); forward_to_block(240); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(4), 4, 10000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 10000).unwrap(); forward_to_block(400); assert_eq!(ProofOfStake::calculate_rewards_amount(4, 4).unwrap(), 948); @@ -301,7 +301,7 @@ fn liquidity_rewards_deactivate_transfer_controled_W() { let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) .unwrap(); assert_err!( TokensOf::::transfer(4, &2, &3, 10, ExistenceRequirement::AllowDeath), @@ -311,7 +311,7 @@ fn liquidity_rewards_deactivate_transfer_controled_W() { forward_to_block(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 14704); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned) + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned) .unwrap(); TokensOf::::transfer(4, &2, &3, 10, ExistenceRequirement::AllowDeath).unwrap(); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 14704); @@ -335,10 +335,10 @@ fn liquidity_rewards_deactivate_more_NW() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) .unwrap(); assert_err!( - ProofOfStake::deactivate_liquidity( + ProofOfStake::deactivate_liquidity_for_native_rewards( RuntimeOrigin::signed(2), 4, liquidity_tokens_owned + 1 @@ -366,7 +366,7 @@ fn liquidity_rewards_activate_more_NW() { let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); assert_err!( - ProofOfStake::activate_liquidity( + ProofOfStake::activate_liquidity_for_native_rewards( RuntimeOrigin::signed(2), 4, liquidity_tokens_owned + 1, @@ -409,7 +409,7 @@ fn liquidity_rewards_claim_pool_not_promoted() { TokensOf::::create(&acc_id, amount).unwrap(); assert_err!( - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 7), + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 7), Error::::NotAPromotedPool, ); }); @@ -452,25 +452,25 @@ fn liquidity_rewards_not_yet_claimed_already_claimed_W() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) .unwrap(); forward_to_block(10); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 291); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned) + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned) .unwrap(); let rewards_info = ProofOfStake::get_rewards_info(2, 4); assert_eq!(rewards_info.rewards_not_yet_claimed, 291); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) .unwrap(); forward_to_block(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 12433); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); let rewards_info = ProofOfStake::get_rewards_info(2, 4); assert_eq!(rewards_info.rewards_already_claimed, 12142); @@ -493,7 +493,7 @@ fn extreme_case_pool_ratio() { TokensOf::::create(&acc_id, max).unwrap(); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 1, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 1, None).unwrap(); PromotedPoolRewards::::mutate(|pools| { pools.get_mut(&4).unwrap().rewards = U256::from(u128::MAX) * U256::from(u128::MAX); @@ -630,7 +630,7 @@ fn rewards_storage_right_amounts_start1() { TokensOf::::transfer(2, &2, &5, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(1, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(2, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); mint_and_activate_tokens(3, 4, 10000); mint_and_activate_tokens(4, 4, 10000); mint_and_activate_tokens(5, 4, 10000); @@ -642,11 +642,11 @@ fn rewards_storage_right_amounts_start1() { PromotedPoolRewards::::get().get(&4).unwrap().rewards ); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(3), 4).unwrap(); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(4), 4).unwrap(); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(5), 4).unwrap(); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(6), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(3), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(4), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(5), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(6), 4).unwrap(); let mut rewards_info = ProofOfStake::get_rewards_info(2, 4); assert_eq!(rewards_info.rewards_not_yet_claimed, 0); @@ -676,7 +676,7 @@ fn rewards_storage_right_amounts_start1() { // usecase 3 claim (all) let mut user_balance_before = TokensOf::::free_balance(0, &2); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); let mut user_balance_after = TokensOf::::free_balance(0, &2); rewards_info = ProofOfStake::get_rewards_info(2, 4); @@ -687,7 +687,7 @@ fn rewards_storage_right_amounts_start1() { // usecase 6 burn some user_balance_before = TokensOf::::free_balance(0, &3); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(3), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000).unwrap(); user_balance_after = TokensOf::::free_balance(0, &3); rewards_info = ProofOfStake::get_rewards_info(3, 4); @@ -710,7 +710,7 @@ fn rewards_storage_right_amounts_start1() { // usecase 8 deactivate some user_balance_before = TokensOf::::free_balance(0, &5); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(5), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000).unwrap(); user_balance_after = TokensOf::::free_balance(0, &5); rewards_info = ProofOfStake::get_rewards_info(5, 4); @@ -721,7 +721,7 @@ fn rewards_storage_right_amounts_start1() { // usecase 16 claim some user_balance_before = TokensOf::::free_balance(0, &6); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(6), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(6), 4).unwrap(); user_balance_after = TokensOf::::free_balance(0, &6); rewards_info = ProofOfStake::get_rewards_info(6, 4); @@ -767,7 +767,7 @@ fn rewards_storage_right_amounts_start2() { TokensOf::::transfer(2, &2, &5, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(1, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(2, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); mint_and_activate_tokens(3, 4, 10000); mint_and_activate_tokens(4, 4, 10000); mint_and_activate_tokens(5, 4, 10000); @@ -778,10 +778,10 @@ fn rewards_storage_right_amounts_start2() { PromotedPoolRewards::::get().get(&4).unwrap().rewards ); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(2), 4, 5000).unwrap(); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(3), 4, 5000).unwrap(); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(4), 4, 5000).unwrap(); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(5), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000).unwrap(); forward_to_block_with_custom_rewards(200, 20000); //its really weird that rewards are //decreased from 40k to 20k in single @@ -812,7 +812,7 @@ fn rewards_storage_right_amounts_start2() { // usecase 2 claim_all let mut user_balance_before = TokensOf::::free_balance(0, &2); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); let mut user_balance_after = TokensOf::::free_balance(0, &2); rewards_info = ProofOfStake::get_rewards_info(2, 4); @@ -823,7 +823,7 @@ fn rewards_storage_right_amounts_start2() { // usecase 9 burn some user_balance_before = TokensOf::::free_balance(0, &3); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(3), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000).unwrap(); user_balance_after = TokensOf::::free_balance(0, &3); rewards_info = ProofOfStake::get_rewards_info(3, 4); @@ -845,7 +845,7 @@ fn rewards_storage_right_amounts_start2() { // usecase 11 deactivate some user_balance_before = TokensOf::::free_balance(0, &5); - ProofOfStake::deactivate_liquidity(RuntimeOrigin::signed(5), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000).unwrap(); user_balance_after = TokensOf::::free_balance(0, &5); rewards_info = ProofOfStake::get_rewards_info(5, 4); @@ -888,7 +888,7 @@ fn rewards_storage_right_amounts_start3() { TokensOf::::transfer(1, &2, &4, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(2, &2, &4, 20010, ExistenceRequirement::AllowDeath).unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); mint_and_activate_tokens(3, 4, 10000); forward_to_block_with_custom_rewards(100, 20000); @@ -907,7 +907,7 @@ fn rewards_storage_right_amounts_start3() { // usecase 1 claim (all) let mut user_balance_before = TokensOf::::free_balance(0, &2); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); let mut user_balance_after = TokensOf::::free_balance(0, &2); rewards_info = ProofOfStake::get_rewards_info(2, 4); @@ -918,7 +918,7 @@ fn rewards_storage_right_amounts_start3() { // usecase 17 claim some user_balance_before = TokensOf::::free_balance(0, &3); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(3), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(3), 4).unwrap(); user_balance_after = TokensOf::::free_balance(0, &3); rewards_info = ProofOfStake::get_rewards_info(3, 4); @@ -965,13 +965,13 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { ) .unwrap(); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(3), 4, liquidity_tokens_owned, None) + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, liquidity_tokens_owned, None) .unwrap(); forward_to_block(100); assert_eq!(ProofOfStake::calculate_rewards_amount(3, 4).unwrap(), 14704); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(3), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(3), 4).unwrap(); }); } @@ -1022,7 +1022,7 @@ fn test_migrated_from_pallet_issuance() { assert_eq!(1, TokensOf::::create(&99999, 1_000_000u128).unwrap()); ProofOfStake::enable(1, 1u8); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(99999), 1, 1, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(99999), 1, 1, None).unwrap(); roll_to_while_minting(4, None); assert_eq!( @@ -1037,7 +1037,7 @@ fn test_migrated_from_pallet_issuance() { assert_eq!(2, TokensOf::::create(&99999, 1_000_000u128).unwrap()); ProofOfStake::enable(2, 1u8); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(99999), 2, 1, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(99999), 2, 1, None).unwrap(); roll_to_while_minting(14, None); assert_eq!( U256::from_dec_str("191427546923208537313638702283778366195067525").unwrap(), @@ -1085,7 +1085,7 @@ fn claim_rewards_from_pool_that_has_been_disabled() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) .unwrap(); forward_to_block(10); @@ -1094,7 +1094,7 @@ fn claim_rewards_from_pool_that_has_been_disabled() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 0u8).unwrap(); - ProofOfStake::claim_rewards_all(RuntimeOrigin::signed(2), 4).unwrap(); + ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 0); }); @@ -1452,7 +1452,7 @@ fn user_can_claim_3rdparty_rewards() { .unwrap(); roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -1466,7 +1466,7 @@ fn user_can_claim_3rdparty_rewards() { ); roll_to_session(2); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, @@ -1533,7 +1533,7 @@ fn overlapping_3rdparty_rewards_works() { .unwrap(); roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -1552,7 +1552,7 @@ fn overlapping_3rdparty_rewards_works() { 15u32.into(), ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -1608,7 +1608,7 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { .unwrap(); roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -1627,12 +1627,12 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, SECOND_REWARD_TOKEN, - Some(ScheduleActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), ) .unwrap(); @@ -1683,7 +1683,7 @@ fn deactivate_3rdparty_rewards() { .unwrap(); roll_to_session(1); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -1692,7 +1692,7 @@ fn deactivate_3rdparty_rewards() { ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, @@ -1716,7 +1716,7 @@ fn deactivate_3rdparty_rewards() { ), Ok(500) ); - ProofOfStake::deactivate_liquidity_for_rewards_schedule( + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, @@ -1775,7 +1775,7 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -1783,12 +1783,12 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { None, ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, SECOND_REWARD_TOKEN, - Some(ScheduleActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), ) .unwrap(); @@ -1864,19 +1864,19 @@ fn liquidity_minting_liquidity_can_be_resused() { ) .unwrap(); - ProofOfStake::activate_liquidity( + ProofOfStake::activate_liquidity_for_native_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, None, ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, FIRST_REWARD_TOKEN, - Some(ScheduleActivationKind::LiquidityMining), + Some(ThirdPartyActivationKind::LiquidityMining), ) .unwrap(); @@ -1928,7 +1928,7 @@ fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { ) .unwrap(); - ProofOfStake::activate_liquidity( + ProofOfStake::activate_liquidity_for_native_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -1946,17 +1946,17 @@ fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { orml_tokens::Error::::BalanceTooLow ); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, FIRST_REWARD_TOKEN, - Some(ScheduleActivationKind::LiquidityMining), + Some(ThirdPartyActivationKind::LiquidityMining), ) .unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -1965,7 +1965,7 @@ fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { ) .unwrap(); - ProofOfStake::deactivate_liquidity_for_rewards_schedule( + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 200, @@ -2028,7 +2028,7 @@ fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -2037,12 +2037,12 @@ fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, SECOND_REWARD_TOKEN, - Some(ScheduleActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), ) .unwrap(); @@ -2056,7 +2056,7 @@ fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() ), orml_tokens::Error::::BalanceTooLow ); - ProofOfStake::deactivate_liquidity_for_rewards_schedule( + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -2073,7 +2073,7 @@ fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() ), orml_tokens::Error::::BalanceTooLow ); - ProofOfStake::deactivate_liquidity_for_rewards_schedule( + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -2125,7 +2125,7 @@ fn can_claim_schedule_rewards() { 10u32.into(), ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -2133,12 +2133,12 @@ fn can_claim_schedule_rewards() { None, ) .unwrap(); - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, SECOND_REWARD_TOKEN, - Some(ScheduleActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), + Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), ) .unwrap(); @@ -2147,14 +2147,14 @@ fn can_claim_schedule_rewards() { assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 0,); assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 0,); - ProofOfStake::claim_schedule_rewards_all( + ProofOfStake::claim_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, ) .unwrap(); - ProofOfStake::claim_schedule_rewards_all( + ProofOfStake::claim_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, @@ -2201,7 +2201,7 @@ fn can_not_provide_liquidity_for_schedule_rewards_when_its_only_activated_for_li .unwrap(); assert_err!( - ProofOfStake::activate_liquidity_for_rewards_schedule( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, @@ -2238,7 +2238,7 @@ fn can_not_provide_liquidity_for_mining_rewards_when_its_only_activated_for_sche .unwrap(); assert_err!( - ProofOfStake::activate_liquidity( + ProofOfStake::activate_liquidity_for_native_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, diff --git a/pallets/proof-of-stake/src/weights.rs b/pallets/proof-of-stake/src/weights.rs index 024cc3133e..9c350e9331 100644 --- a/pallets/proof-of-stake/src/weights.rs +++ b/pallets/proof-of-stake/src/weights.rs @@ -56,11 +56,13 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_proof_of_stake. pub trait WeightInfo { fn claim_rewards_all() -> Weight; + fn claim_native_rewards() -> Weight; + fn claim_3rdparty_rewards() -> Weight; fn update_pool_promotion() -> Weight; fn activate_liquidity() -> Weight; - fn deactivate_liquidity() -> Weight; - fn deactivate_liquidity_for_rewards_schedule() -> Weight; - fn activate_liquidity_for_rewards_schedule() -> Weight; + fn deactivate_liquidity_for_native_rewards() -> Weight; + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; + fn activate_liquidity_for_3rdparty_rewards() -> Weight; fn reward_pool() -> Weight; } @@ -95,19 +97,19 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) // Storage: Tokens Accounts (r:1 w:1) - fn deactivate_liquidity() -> Weight { + fn deactivate_liquidity_for_native_rewards() -> Weight{ (Weight::from_parts(118_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - fn deactivate_liquidity_for_rewards_schedule() -> Weight { + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { (Weight::from_parts(118_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - fn activate_liquidity_for_rewards_schedule() -> Weight { + fn activate_liquidity_for_3rdparty_rewards() -> Weight { (Weight::from_parts(118_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -118,4 +120,16 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn claim_native_rewards() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } } diff --git a/runtime/mangata-kusama/Cargo.toml b/runtime/mangata-kusama/Cargo.toml index 9c6ca2cd7d..041c170072 100644 --- a/runtime/mangata-kusama/Cargo.toml +++ b/runtime/mangata-kusama/Cargo.toml @@ -32,6 +32,7 @@ pallet-multipurpose-liquidity = { path = '../../pallets/multipurpose-liquidity', pallet-maintenance = { path = '../../pallets/maintenance', default-features = false } pallet-fee-lock = { path = '../../pallets/fee-lock', default-features = false} mangata-support = { default-features = false , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +proof-of-stake-runtime-api = { path = '../../pallets/proof-of-stake/runtime-api', default-features = false} # Substrate Dependencies ## Substrate Primitive Dependencies @@ -169,6 +170,7 @@ std = [ "pallet-treasury/std", "pallet-xyk/std", "pallet-proof-of-stake/std", + "proof-of-stake-runtime-api/std", "pallet-bootstrap/std", "xyk-runtime-api/std", "parachain-staking/std", diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index 92625d101f..29649cbaea 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -274,10 +274,14 @@ impl pallet_proof_of_stake::Config for Runtime { type ActivationReservesProvider = MultiPurposeLiquidity; type NativeCurrencyId = tokens::MgxTokenId; type Currency = orml_tokens::MultiTokenCurrencyAdapter; - //TODO: fix type LiquidityMiningIssuanceVault = cfg::pallet_issuance::LiquidityMiningIssuanceVault; type RewardsDistributionPeriod = cfg::SessionLenghtOf; type WeightInfo = weights::pallet_proof_of_stake_weights::ModuleWeight; + // TODO: allign + type RewardsSchedulesLimit = frame_support::traits::ConstU32<10>; + type MinRewardsPerSession = frame_support::traits::ConstU128<10>; + type MaxRewardTokensPerPool = frame_support::traits::ConstU32<5>; + type ValuationApi = Xyk; } impl pallet_bootstrap::BootstrapBenchmarkingConfig for Runtime {} @@ -768,6 +772,30 @@ mod benches { impl_runtime_apis! { + impl proof_of_stake_runtime_api::ProofOfStakeApi for Runtime{ + fn calculate_native_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + ) -> Balance{ + todo!(); + } + + fn calculate_3rdparty_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + reward_asset_id: TokenId, + ) -> Balance{ + todo!(); + } + + fn calculate_3rdparty_rewards_amount_all( + user: AccountId, + liquidity_asset_id: TokenId, + ) -> Vec<(TokenId, Balance)>{ + todo!(); + } + } + impl ver_api::VerApi for Runtime { fn get_signer( tx: ::Extrinsic, diff --git a/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs b/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs index d7f3024fd8..d799da4557 100644 --- a/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs +++ b/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs @@ -60,6 +60,9 @@ pub trait WeightInfo { fn update_pool_promotion() -> Weight; fn activate_liquidity() -> Weight; fn deactivate_liquidity() -> Weight; + fn deactivate_liquidity_for_rewards_schedule() -> Weight; + fn activate_liquidity_for_rewards_schedule() -> Weight; + fn reward_pool() -> Weight; } /// Weights for pallet_proof_of_stake using the Mangata node and recommended hardware. @@ -113,6 +116,25 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + + + fn deactivate_liquidity_for_rewards_schedule() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn activate_liquidity_for_rewards_schedule() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn reward_pool() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } } // For backwards compatibility and tests @@ -165,4 +187,23 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + + fn deactivate_liquidity_for_rewards_schedule() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn activate_liquidity_for_rewards_schedule() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn reward_pool() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + } From eca4e5a47dea4f38c88bd2a13f1d78256323b4f7 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 27 Sep 2023 13:58:06 +0000 Subject: [PATCH 023/125] runtime compiles --- pallets/proof-of-stake/runtime-api/src/lib.rs | 2 +- pallets/proof-of-stake/src/lib.rs | 58 ++++++++++++------- pallets/proof-of-stake/src/weights.rs | 13 +---- runtime/mangata-kusama/src/lib.rs | 13 +++-- .../src/weights/pallet_proof_of_stake.rs | 50 +++++++++++----- 5 files changed, 83 insertions(+), 53 deletions(-) diff --git a/pallets/proof-of-stake/runtime-api/src/lib.rs b/pallets/proof-of-stake/runtime-api/src/lib.rs index 812438f4bf..6f0012f1db 100644 --- a/pallets/proof-of-stake/runtime-api/src/lib.rs +++ b/pallets/proof-of-stake/runtime-api/src/lib.rs @@ -21,7 +21,7 @@ sp_api::decl_runtime_apis! { reward_asset_id: TokenId, ) -> Balance; - fn calculate_3rdparty_rewards_amount_all( + fn calculate_3rdparty_rewards_all( user: AccountId, liquidity_asset_id: TokenId, ) -> Vec<(TokenId, Balance)>; diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 8eb471b919..721aa4aaa5 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -438,7 +438,7 @@ pub mod pallet { /// - use_balance_from - where from tokens should be used #[transactional] #[pallet::call_index(2)] - #[pallet::weight(<::WeightInfo>::activate_liquidity())] + #[pallet::weight(<::WeightInfo>::activate_liquidity_for_native_rewards())] #[deprecated(note = "activate_liquidity_for_native_rewards should be used instead")] pub fn activate_liquidity( origin: OriginFor, @@ -634,7 +634,7 @@ pub mod pallet { /// - use_balance_from - where from tokens should be used #[transactional] #[pallet::call_index(8)] - #[pallet::weight(<::WeightInfo>::activate_liquidity())] + #[pallet::weight(<::WeightInfo>::activate_liquidity_for_native_rewards())] pub fn activate_liquidity_for_native_rewards( origin: OriginFor, liquidity_token_id: TokenId, @@ -728,6 +728,30 @@ impl Pallet { Ok(()) } + pub fn calculate_native_rewards_amount( + user: AccountIdOf, + liquidity_asset_id: TokenId, + ) -> Result { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + let rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) + .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; + + let current_rewards = match rewards_info.activated_amount { + 0 => 0u128, + _ => { + let calc = + RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; + calc.calculate_rewards().map_err(|err| Into::>::into(err))? + }, + }; + + Ok(current_rewards + .checked_add(rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(rewards_info.rewards_already_claimed)) + .ok_or(Error::::CalculateRewardsMathError)?) + } + + fn deactivate_liquidity_for_native_rewards_impl( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -850,7 +874,16 @@ impl Pallet { Ok(()) } - fn calculate_rewards_amount_3rdparty( + pub fn calculate_3rdparty_rewards_all( + user: AccountIdOf, + liquidity_asset_id: TokenId, + ) -> Result, DispatchError> { + Self::ensure_is_promoted_pool(liquidity_asset_id)?; + todo!(); + + } + + pub fn calculate_rewards_amount_3rdparty( user: AccountIdOf, liquidity_asset_id: TokenId, rewards_asset_id: TokenId, @@ -1254,23 +1287,9 @@ impl ProofOfStakeRewardsApi for Pallet { user: AccountIdOf, liquidity_asset_id: TokenId, ) -> Result { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; - let rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) - .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; - let current_rewards = match rewards_info.activated_amount { - 0 => 0u128, - _ => { - let calc = - RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; - calc.calculate_rewards().map_err(|err| Into::>::into(err))? - }, - }; + Self::calculate_native_rewards_amount(user, liquidity_asset_id) - Ok(current_rewards - .checked_add(rewards_info.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(rewards_info.rewards_already_claimed)) - .ok_or(Error::::CalculateRewardsMathError)?) } } @@ -1361,6 +1380,5 @@ impl LiquidityMiningApi for Pallet { } } -// TODO: clean up test setup -// TODO: dedicated 3rdparty rewards api // benchmark for claim 3rdparty rewards +// limit min total amount of rewards not per session diff --git a/pallets/proof-of-stake/src/weights.rs b/pallets/proof-of-stake/src/weights.rs index 9c350e9331..7e015e5147 100644 --- a/pallets/proof-of-stake/src/weights.rs +++ b/pallets/proof-of-stake/src/weights.rs @@ -55,11 +55,10 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_proof_of_stake. pub trait WeightInfo { - fn claim_rewards_all() -> Weight; fn claim_native_rewards() -> Weight; fn claim_3rdparty_rewards() -> Weight; fn update_pool_promotion() -> Weight; - fn activate_liquidity() -> Weight; + fn activate_liquidity_for_native_rewards() -> Weight; fn deactivate_liquidity_for_native_rewards() -> Weight; fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; fn activate_liquidity_for_3rdparty_rewards() -> Weight; @@ -68,14 +67,6 @@ pub trait WeightInfo { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Storage: Tokens Accounts (r:2 w:2) - fn claim_rewards_all() -> Weight { - (Weight::from_parts(97_590_000, 0)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) - } // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) fn update_pool_promotion() -> Weight { (Weight::from_parts(52_090_000, 0)) @@ -87,7 +78,7 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Storage: ProofOfStake RewardsInfo (r:1 w:1) // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - fn activate_liquidity() -> Weight { + fn activate_liquidity_for_native_rewards() -> Weight { (Weight::from_parts(116_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index 29649cbaea..45a3365995 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -280,7 +280,6 @@ impl pallet_proof_of_stake::Config for Runtime { // TODO: allign type RewardsSchedulesLimit = frame_support::traits::ConstU32<10>; type MinRewardsPerSession = frame_support::traits::ConstU128<10>; - type MaxRewardTokensPerPool = frame_support::traits::ConstU32<5>; type ValuationApi = Xyk; } @@ -534,7 +533,6 @@ impl pallet_issuance::Config for Runtime { type RuntimeEvent = RuntimeEvent; type NativeCurrencyId = tokens::MgxTokenId; type Tokens = orml_tokens::MultiTokenCurrencyAdapter; - //TODO type BlocksPerRound = cfg::parachain_staking::BlocksPerRound; type HistoryLimit = cfg::pallet_issuance::HistoryLimit; type LiquidityMiningIssuanceVault = cfg::pallet_issuance::LiquidityMiningIssuanceVault; @@ -777,7 +775,8 @@ impl_runtime_apis! { user: AccountId, liquidity_asset_id: TokenId, ) -> Balance{ - todo!(); + ProofOfStake::calculate_native_rewards_amount(user, liquidity_asset_id) + .unwrap_or_default() } fn calculate_3rdparty_rewards_amount( @@ -785,14 +784,16 @@ impl_runtime_apis! { liquidity_asset_id: TokenId, reward_asset_id: TokenId, ) -> Balance{ - todo!(); + ProofOfStake::calculate_rewards_amount_3rdparty(user, liquidity_asset_id, reward_asset_id) + .unwrap_or_default() } - fn calculate_3rdparty_rewards_amount_all( + fn calculate_3rdparty_rewards_all( user: AccountId, liquidity_asset_id: TokenId, ) -> Vec<(TokenId, Balance)>{ - todo!(); + ProofOfStake::calculate_3rdparty_rewards_all(user, liquidity_asset_id) + .unwrap_or_default() } } diff --git a/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs b/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs index d799da4557..99a6a2573d 100644 --- a/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs +++ b/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs @@ -56,12 +56,13 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_proof_of_stake. pub trait WeightInfo { - fn claim_rewards_all() -> Weight; + fn claim_native_rewards() -> Weight; + fn claim_3rdparty_rewards() -> Weight; fn update_pool_promotion() -> Weight; - fn activate_liquidity() -> Weight; - fn deactivate_liquidity() -> Weight; - fn deactivate_liquidity_for_rewards_schedule() -> Weight; - fn activate_liquidity_for_rewards_schedule() -> Weight; + fn activate_liquidity_for_native_rewards() -> Weight; + fn deactivate_liquidity_for_native_rewards() -> Weight; + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; + fn activate_liquidity_for_3rdparty_rewards() -> Weight; fn reward_pool() -> Weight; } @@ -74,7 +75,13 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_rewards_all() -> Weight { + fn claim_native_rewards() -> Weight { + (Weight::from_parts(81_410_000, 0)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } + + fn claim_3rdparty_rewards() -> Weight { (Weight::from_parts(81_410_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) @@ -96,7 +103,7 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - fn activate_liquidity() -> Weight { + fn activate_liquidity_for_native_rewards() -> Weight { (Weight::from_parts(94_130_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -111,20 +118,20 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn deactivate_liquidity() -> Weight { + fn deactivate_liquidity_for_native_rewards() -> Weight { (Weight::from_parts(82_600_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - fn deactivate_liquidity_for_rewards_schedule() -> Weight { + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { (Weight::from_parts(118_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - fn activate_liquidity_for_rewards_schedule() -> Weight { + fn activate_liquidity_for_3rdparty_rewards() -> Weight { (Weight::from_parts(118_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -145,11 +152,24 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_rewards_all() -> Weight { + fn claim_native_rewards() -> Weight { (Weight::from_parts(81_410_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } + + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfo (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(81_410_000, 0)) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn update_pool_promotion() -> Weight { @@ -167,7 +187,7 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - fn activate_liquidity() -> Weight { + fn activate_liquidity_for_native_rewards() -> Weight { (Weight::from_parts(94_130_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -182,19 +202,19 @@ impl WeightInfo for () { // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn deactivate_liquidity() -> Weight { + fn deactivate_liquidity_for_native_rewards() -> Weight { (Weight::from_parts(82_600_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - fn deactivate_liquidity_for_rewards_schedule() -> Weight { + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { (Weight::from_parts(118_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - fn activate_liquidity_for_rewards_schedule() -> Weight { + fn activate_liquidity_for_3rdparty_rewards() -> Weight { (Weight::from_parts(118_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) From e20091aa91be79d35ef03acc058ac0a026591f0e Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 27 Sep 2023 14:58:27 +0000 Subject: [PATCH 024/125] align runtime configs --- Cargo.lock | 1 + pallets/proof-of-stake/src/lib.rs | 12 +-- pallets/proof-of-stake/src/mock.rs | 5 +- pallets/proof-of-stake/src/tests.rs | 2 +- runtime/common/src/lib.rs | 11 +++ runtime/mangata-kusama/src/lib.rs | 5 +- runtime/mangata-rococo/Cargo.toml | 2 + runtime/mangata-rococo/src/lib.rs | 31 ++++++++ .../src/weights/pallet_proof_of_stake.rs | 79 ++++++++++++++++--- 9 files changed, 126 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b47f9a9963..4cb285b114 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5222,6 +5222,7 @@ dependencies = [ "polkadot-parachain", "polkadot-primitives", "polkadot-runtime-common", + "proof-of-stake-runtime-api", "scale-info", "serde", "smallvec", diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 721aa4aaa5..2a6aa0b241 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -235,7 +235,7 @@ pub mod pallet { /// The maximum number of schedules that can be active at one moment type RewardsSchedulesLimit: Get; /// The minimum number of rewards per session for schedule rewards - type MinRewardsPerSession: Get; + type Min3rdPartyRewards: Get; type WeightInfo: WeightInfo; type ValuationApi: ValutationApiTrait; } @@ -266,7 +266,7 @@ pub mod pallet { /// Too many schedules TooManySchedules, /// Too little rewards per session - TooLittleRewardsPerSession, + TooLittleRewards, /// Reward token not paired with native token RewardTokenNotPairdWithNativeToken, } @@ -515,10 +515,10 @@ pub mod pallet { ensure!( ::ValuationApi::valuate_liquidity_token(liquidity_token_id, amount) >= - T::MinRewardsPerSession::get() || + T::Min3rdPartyRewards::get() || ((token_id == Into::::into(Self::native_token_id())) && - amount_per_session >= T::MinRewardsPerSession::get()), - Error::::TooLittleRewardsPerSession + amount_per_session >= T::Min3rdPartyRewards::get()), + Error::::TooLittleRewards ); RewardTokensPerPool::::insert(liquidity_token_id, token_id, ()); @@ -1381,4 +1381,4 @@ impl LiquidityMiningApi for Pallet { } // benchmark for claim 3rdparty rewards -// limit min total amount of rewards not per session +// move runtime configs to common runtime diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 14aed844e8..cd50e1cce0 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -285,7 +285,7 @@ impl pos::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10>; type RewardsSchedulesLimit = ConstU32<10>; - type MinRewardsPerSession = ConstU128<10>; + type Min3rdPartyRewards = ConstU128<10>; type WeightInfo = (); type ValuationApi = MockValuationApi; } @@ -299,8 +299,7 @@ impl pos::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10>; type RewardsSchedulesLimit = ConstU32<10>; - type MinRewardsPerSession = ConstU128<10>; - type MaxRewardTokensPerPool = ConstU32<5>; + type Min3rdPartyRewards = ConstU128<10>; type WeightInfo = (); type ValuationApi = Xyk; } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 7f98c4a5ce..7cc1d4faa9 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1389,7 +1389,7 @@ fn reject_schedule_with_too_little_rewards_per_session() { 1, 5u32.into() ), - Error::::TooLittleRewardsPerSession + Error::::TooLittleRewards ); }); } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 69c8dd3170..8b749ad82c 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1366,4 +1366,15 @@ where pub const AnnouncementDepositFactor: Balance = deposit(0, 68); } } + + pub mod pallet_proof_of_stake { + use super::*; + + parameter_types! { + pub const RewardsSchedulesLimit: u32 = 150; + // TODO: allign properly + pub const Min3rdPartyRewards: u128 = 100 * 30_000 * currency::DOLLARS; + } + } + } diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index 45a3365995..49585e9692 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -277,9 +277,8 @@ impl pallet_proof_of_stake::Config for Runtime { type LiquidityMiningIssuanceVault = cfg::pallet_issuance::LiquidityMiningIssuanceVault; type RewardsDistributionPeriod = cfg::SessionLenghtOf; type WeightInfo = weights::pallet_proof_of_stake_weights::ModuleWeight; - // TODO: allign - type RewardsSchedulesLimit = frame_support::traits::ConstU32<10>; - type MinRewardsPerSession = frame_support::traits::ConstU128<10>; + type RewardsSchedulesLimit = cfg::pallet_proof_of_stake::RewardsSchedulesLimit; + type Min3rdPartyRewards = cfg::pallet_proof_of_stake::Min3rdPartyRewards; type ValuationApi = Xyk; } diff --git a/runtime/mangata-rococo/Cargo.toml b/runtime/mangata-rococo/Cargo.toml index 4d78499f5d..d93243be28 100644 --- a/runtime/mangata-rococo/Cargo.toml +++ b/runtime/mangata-rococo/Cargo.toml @@ -32,6 +32,7 @@ pallet-multipurpose-liquidity = { path = '../../pallets/multipurpose-liquidity', pallet-maintenance = { path = '../../pallets/maintenance', default-features = false } pallet-fee-lock = { path = '../../pallets/fee-lock', default-features = false} mangata-support = { default-features = false , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +proof-of-stake-runtime-api = { path = '../../pallets/proof-of-stake/runtime-api', default-features = false} # Substrate Dependencies ## Substrate Primitive Dependencies @@ -175,6 +176,7 @@ std = [ "pallet-treasury/std", "pallet-xyk/std", "pallet-proof-of-stake/std", + "proof-of-stake-runtime-api/std", "pallet-bootstrap/std", "xyk-runtime-api/std", "parachain-staking/std", diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index 5aa713b617..0782b792a1 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -277,6 +277,9 @@ impl pallet_proof_of_stake::Config for Runtime { type LiquidityMiningIssuanceVault = cfg::pallet_issuance::LiquidityMiningIssuanceVault; type RewardsDistributionPeriod = cfg::SessionLenghtOf; type WeightInfo = weights::pallet_proof_of_stake_weights::ModuleWeight; + type RewardsSchedulesLimit = cfg::pallet_proof_of_stake::RewardsSchedulesLimit; + type Min3rdPartyRewards = cfg::pallet_proof_of_stake::Min3rdPartyRewards; + type ValuationApi = Xyk; } impl pallet_bootstrap::BootstrapBenchmarkingConfig for Runtime {} @@ -781,6 +784,34 @@ mod benches { impl_runtime_apis! { + impl proof_of_stake_runtime_api::ProofOfStakeApi for Runtime{ + fn calculate_native_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + ) -> Balance{ + ProofOfStake::calculate_native_rewards_amount(user, liquidity_asset_id) + .unwrap_or_default() + } + + fn calculate_3rdparty_rewards_amount( + user: AccountId, + liquidity_asset_id: TokenId, + reward_asset_id: TokenId, + ) -> Balance{ + ProofOfStake::calculate_rewards_amount_3rdparty(user, liquidity_asset_id, reward_asset_id) + .unwrap_or_default() + } + + fn calculate_3rdparty_rewards_all( + user: AccountId, + liquidity_asset_id: TokenId, + ) -> Vec<(TokenId, Balance)>{ + ProofOfStake::calculate_3rdparty_rewards_all(user, liquidity_asset_id) + .unwrap_or_default() + } + } + + impl ver_api::VerApi for Runtime { fn get_signer( tx: ::Extrinsic, diff --git a/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs b/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs index d7f3024fd8..99a6a2573d 100644 --- a/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs +++ b/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs @@ -56,10 +56,14 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_proof_of_stake. pub trait WeightInfo { - fn claim_rewards_all() -> Weight; + fn claim_native_rewards() -> Weight; + fn claim_3rdparty_rewards() -> Weight; fn update_pool_promotion() -> Weight; - fn activate_liquidity() -> Weight; - fn deactivate_liquidity() -> Weight; + fn activate_liquidity_for_native_rewards() -> Weight; + fn deactivate_liquidity_for_native_rewards() -> Weight; + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; + fn activate_liquidity_for_3rdparty_rewards() -> Weight; + fn reward_pool() -> Weight; } /// Weights for pallet_proof_of_stake using the Mangata node and recommended hardware. @@ -71,7 +75,13 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_rewards_all() -> Weight { + fn claim_native_rewards() -> Weight { + (Weight::from_parts(81_410_000, 0)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } + + fn claim_3rdparty_rewards() -> Weight { (Weight::from_parts(81_410_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) @@ -93,7 +103,7 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - fn activate_liquidity() -> Weight { + fn activate_liquidity_for_native_rewards() -> Weight { (Weight::from_parts(94_130_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -108,11 +118,30 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn deactivate_liquidity() -> Weight { + fn deactivate_liquidity_for_native_rewards() -> Weight { (Weight::from_parts(82_600_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + + + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn activate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn reward_pool() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } } // For backwards compatibility and tests @@ -123,11 +152,24 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_rewards_all() -> Weight { + fn claim_native_rewards() -> Weight { (Weight::from_parts(81_410_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } + + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfo (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(81_410_000, 0)) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn update_pool_promotion() -> Weight { @@ -145,7 +187,7 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - fn activate_liquidity() -> Weight { + fn activate_liquidity_for_native_rewards() -> Weight { (Weight::from_parts(94_130_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -160,9 +202,28 @@ impl WeightInfo for () { // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn deactivate_liquidity() -> Weight { + fn deactivate_liquidity_for_native_rewards() -> Weight { (Weight::from_parts(82_600_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn activate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn reward_pool() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + } From a0ec565b733bedced71340df29d9c1a4b767a819 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 27 Sep 2023 15:44:11 +0000 Subject: [PATCH 025/125] runtime api implemented --- node/Cargo.toml | 4 ++-- node/src/rpc.rs | 2 ++ pallets/proof-of-stake/runtime-api/src/lib.rs | 2 +- pallets/proof-of-stake/src/lib.rs | 22 ++++++++----------- runtime/mangata-kusama/src/lib.rs | 4 ++-- runtime/mangata-rococo/src/lib.rs | 4 ++-- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/node/Cargo.toml b/node/Cargo.toml index 9b0b2abac1..5d888bf37f 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -143,8 +143,8 @@ polkadot-test-service = { git = "https://github.com/mangata-finance/polkadot", b # Mangata dependencies xyk-rpc = { default-features = false, version = '2.0.0', path = '../pallets/xyk/rpc' } xyk-runtime-api = { default-features = false, version = '2.0.0', path = '../pallets/xyk/runtime-api' } -proof-of-stake-runtime-api = { default-features = false, version = '2.0.0', path = '../pallets/proof-of-stake/runtime-api' } -proof-of-stake-rpc = { default-features = false, version = '2.0.0', path = '../pallets/proof-of-stake/rpc' } +proof-of-stake-runtime-api = { version = '2.0.0', path = '../pallets/proof-of-stake/runtime-api' } +proof-of-stake-rpc = { version = '2.0.0', path = '../pallets/proof-of-stake/rpc' } [dev-dependencies] diff --git a/node/src/rpc.rs b/node/src/rpc.rs index 3c8abbe28d..e43501c90b 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -53,6 +53,7 @@ where use pallet_transaction_payment_mangata_rpc::{TransactionPayment, TransactionPaymentApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; use xyk_rpc::{Xyk, XykApiServer}; + use proof_of_stake_rpc::{ProofOfStake, ProofOfStakeApiServer}; let mut module = RpcExtension::new(()); let FullDeps { client, pool, deny_unsafe } = deps; @@ -60,6 +61,7 @@ where module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?; module.merge(TransactionPayment::new(client.clone()).into_rpc())?; module.merge(Xyk::new(client.clone()).into_rpc())?; + module.merge(ProofOfStake::new(client.clone()).into_rpc())?; Ok(module) } diff --git a/pallets/proof-of-stake/runtime-api/src/lib.rs b/pallets/proof-of-stake/runtime-api/src/lib.rs index 6f0012f1db..a81e86b9c2 100644 --- a/pallets/proof-of-stake/runtime-api/src/lib.rs +++ b/pallets/proof-of-stake/runtime-api/src/lib.rs @@ -24,6 +24,6 @@ sp_api::decl_runtime_apis! { fn calculate_3rdparty_rewards_all( user: AccountId, liquidity_asset_id: TokenId, - ) -> Vec<(TokenId, Balance)>; + ) -> Vec<(TokenId, TokenId, Balance)>; } } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 2a6aa0b241..2f727e1ae4 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -6,7 +6,7 @@ //! //! ## Types of Rewards //! -//! ### Liquidity Mining Rewards +//! ### Native Rewards //! //! As described in Mangata tokenomics, during each session, some of the rewards are minted and distributed //! among promoted pools. The council decides which pool to promote, and each promoted pool has a weight @@ -39,7 +39,7 @@ //! - [`Pallet::claim_native_rewards`] - Claims all rewards for all liquidity tokens. //! - [`Pallet::update_pool_promotion`] - Enables/disables the pool for liquidity mining rewards. //! -//! ### Scheduled Rewards +//! ### 3rd Party Rewards //! //! Anyone can provide tokens to reward people who store a particular liquidity token. Any //! liquidity token can be rewarded with any other token provided by the user. Liquidity can be @@ -690,11 +690,6 @@ pub mod pallet { } } -pub enum RewardsKind { - RewardsLiquidityMinting, - Rewards3rdParty(TokenId), -} - impl Pallet { fn activate_liquidity_for_native_rewards_impl( user: AccountIdOf, @@ -876,11 +871,12 @@ impl Pallet { pub fn calculate_3rdparty_rewards_all( user: AccountIdOf, - liquidity_asset_id: TokenId, - ) -> Result, DispatchError> { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; - todo!(); - + ) -> Result, DispatchError> { + RewardsInfoForScheduleRewards::::iter_prefix(user.clone()) + .map(|((liq_token, reward_token), _)| + Self::calculate_rewards_amount_3rdparty(user.clone(), liq_token, reward_token) + .map(|amount| (liq_token, reward_token, amount)) + ).collect::, _>>() } pub fn calculate_rewards_amount_3rdparty( @@ -1381,4 +1377,4 @@ impl LiquidityMiningApi for Pallet { } // benchmark for claim 3rdparty rewards -// move runtime configs to common runtime +// test for calculate_3rdparty_rewards_all diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index 49585e9692..8d690fa1cf 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -790,8 +790,8 @@ impl_runtime_apis! { fn calculate_3rdparty_rewards_all( user: AccountId, liquidity_asset_id: TokenId, - ) -> Vec<(TokenId, Balance)>{ - ProofOfStake::calculate_3rdparty_rewards_all(user, liquidity_asset_id) + ) -> Vec<(TokenId, TokenId, Balance)>{ + ProofOfStake::calculate_3rdparty_rewards_all(user) .unwrap_or_default() } } diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index 0782b792a1..ab3572101e 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -805,8 +805,8 @@ impl_runtime_apis! { fn calculate_3rdparty_rewards_all( user: AccountId, liquidity_asset_id: TokenId, - ) -> Vec<(TokenId, Balance)>{ - ProofOfStake::calculate_3rdparty_rewards_all(user, liquidity_asset_id) + ) -> Vec<(TokenId, TokenId, Balance)>{ + ProofOfStake::calculate_3rdparty_rewards_all(user) .unwrap_or_default() } } From 0c461b9486e6f383a4b4360c62e113b0f3f01250 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 28 Sep 2023 07:33:30 +0000 Subject: [PATCH 026/125] benchmarks for PoS::claim_3rdparty_rewards --- pallets/proof-of-stake/src/benchmarking.rs | 108 ++++++++++++++++++--- pallets/proof-of-stake/src/lib.rs | 4 +- pallets/proof-of-stake/src/tests.rs | 40 ++++---- 3 files changed, 115 insertions(+), 37 deletions(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 78bf94e4df..96a9615c92 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -53,7 +53,7 @@ where } benchmarks! { - claim_rewards_all{ + claim_native_rewards{ // 1. create // 2. promote // 3. mint @@ -82,14 +82,14 @@ benchmarks! { forward_to_next_session::(); - PoS::::activate_liquidity(RawOrigin::Signed(caller.clone()).into(), liquidity_asset_id.into(), quater_of_minted_liquidity, None).unwrap(); + PoS::::activate_liquidity_for_native_rewards(RawOrigin::Signed(caller.clone()).into(), liquidity_asset_id.into(), quater_of_minted_liquidity, None).unwrap(); forward_to_next_session::(); forward_to_next_session::(); assert!(PoS::::calculate_rewards_amount(caller.clone(), liquidity_asset_id).unwrap() > 0); - }: claim_rewards_all(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id) + }: claim_native_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id) verify { assert_eq!( @@ -113,7 +113,7 @@ benchmarks! { ); } - activate_liquidity{ + activate_liquidity_for_native_rewards{ // activate : // 1 crate pool // 2 promote pool @@ -141,7 +141,7 @@ benchmarks! { let half_of_minted_liquidity = total_minted_liquidity / 2_u128; let quater_of_minted_liquidity = total_minted_liquidity / 4_u128; - PoS::::activate_liquidity(RawOrigin::Signed(caller.clone()).into(), liquidity_asset_id.into(), quater_of_minted_liquidity, None).unwrap(); + PoS::::activate_liquidity_for_native_rewards(RawOrigin::Signed(caller.clone()).into(), liquidity_asset_id.into(), quater_of_minted_liquidity, None).unwrap(); assert_eq!( PoS::::get_rewards_info(caller.clone(), liquidity_asset_id).activated_amount, @@ -150,7 +150,7 @@ benchmarks! { forward_to_next_session::(); - }: activate_liquidity(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), quater_of_minted_liquidity, None) + }: activate_liquidity_for_native_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), quater_of_minted_liquidity, None) verify { assert_eq!( @@ -185,7 +185,7 @@ benchmarks! { let half_of_minted_liquidity = total_minted_liquidity.into() / 2_u128; let quater_of_minted_liquidity = total_minted_liquidity.into() / 4_u128; - PoS::::activate_liquidity(RawOrigin::Signed(caller.clone().into()).into(), liquidity_asset_id.into(), half_of_minted_liquidity, None).unwrap(); + PoS::::activate_liquidity_for_native_rewards(RawOrigin::Signed(caller.clone().into()).into(), liquidity_asset_id.into(), half_of_minted_liquidity, None).unwrap(); assert_eq!( PoS::::get_rewards_info(caller.clone(), liquidity_asset_id).activated_amount, @@ -271,7 +271,7 @@ benchmarks! { } - activate_liquidity_for_rewards_schedule{ + activate_liquidity_for_3rdparty_rewards{ // 1 create pool that can be rewarded // 2 create token that is used as reward // 3 activate rewards @@ -310,16 +310,16 @@ benchmarks! { 2u32.into(), ).unwrap(); - }: activate_liquidity_for_rewards_schedule(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id, None) + }: activate_liquidity_for_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id, None) verify { forward_to_next_session::(); assert_eq!( - PoS::::calculate_rewards_amount_3rdparty(caller, liquidity_asset_id, reward_token_id).unwrap(), + PoS::::calculate_3rdparty_rewards_amount(caller, liquidity_asset_id, reward_token_id).unwrap(), rewards_amount/2 ) } - deactivate_liquidity_for_native_rewards_for_rewards_schedule{ + deactivate_liquidity_for_3rdparty_rewards{ // 1 create pool that can be rewarded // 2 create token that is used as reward // 3 activate rewards @@ -359,8 +359,6 @@ benchmarks! { 2u32.into(), ).unwrap(); - // println!("{:?}", TokensOf::::free_balance(reward_token_id.into(), &caller)); - assert!(TokensOf::::ensure_can_withdraw( liquidity_asset_id.into(), &caller, @@ -369,7 +367,7 @@ benchmarks! { Default::default(), ).is_ok()); - PoS::::activate_liquidity_for_rewards_schedule( + PoS::::activate_liquidity_for_3rdparty_rewards( RawOrigin::Signed(caller.clone().into()).into(), liquidity_asset_id, 10_000u128, @@ -388,7 +386,7 @@ benchmarks! { ); - }: deactivate_liquidity_for_native_rewards_for_rewards_schedule(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id) + }: deactivate_liquidity_for_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id) verify { assert!(TokensOf::::ensure_can_withdraw( @@ -400,5 +398,85 @@ benchmarks! { ).is_ok()); } + + claim_3rdparty_rewards{ + // 1 create pool that can be rewarded + // 2 create token that is used as reward + // 3 activate rewards + // 4 wait for rewards to be avialble + // 5 claim rewards + + init::(); + + let schedules_limit = ::RewardsSchedulesLimit::get(); + let caller: ::AccountId = whitelisted_caller(); + let native_asset_id = ::NativeCurrencyId::get(); + + loop { + let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + if token_id > native_asset_id { + break; + } + } + + let native_asset_amount: u128 = MILION * Into::::into(schedules_limit); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + + let first_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), first_token_id.into(), MILION.into()).unwrap(); + let liquidity_asset_id = first_token_id + 1; + + let second_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), second_token_id.into(), MILION.into()).unwrap(); + let reward_token_id = second_token_id + 1; + + let rewards_amount = 20_000u128; + + PoS::::reward_pool( + RawOrigin::Signed(caller.clone().into()).into(), + (native_asset_id, first_token_id), + reward_token_id.into(), + rewards_amount, + 2u32.into(), + ).unwrap(); + + PoS::::activate_liquidity_for_3rdparty_rewards( + RawOrigin::Signed(caller.clone().into()).into(), + liquidity_asset_id, + 10_000u128, + reward_token_id, + None + ).unwrap(); + + forward_to_next_session::(); + assert_eq!( + PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), + 10_000u128 + ); + forward_to_next_session::(); + assert_eq!( + PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), + 20_000u128 + ); + forward_to_next_session::(); + assert_eq!( + PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), + 20_000u128 + ); + + let balance_before:u128 = TokensOf::::free_balance(reward_token_id.into(), &caller).into(); + + }: claim_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, reward_token_id) + verify { + + let balance_after:u128 = TokensOf::::free_balance(reward_token_id.into(), &caller).into(); + assert_eq!( + PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), + 0u128 + ); + + assert_eq!(balance_after - balance_before, 20_000u128); + } + impl_benchmark_test_suite!(PoS, crate::mock::new_test_ext(), crate::mock::Test) } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 2f727e1ae4..96142a0d1f 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -874,12 +874,12 @@ impl Pallet { ) -> Result, DispatchError> { RewardsInfoForScheduleRewards::::iter_prefix(user.clone()) .map(|((liq_token, reward_token), _)| - Self::calculate_rewards_amount_3rdparty(user.clone(), liq_token, reward_token) + Self::calculate_3rdparty_rewards_amount(user.clone(), liq_token, reward_token) .map(|amount| (liq_token, reward_token, amount)) ).collect::, _>>() } - pub fn calculate_rewards_amount_3rdparty( + pub fn calculate_3rdparty_rewards_amount( user: AccountIdOf, liquidity_asset_id: TokenId, rewards_asset_id: TokenId, diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 7cc1d4faa9..4e0b6286d9 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1461,7 +1461,7 @@ fn user_can_claim_3rdparty_rewards() { ) .unwrap(); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(0) ); @@ -1475,7 +1475,7 @@ fn user_can_claim_3rdparty_rewards() { ) .unwrap(); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN @@ -1483,17 +1483,17 @@ fn user_can_claim_3rdparty_rewards() { Ok(0) ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(1000) ); roll_to_session(3); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(1500) ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN @@ -1564,7 +1564,7 @@ fn overlapping_3rdparty_rewards_works() { roll_to_session(6); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, second_reward_token_id @@ -1573,7 +1573,7 @@ fn overlapping_3rdparty_rewards_works() { ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, first_reward_token @@ -1639,7 +1639,7 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { roll_to_session(6); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN @@ -1648,7 +1648,7 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN @@ -1704,12 +1704,12 @@ fn deactivate_3rdparty_rewards() { roll_to_session(2); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(500) ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN @@ -1727,12 +1727,12 @@ fn deactivate_3rdparty_rewards() { roll_to_session(3); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(1500) ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN @@ -1793,7 +1793,7 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { .unwrap(); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN @@ -1801,7 +1801,7 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { Ok(0) ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN @@ -1812,7 +1812,7 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { roll_to_session(1); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN @@ -1820,7 +1820,7 @@ fn claim_rewards_from_multiple_schedules_using_single_liquidity() { Ok(1000) ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN @@ -1884,7 +1884,7 @@ fn liquidity_minting_liquidity_can_be_resused() { assert_eq!(ProofOfStake::calculate_rewards_amount(BOB, LIQUIDITY_TOKEN), Ok(200)); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN @@ -2165,7 +2165,7 @@ fn can_claim_schedule_rewards() { assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 1000,); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN @@ -2173,7 +2173,7 @@ fn can_claim_schedule_rewards() { Ok(0) ); assert_eq!( - ProofOfStake::calculate_rewards_amount_3rdparty( + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN From 251905034e92c849bb4152a09c3ebcad3d98f1e0 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 28 Sep 2023 09:07:52 +0000 Subject: [PATCH 027/125] test for calculate_3rdparty_rewards_all --- node/src/rpc.rs | 2 +- pallets/proof-of-stake/rpc/src/lib.rs | 21 +- pallets/proof-of-stake/src/lib.rs | 34 +-- pallets/proof-of-stake/src/tests.rs | 424 +++++++++++++++++++++----- runtime/common/src/lib.rs | 1 - 5 files changed, 362 insertions(+), 120 deletions(-) diff --git a/node/src/rpc.rs b/node/src/rpc.rs index e43501c90b..d19d75d00e 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -51,9 +51,9 @@ where P: TransactionPool + Sync + Send + 'static, { use pallet_transaction_payment_mangata_rpc::{TransactionPayment, TransactionPaymentApiServer}; + use proof_of_stake_rpc::{ProofOfStake, ProofOfStakeApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; use xyk_rpc::{Xyk, XykApiServer}; - use proof_of_stake_rpc::{ProofOfStake, ProofOfStakeApiServer}; let mut module = RpcExtension::new(()); let FullDeps { client, pool, deny_unsafe } = deps; diff --git a/pallets/proof-of-stake/rpc/src/lib.rs b/pallets/proof-of-stake/rpc/src/lib.rs index 64a893a87d..fc309cb757 100644 --- a/pallets/proof-of-stake/rpc/src/lib.rs +++ b/pallets/proof-of-stake/rpc/src/lib.rs @@ -6,6 +6,8 @@ use jsonrpsee::{ proc_macros::rpc, types::error::{CallError, ErrorObject}, }; +pub use proof_of_stake_runtime_api::XykApi as XykRuntimeApi; +use proof_of_stake_runtime_api::{RpcAmountsResult, RpcAssetMetadata, XYKRpcResult}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_core::U256; @@ -16,17 +18,9 @@ use sp_runtime::{ }; use sp_std::convert::{TryFrom, TryInto}; use std::sync::Arc; -pub use proof_of_stake_runtime_api::XykApi as XykRuntimeApi; -use proof_of_stake_runtime_api::{RpcAmountsResult, RpcAssetMetadata, XYKRpcResult}; #[rpc(client, server)] -pub trait ProofOfStakeApi< - BlockHash, - Balance, - TokenId, - AccountId -> -{ +pub trait ProofOfStakeApi { #[method(name = "foo")] fn foo( &self, @@ -50,12 +44,8 @@ impl ProofOfStake { #[async_trait] impl - ProofOfStakeApiServer< - ::Hash, - NumberOrHex, - TokenId, - AccountId - > for ProofOfStake + ProofOfStakeApiServer<::Hash, NumberOrHex, TokenId, AccountId> + for ProofOfStake where Block: BlockT, C: Send + Sync + 'static, @@ -74,5 +64,4 @@ where at: Option, ) -> RpcResult> { } - } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 96142a0d1f..c0f7a38ece 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -394,7 +394,7 @@ pub mod pallet { #[transactional] #[pallet::call_index(0)] #[pallet::weight(<::WeightInfo>::claim_native_rewards())] - #[deprecated(note = "claim_native_rewards should be used instead")] + #[deprecated(note = "claim_native_rewards should be used instead")] pub fn claim_rewards_all( origin: OriginFor, liquidity_token_id: TokenId, @@ -468,11 +468,7 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - Self::deactivate_liquidity_for_native_rewards_impl( - sender, - liquidity_token_id, - amount, - ) + Self::deactivate_liquidity_for_native_rewards_impl(sender, liquidity_token_id, amount) } /// Schedules rewards for selected liquidity token @@ -662,17 +658,13 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - Self::deactivate_liquidity_for_native_rewards_impl( - sender, - liquidity_token_id, - amount, - ) + Self::deactivate_liquidity_for_native_rewards_impl(sender, liquidity_token_id, amount) } #[transactional] #[pallet::call_index(10)] #[pallet::weight(<::WeightInfo>::claim_native_rewards())] - #[deprecated(note = "claim_native_rewards should be used instead")] + #[deprecated(note = "claim_native_rewards should be used instead")] pub fn claim_native_rewards( origin: OriginFor, liquidity_token_id: TokenId, @@ -686,7 +678,6 @@ pub mod pallet { Ok(()) } - } } @@ -746,7 +737,6 @@ impl Pallet { .ok_or(Error::::CalculateRewardsMathError)?) } - fn deactivate_liquidity_for_native_rewards_impl( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -872,11 +862,14 @@ impl Pallet { pub fn calculate_3rdparty_rewards_all( user: AccountIdOf, ) -> Result, DispatchError> { - RewardsInfoForScheduleRewards::::iter_prefix(user.clone()) - .map(|((liq_token, reward_token), _)| - Self::calculate_3rdparty_rewards_amount(user.clone(), liq_token, reward_token) - .map(|amount| (liq_token, reward_token, amount)) - ).collect::, _>>() + let mut result = RewardsInfoForScheduleRewards::::iter_prefix(user.clone()) + .map(|((liq_token, reward_token), _)| { + Self::calculate_3rdparty_rewards_amount(user.clone(), liq_token, reward_token) + .map(|amount| (liq_token, reward_token, amount)) + }) + .collect::, _>>(); + result.as_mut().map(|v| v.sort()); + result } pub fn calculate_3rdparty_rewards_amount( @@ -1283,9 +1276,7 @@ impl ProofOfStakeRewardsApi for Pallet { user: AccountIdOf, liquidity_asset_id: TokenId, ) -> Result { - Self::calculate_native_rewards_amount(user, liquidity_asset_id) - } } @@ -1376,5 +1367,4 @@ impl LiquidityMiningApi for Pallet { } } -// benchmark for claim 3rdparty rewards // test for calculate_3rdparty_rewards_all diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 4e0b6286d9..021cb35605 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -5,6 +5,7 @@ use super::*; use crate::mock::*; use frame_support::{assert_err, assert_ok}; +use mockall::predicate::eq; use serial_test::serial; use mangata_support::traits::{ComputeIssuance, GetIssuance}; @@ -13,7 +14,13 @@ type TokensOf = ::Currency; fn mint_and_activate_tokens(who: AccountId, token_id: TokenId, amount: Balance) { TokensOf::::mint(token_id, &who, amount).unwrap(); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(who), token_id, amount, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(who), + token_id, + amount, + None, + ) + .unwrap(); } fn initialize_liquidity_rewards() { @@ -32,7 +39,8 @@ fn initialize_liquidity_rewards() { pools.get_mut(&4).unwrap().rewards = U256::from(0); }); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 10000, None) + .unwrap(); } pub(crate) fn roll_to_session(n: u32) { @@ -75,8 +83,13 @@ fn liquidity_rewards_single_user_mint_W() { let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 2u8).unwrap(); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); let rewards_info = ProofOfStake::get_rewards_info(2, 4); @@ -144,8 +157,13 @@ fn liquidity_rewards_three_users_burn_W() { TokensOf::::transfer(1, &2, &4, 1000000, ExistenceRequirement::AllowDeath).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); forward_to_block(100); @@ -156,7 +174,8 @@ fn liquidity_rewards_three_users_burn_W() { mint_and_activate_tokens(4, 4, 10000); forward_to_block(240); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 5000) + .unwrap(); forward_to_block(400); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 95965); @@ -189,8 +208,13 @@ fn liquidity_rewards_claim_W() { TokensOf::::create(&acc_id, 10000).unwrap(); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); forward_to_block(10); forward_to_block(90); @@ -260,8 +284,13 @@ fn liquidity_rewards_work_after_burn_W() { TokensOf::::transfer(1, &2, &4, 1000000, ExistenceRequirement::AllowDeath).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); forward_to_block(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 14704); @@ -272,7 +301,8 @@ fn liquidity_rewards_work_after_burn_W() { mint_and_activate_tokens(4, 4, 10000); forward_to_block(240); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 10000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 10000) + .unwrap(); forward_to_block(400); assert_eq!(ProofOfStake::calculate_rewards_amount(4, 4).unwrap(), 948); @@ -301,8 +331,13 @@ fn liquidity_rewards_deactivate_transfer_controled_W() { let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); assert_err!( TokensOf::::transfer(4, &2, &3, 10, ExistenceRequirement::AllowDeath), orml_tokens::Error::::BalanceTooLow, @@ -311,8 +346,12 @@ fn liquidity_rewards_deactivate_transfer_controled_W() { forward_to_block(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 14704); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned) - .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + ) + .unwrap(); TokensOf::::transfer(4, &2, &3, 10, ExistenceRequirement::AllowDeath).unwrap(); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 14704); }); @@ -335,8 +374,13 @@ fn liquidity_rewards_deactivate_more_NW() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); assert_err!( ProofOfStake::deactivate_liquidity_for_native_rewards( RuntimeOrigin::signed(2), @@ -452,20 +496,34 @@ fn liquidity_rewards_not_yet_claimed_already_claimed_W() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); forward_to_block(10); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 291); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned) - .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + ) + .unwrap(); let rewards_info = ProofOfStake::get_rewards_info(2, 4); assert_eq!(rewards_info.rewards_not_yet_claimed, 291); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); forward_to_block(100); @@ -493,7 +551,8 @@ fn extreme_case_pool_ratio() { TokensOf::::create(&acc_id, max).unwrap(); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 1, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 1, None) + .unwrap(); PromotedPoolRewards::::mutate(|pools| { pools.get_mut(&4).unwrap().rewards = U256::from(u128::MAX) * U256::from(u128::MAX); @@ -630,7 +689,13 @@ fn rewards_storage_right_amounts_start1() { TokensOf::::transfer(2, &2, &5, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(1, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(2, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + 10000, + None, + ) + .unwrap(); mint_and_activate_tokens(3, 4, 10000); mint_and_activate_tokens(4, 4, 10000); mint_and_activate_tokens(5, 4, 10000); @@ -687,7 +752,8 @@ fn rewards_storage_right_amounts_start1() { // usecase 6 burn some user_balance_before = TokensOf::::free_balance(0, &3); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000) + .unwrap(); user_balance_after = TokensOf::::free_balance(0, &3); rewards_info = ProofOfStake::get_rewards_info(3, 4); @@ -710,7 +776,8 @@ fn rewards_storage_right_amounts_start1() { // usecase 8 deactivate some user_balance_before = TokensOf::::free_balance(0, &5); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000) + .unwrap(); user_balance_after = TokensOf::::free_balance(0, &5); rewards_info = ProofOfStake::get_rewards_info(5, 4); @@ -767,7 +834,13 @@ fn rewards_storage_right_amounts_start2() { TokensOf::::transfer(2, &2, &5, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(1, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(2, &2, &6, 20010, ExistenceRequirement::AllowDeath).unwrap(); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + 10000, + None, + ) + .unwrap(); mint_and_activate_tokens(3, 4, 10000); mint_and_activate_tokens(4, 4, 10000); mint_and_activate_tokens(5, 4, 10000); @@ -778,10 +851,14 @@ fn rewards_storage_right_amounts_start2() { PromotedPoolRewards::::get().get(&4).unwrap().rewards ); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 5000).unwrap(); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000).unwrap(); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 5000).unwrap(); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 5000) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 5000) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000) + .unwrap(); forward_to_block_with_custom_rewards(200, 20000); //its really weird that rewards are //decreased from 40k to 20k in single @@ -823,7 +900,8 @@ fn rewards_storage_right_amounts_start2() { // usecase 9 burn some user_balance_before = TokensOf::::free_balance(0, &3); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, 5000) + .unwrap(); user_balance_after = TokensOf::::free_balance(0, &3); rewards_info = ProofOfStake::get_rewards_info(3, 4); @@ -845,7 +923,8 @@ fn rewards_storage_right_amounts_start2() { // usecase 11 deactivate some user_balance_before = TokensOf::::free_balance(0, &5); - ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000).unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000) + .unwrap(); user_balance_after = TokensOf::::free_balance(0, &5); rewards_info = ProofOfStake::get_rewards_info(5, 4); @@ -888,7 +967,13 @@ fn rewards_storage_right_amounts_start3() { TokensOf::::transfer(1, &2, &4, 20010, ExistenceRequirement::AllowDeath).unwrap(); TokensOf::::transfer(2, &2, &4, 20010, ExistenceRequirement::AllowDeath).unwrap(); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, 10000, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + 10000, + None, + ) + .unwrap(); mint_and_activate_tokens(3, 4, 10000); forward_to_block_with_custom_rewards(100, 20000); @@ -965,8 +1050,13 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { ) .unwrap(); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(3), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(3), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); forward_to_block(100); @@ -1022,7 +1112,13 @@ fn test_migrated_from_pallet_issuance() { assert_eq!(1, TokensOf::::create(&99999, 1_000_000u128).unwrap()); ProofOfStake::enable(1, 1u8); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(99999), 1, 1, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(99999), + 1, + 1, + None, + ) + .unwrap(); roll_to_while_minting(4, None); assert_eq!( @@ -1037,7 +1133,13 @@ fn test_migrated_from_pallet_issuance() { assert_eq!(2, TokensOf::::create(&99999, 1_000_000u128).unwrap()); ProofOfStake::enable(2, 1u8); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(99999), 2, 1, None).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(99999), + 2, + 1, + None, + ) + .unwrap(); roll_to_while_minting(14, None); assert_eq!( U256::from_dec_str("191427546923208537313638702283778366195067525").unwrap(), @@ -1085,8 +1187,13 @@ fn claim_rewards_from_pool_that_has_been_disabled() { ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), 4, 1u8).unwrap(); let liquidity_tokens_owned = TokensOf::::free_balance(4, &2); - ProofOfStake::activate_liquidity_for_native_rewards(RuntimeOrigin::signed(2), 4, liquidity_tokens_owned, None) - .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(2), + 4, + liquidity_tokens_owned, + None, + ) + .unwrap(); forward_to_block(10); @@ -1102,11 +1209,15 @@ fn claim_rewards_from_pool_that_has_been_disabled() { const MILLION: u128 = 1_000_000; const REWARDED_PAIR: (TokenId, TokenId) = (0u32, 4u32); +const FIRST_REWARDED_PAIR: (TokenId, TokenId) = (0u32, 4u32); +const SECOND_REWARDED_PAIR: (TokenId, TokenId) = (0u32, 5u32); const REWARD_AMOUNT: u128 = 10_000u128; const REWARD_TOKEN: u32 = 5u32; const FIRST_REWARD_TOKEN: u32 = REWARD_TOKEN; const SECOND_REWARD_TOKEN: u32 = 6u32; const LIQUIDITY_TOKEN: u32 = 10; +const FIRST_LIQUIDITY_TOKEN: u32 = 10; +const SECOND_LIQUIDITY_TOKEN: u32 = 11; const ALICE: u128 = 2; const BOB: u128 = 3; const CHARLIE: u128 = 4; @@ -1744,88 +1855,241 @@ fn deactivate_3rdparty_rewards() { #[test] #[serial] -fn claim_rewards_from_multiple_schedules_using_single_liquidity() { +fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() { ExtBuilder::new() - .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) - .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) - .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(ALICE, FIRST_REWARD_TOKEN, 2 * REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 4 * REWARD_AMOUNT) + .issue(BOB, FIRST_LIQUIDITY_TOKEN, 100) + .issue(BOB, SECOND_LIQUIDITY_TOKEN, 100) .build() .execute_with(|| { let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + get_liquidity_asset_mock + .expect() + .with(eq(FIRST_REWARDED_PAIR.0), eq(FIRST_REWARDED_PAIR.1)) + .return_const(Ok(FIRST_LIQUIDITY_TOKEN)); + get_liquidity_asset_mock + .expect() + .with(eq(SECOND_REWARDED_PAIR.0), eq(SECOND_REWARDED_PAIR.1)) + .return_const(Ok(SECOND_LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); System::set_block_number(1); - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, + FIRST_REWARDED_PAIR, FIRST_REWARD_TOKEN, REWARD_AMOUNT, 10u32.into(), ) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + 100u128, + FIRST_REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session(1); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![(FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 1 * 1000u128),] + ); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, + FIRST_REWARDED_PAIR, SECOND_REWARD_TOKEN, 2 * REWARD_AMOUNT, - 10u32.into(), + 11u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + 100u128, + SECOND_REWARD_TOKEN, + Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), ) .unwrap(); + roll_to_session(2); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] + ); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + SECOND_REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 12u32.into(), + ) + .unwrap(); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, + SECOND_LIQUIDITY_TOKEN, + 100u128, FIRST_REWARD_TOKEN, None, ) .unwrap(); + + roll_to_session(3); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 3 * 1000u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 2 * 2000u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 1 * 1000u128), + ] + ); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + SECOND_REWARDED_PAIR, + SECOND_REWARD_TOKEN, + 2 * REWARD_AMOUNT, + 13u32.into(), + ) + .unwrap(); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, + SECOND_LIQUIDITY_TOKEN, + 100u128, SECOND_REWARD_TOKEN, Some(ThirdPartyActivationKind::ActivatedLiquidity(FIRST_REWARD_TOKEN)), ) .unwrap(); + roll_to_session(4); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_amount( - BOB, - LIQUIDITY_TOKEN, - FIRST_REWARD_TOKEN - ), - Ok(0) + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 4 * 1000u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 3 * 2000u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] + ); + + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 3 * 2000u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] ); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_amount( - BOB, - LIQUIDITY_TOKEN, - SECOND_REWARD_TOKEN - ), - Ok(0) + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 3 * 2000u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] ); - roll_to_session(1); + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] + ); + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + SECOND_LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_amount( - BOB, - LIQUIDITY_TOKEN, - FIRST_REWARD_TOKEN - ), - Ok(1000) + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), + ] ); + + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + SECOND_LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(); + assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_amount( - BOB, - LIQUIDITY_TOKEN, - SECOND_REWARD_TOKEN - ), - Ok(2000) + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + ] + ); + + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + FIRST_LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + ) + .unwrap(); + + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + SECOND_LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + SECOND_LIQUIDITY_TOKEN, + 100, + SECOND_REWARD_TOKEN, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), + (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), + ] ); }); } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 8b749ad82c..7bdff2fdac 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1376,5 +1376,4 @@ where pub const Min3rdPartyRewards: u128 = 100 * 30_000 * currency::DOLLARS; } } - } From af3a2e066e6b43531661de666b2e25a008230c60 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 28 Sep 2023 10:02:39 +0000 Subject: [PATCH 028/125] Align Proof of stake runtime api to share interface with other runtime apis --- Cargo.lock | 1 + node/src/rpc.rs | 1 + node/src/service.rs | 2 + pallets/bootstrap/src/tests.rs | 2 - pallets/proof-of-stake/rpc/Cargo.toml | 1 + pallets/proof-of-stake/rpc/src/lib.rs | 92 ++++++++++++++++++++--- pallets/proof-of-stake/src/lib.rs | 5 -- pallets/proof-of-stake/src/reward_info.rs | 1 - runtime/mangata-kusama/src/lib.rs | 6 +- runtime/mangata-rococo/src/lib.rs | 7 +- 10 files changed, 92 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4cb285b114..2664e59056 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9282,6 +9282,7 @@ name = "proof-of-stake-rpc" version = "2.0.0" dependencies = [ "jsonrpsee", + "mangata-types", "parity-scale-codec", "proof-of-stake-runtime-api", "serde", diff --git a/node/src/rpc.rs b/node/src/rpc.rs index d19d75d00e..63023cac00 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -46,6 +46,7 @@ where C::Api: pallet_transaction_payment_mangata_rpc::TransactionPaymentRuntimeApi, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: xyk_rpc::XykRuntimeApi, + C::Api: proof_of_stake_rpc::ProofOfStakeRuntimeApi, C::Api: BlockBuilder, C::Api: VerNonceApi, P: TransactionPool + Sync + Send + 'static, diff --git a/node/src/service.rs b/node/src/service.rs index 5ebfe00e75..0b2e5a2201 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -308,6 +308,7 @@ where + substrate_frame_rpc_system::AccountNonceApi + ver_api::VerApi + ver_api::VerNonceApi + + proof_of_stake_rpc::ProofOfStakeRuntimeApi + xyk_rpc::XykRuntimeApi + sp_consensus_aura::AuraApi, sc_client_api::StateBackendFor, Block>: sp_api::StateBackend, @@ -532,6 +533,7 @@ where + ver_api::VerApi + ver_api::VerNonceApi + xyk_rpc::XykRuntimeApi + + proof_of_stake_rpc::ProofOfStakeRuntimeApi + sp_consensus_aura::AuraApi, { start_node_impl::( diff --git a/pallets/bootstrap/src/tests.rs b/pallets/bootstrap/src/tests.rs index 487daafd98..150850e8ea 100644 --- a/pallets/bootstrap/src/tests.rs +++ b/pallets/bootstrap/src/tests.rs @@ -728,10 +728,8 @@ fn test_bootstrap_state_transitions() { Bootstrap::on_initialize(BOOTSTRAP_PUBLIC_START); assert_eq!(Bootstrap::phase(), BootstrapPhase::Public); - println!("{:?}", Bootstrap::phase()); for i in BOOTSTRAP_PUBLIC_START..BOOTSTRAP_FINISH { Bootstrap::on_initialize(i); - println!("{:?}", Bootstrap::phase()); assert_eq!(Bootstrap::phase(), BootstrapPhase::Public); } diff --git a/pallets/proof-of-stake/rpc/Cargo.toml b/pallets/proof-of-stake/rpc/Cargo.toml index 705babe0f5..4a76093273 100644 --- a/pallets/proof-of-stake/rpc/Cargo.toml +++ b/pallets/proof-of-stake/rpc/Cargo.toml @@ -19,6 +19,7 @@ sp-rpc = { version = '6.0.0', default-features = false, git = "https://github.co sp-core = { version = '7.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } sp-std = { version = '5.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } sp-runtime = { version = '7.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +mangata-types = { default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } # local packages diff --git a/pallets/proof-of-stake/rpc/src/lib.rs b/pallets/proof-of-stake/rpc/src/lib.rs index fc309cb757..58d15682cd 100644 --- a/pallets/proof-of-stake/rpc/src/lib.rs +++ b/pallets/proof-of-stake/rpc/src/lib.rs @@ -6,8 +6,8 @@ use jsonrpsee::{ proc_macros::rpc, types::error::{CallError, ErrorObject}, }; -pub use proof_of_stake_runtime_api::XykApi as XykRuntimeApi; -use proof_of_stake_runtime_api::{RpcAmountsResult, RpcAssetMetadata, XYKRpcResult}; +pub use proof_of_stake_runtime_api::ProofOfStakeApi as ProofOfStakeRuntimeApi; +// use proof_of_stake_runtime_api::{RpcAmountsResult, RpcAssetMetadata, XYKRpcResult}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_core::U256; @@ -21,14 +21,29 @@ use std::sync::Arc; #[rpc(client, server)] pub trait ProofOfStakeApi { - #[method(name = "foo")] - fn foo( + #[method(name = "pos_calculate_native_rewards_amount")] + fn calculate_native_rewards_amount( &self, account: AccountId, liquidity_token: TokenId, - reward_token: TokenId, at: Option, - ) -> RpcResult; + ) -> RpcResult; + + #[method(name = "pos_calculate_3rdparty_rewards_amount")] + fn calculate_3rdparty_rewards_amount( + &self, + account: AccountId, + liquidity_token: TokenId, + rewards_token: TokenId, + at: Option, + ) -> RpcResult; + + #[method(name = "pos_calculate_3rdparty_rewards_all")] + fn calculate_3rdparty_rewards_all( + &self, + account: AccountId, + at: Option, + ) -> RpcResult>; } pub struct ProofOfStake { @@ -44,24 +59,77 @@ impl ProofOfStake { #[async_trait] impl - ProofOfStakeApiServer<::Hash, NumberOrHex, TokenId, AccountId> + ProofOfStakeApiServer<::Hash, Balance, TokenId, AccountId> for ProofOfStake where Block: BlockT, C: Send + Sync + 'static, C: ProvideRuntimeApi, C: HeaderBackend, - C::Api: XykRuntimeApi, - Balance: Codec + MaybeDisplay + MaybeFromStr + TryFrom, + C::Api: ProofOfStakeRuntimeApi, + Balance: Codec + MaybeDisplay + MaybeFromStr + Into, TokenId: Codec + MaybeDisplay + MaybeFromStr, AccountId: Codec + MaybeDisplay + MaybeFromStr, { - fn foo( + fn calculate_native_rewards_amount( + &self, + account: AccountId, + liquidity_token: TokenId, + at: Option<::Hash>, + ) -> RpcResult { + let api = self.client.runtime_api(); + let at = self.client.info().best_hash; + + api.calculate_native_rewards_amount(at, account, liquidity_token) + .map(Into::::into) + .map_err(|e| { + JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( + 1, + "Unable to serve the request", + Some(format!("{:?}", e)), + ))) + }) + } + + fn calculate_3rdparty_rewards_amount( &self, account: AccountId, liquidity_token: TokenId, reward_token: TokenId, - at: Option, - ) -> RpcResult> { + at: Option<::Hash>, + ) -> RpcResult { + let api = self.client.runtime_api(); + let at = self.client.info().best_hash; + + api.calculate_3rdparty_rewards_amount(at, account, liquidity_token, reward_token) + .map(Into::::into) + .map_err(|e| { + JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( + 1, + "Unable to serve the request", + Some(format!("{:?}", e)), + ))) + }) + } + + + fn calculate_3rdparty_rewards_all( + &self, + account: AccountId, + at: Option<::Hash>, + ) -> RpcResult> { + let api = self.client.runtime_api(); + let at = self.client.info().best_hash; + + todo!(); + // api.calculate_3rdparty_rewards_all(at, account) + // .map_err(|e| { + // JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( + // 1, + // "Unable to serve the request", + // Some(format!("{:?}", e)), + // ))) + // }) } + } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index c0f7a38ece..5a4e97cd1d 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -702,7 +702,6 @@ impl Pallet { Self::set_liquidity_minting_checkpoint(user.clone(), liquidity_asset_id, amount)?; - println!("activate"); ::ActivationReservesProvider::activate( liquidity_asset_id, &user, @@ -821,7 +820,6 @@ impl Pallet { match use_balance_from { ThirdPartyActivationKind::ActivateKind(use_balance_from) => { - println!("activate"); ::ActivationReservesProvider::activate( liquidity_asset_id, &user, @@ -1108,12 +1106,10 @@ impl Pallet { }, )?; - println!("BURNING : {user} {liquidity_asset_id} {reward_token}"); ActivatedLiquidityForSchedules::::try_mutate_exists( (user.clone(), liquidity_asset_id, reward_token), |v| { v.and_then(|a| { - println!("{a} {liquidity_assets_burned}"); a.checked_sub(liquidity_assets_burned).and_then(|val| { if val > 0 { *v = Some(val); @@ -1143,7 +1139,6 @@ impl Pallet { }, ); - println!("deactivate"); ::ActivationReservesProvider::deactivate( liquidity_asset_id, &user, diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 228989b026..b4ba8c7e85 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -230,7 +230,6 @@ impl RewardsCalculator { .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) .ok_or(RewardsCalcError::CheckpointMathError)?; - println!("STORING {}", self.rewards_context.pool_ratio_current); Ok(RewardInfo { activated_amount, pool_ratio_at_last_checkpoint: self.rewards_context.pool_ratio_current, diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index 8d690fa1cf..bcf96473ee 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -774,7 +774,7 @@ impl_runtime_apis! { user: AccountId, liquidity_asset_id: TokenId, ) -> Balance{ - ProofOfStake::calculate_native_rewards_amount(user, liquidity_asset_id) + pallet_proof_of_stake::Pallet::::calculate_native_rewards_amount(user, liquidity_asset_id) .unwrap_or_default() } @@ -783,7 +783,7 @@ impl_runtime_apis! { liquidity_asset_id: TokenId, reward_asset_id: TokenId, ) -> Balance{ - ProofOfStake::calculate_rewards_amount_3rdparty(user, liquidity_asset_id, reward_asset_id) + pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_amount(user, liquidity_asset_id, reward_asset_id) .unwrap_or_default() } @@ -791,7 +791,7 @@ impl_runtime_apis! { user: AccountId, liquidity_asset_id: TokenId, ) -> Vec<(TokenId, TokenId, Balance)>{ - ProofOfStake::calculate_3rdparty_rewards_all(user) + pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_all(user) .unwrap_or_default() } } diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index ab3572101e..164c6fcb78 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -784,12 +784,13 @@ mod benches { impl_runtime_apis! { + impl proof_of_stake_runtime_api::ProofOfStakeApi for Runtime{ fn calculate_native_rewards_amount( user: AccountId, liquidity_asset_id: TokenId, ) -> Balance{ - ProofOfStake::calculate_native_rewards_amount(user, liquidity_asset_id) + pallet_proof_of_stake::Pallet::::calculate_native_rewards_amount(user, liquidity_asset_id) .unwrap_or_default() } @@ -798,7 +799,7 @@ impl_runtime_apis! { liquidity_asset_id: TokenId, reward_asset_id: TokenId, ) -> Balance{ - ProofOfStake::calculate_rewards_amount_3rdparty(user, liquidity_asset_id, reward_asset_id) + pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_amount(user, liquidity_asset_id, reward_asset_id) .unwrap_or_default() } @@ -806,7 +807,7 @@ impl_runtime_apis! { user: AccountId, liquidity_asset_id: TokenId, ) -> Vec<(TokenId, TokenId, Balance)>{ - ProofOfStake::calculate_3rdparty_rewards_all(user) + pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_all(user) .unwrap_or_default() } } From fba56e9f3b565bdb7c2e5acbb13bd9b500afa743 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 29 Sep 2023 08:43:10 +0200 Subject: [PATCH 029/125] remove local patch to parachain staking --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c8c03cba34..aeae1a639f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,8 +55,8 @@ orml-tokens = { git = "https://github.com/mangata-finance//open-runtime-module-l # patch generated by ./scripts/dev_manifest.sh [patch."https://github.com/mangata-finance/moonbeam"] # parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "feature/update-staking-benchmarks" } -# parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "mangata-dev" } -parachain-staking = { path = "../moonbeam/pallets/parachain-staking" } +parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "mangata-dev" } +# parachain-staking = { path = "../moonbeam/pallets/parachain-staking" } [patch."https://github.com/mangata-finance/crowdloan-rewards"] pallet-crowdloan-rewards = { git = "https://github.com/mangata-finance//crowdloan-rewards", branch = "mangata-dev" } From 139b1f199d47315d1bf08108197f3a95080ac001 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sun, 1 Oct 2023 10:01:56 +0000 Subject: [PATCH 030/125] fix formatting --- Cargo.lock | 1 + pallets/proof-of-stake/rpc/src/lib.rs | 34 +++++++++++++-------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2664e59056..7f3ac00573 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7475,6 +7475,7 @@ dependencies = [ [[package]] name = "parachain-staking" version = "3.0.0" +source = "git+https://github.com/mangata-finance//moonbeam?branch=mangata-dev#2ac7a339be795ee58603e3cb68e65fedc1b1c295" dependencies = [ "aquamarine", "frame-benchmarking", diff --git a/pallets/proof-of-stake/rpc/src/lib.rs b/pallets/proof-of-stake/rpc/src/lib.rs index 58d15682cd..2e3798352a 100644 --- a/pallets/proof-of-stake/rpc/src/lib.rs +++ b/pallets/proof-of-stake/rpc/src/lib.rs @@ -81,14 +81,14 @@ where let at = self.client.info().best_hash; api.calculate_native_rewards_amount(at, account, liquidity_token) - .map(Into::::into) - .map_err(|e| { - JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( - 1, - "Unable to serve the request", - Some(format!("{:?}", e)), - ))) - }) + .map(Into::::into) + .map_err(|e| { + JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( + 1, + "Unable to serve the request", + Some(format!("{:?}", e)), + ))) + }) } fn calculate_3rdparty_rewards_amount( @@ -102,17 +102,16 @@ where let at = self.client.info().best_hash; api.calculate_3rdparty_rewards_amount(at, account, liquidity_token, reward_token) - .map(Into::::into) - .map_err(|e| { - JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( - 1, - "Unable to serve the request", - Some(format!("{:?}", e)), - ))) - }) + .map(Into::::into) + .map_err(|e| { + JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( + 1, + "Unable to serve the request", + Some(format!("{:?}", e)), + ))) + }) } - fn calculate_3rdparty_rewards_all( &self, account: AccountId, @@ -131,5 +130,4 @@ where // ))) // }) } - } From 15126f93f8c2b2bf0e7f5b6aed7d574940570f1d Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sun, 1 Oct 2023 10:51:34 +0000 Subject: [PATCH 031/125] fix ut --- pallets/bootstrap/src/mock.rs | 3 +++ pallets/xyk/src/mock.rs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/pallets/bootstrap/src/mock.rs b/pallets/bootstrap/src/mock.rs index 41e286b08a..d748fdeedf 100644 --- a/pallets/bootstrap/src/mock.rs +++ b/pallets/bootstrap/src/mock.rs @@ -165,6 +165,9 @@ impl pallet_proof_of_stake::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10000>; type WeightInfo = (); + type RewardsSchedulesLimit = ConstU32<10>; + type Min3rdPartyRewards = ConstU128<10>; + type ValuationApi = Xyk; } impl BootstrapBenchmarkingConfig for Test {} diff --git a/pallets/xyk/src/mock.rs b/pallets/xyk/src/mock.rs index cefb152129..84be772aed 100644 --- a/pallets/xyk/src/mock.rs +++ b/pallets/xyk/src/mock.rs @@ -329,6 +329,9 @@ impl pallet_proof_of_stake::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10>; type WeightInfo = (); + type RewardsSchedulesLimit = ConstU32<10>; + type Min3rdPartyRewards = ConstU128<10>; + type ValuationApi = XykStorage; } #[cfg(feature = "runtime-benchmarks")] @@ -340,6 +343,9 @@ impl pallet_proof_of_stake::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<1200>; type WeightInfo = (); + type RewardsSchedulesLimit = ConstU32<10>; + type Min3rdPartyRewards = ConstU128<10>; + type ValuationApi = XykStorage; } pub struct TokensActivationPassthrough(PhantomData); From 35b1ebe006757e20a1a8de18d7e1722d7bce2247 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 2 Oct 2023 06:19:16 +0000 Subject: [PATCH 032/125] run PoS runtime benchmarks tests separately --- .github/workflows/reusable-build-and-test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 3242073998..a06b8e3f16 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -225,9 +225,12 @@ jobs: /usr/local/cargo/registry key: cargo-benchmark-cache-${{ inputs.cache_version }}-${{ hashFiles('Cargo.lock') }} - name: Run benchmarks tests - run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock -p pallet-proof-of-stake -p pallet-proof-of-stake + run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock - name: Run benchmarks tests run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-bootstrap + # NOTE: MGX-742 + - name: Run benchmarks tests + run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-proof-of-stake build-and-run-try-runtime: name: Run try-runtime checks From c0fafcdcd1b490a5f30eb891517888644f2e73f2 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 2 Oct 2023 07:37:58 +0000 Subject: [PATCH 033/125] fix runtime benchmarks --- pallets/proof-of-stake/src/benchmarking.rs | 89 +++++++++++----------- pallets/proof-of-stake/src/lib.rs | 3 + pallets/proof-of-stake/src/mock.rs | 2 +- 3 files changed, 49 insertions(+), 45 deletions(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 96a9615c92..986cff9cf3 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -220,31 +220,34 @@ benchmarks! { } } - let native_asset_amount: u128 = MILION * Into::::into(schedules_limit); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewards::get(); + let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit + 1); TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); for _ in 0 .. schedules_limit - 1 { - let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), token_id.into(), MILION.into()).unwrap(); + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), token_id.into(), REWARDS_AMOUNT.into()).unwrap(); let reward_token = token_id + 1; + let balance:u128 = TokensOf::::free_balance(reward_token.into(), &caller).into(); + assert_eq!(balance, REWARDS_AMOUNT); PoS::::reward_pool( RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, token_id), reward_token.into(), - MILION, + REWARDS_AMOUNT, 10u32.into(), ).unwrap(); } - let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), token_id.into(), MILION.into()).unwrap(); + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), token_id.into(), REWARDS_AMOUNT.into()).unwrap(); let reward_token = token_id + 1; PoS::::reward_pool( RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, token_id), reward_token.into(), - MILION, + REWARDS_AMOUNT, 2u32.into(), ).unwrap(); @@ -252,8 +255,8 @@ benchmarks! { forward_to_next_session::(); forward_to_next_session::(); - let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), token_id.into(), MILION.into()).unwrap(); + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), token_id.into(), REWARDS_AMOUNT.into()).unwrap(); let reward_token = token_id + 1; assert_eq!( @@ -261,7 +264,7 @@ benchmarks! { schedules_limit ); - }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,token_id), reward_token.into(), MILION, 10u32.into()) + }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,token_id), reward_token.into(), REWARDS_AMOUNT, 10u32.into()) verify { assert_eq!( @@ -281,32 +284,32 @@ benchmarks! { let schedules_limit = ::RewardsSchedulesLimit::get(); let caller: ::AccountId = whitelisted_caller(); let native_asset_id = ::NativeCurrencyId::get(); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewards::get(); loop { - let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); if token_id > native_asset_id { break; } } - let native_asset_amount: u128 = MILION * Into::::into(schedules_limit); + let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit); TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); - let first_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), first_token_id.into(), MILION.into()).unwrap(); + let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), first_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); let liquidity_asset_id = first_token_id + 1; - let second_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), second_token_id.into(), MILION.into()).unwrap(); + let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), second_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); let reward_token_id = second_token_id + 1; - let rewards_amount = 20_000u128; PoS::::reward_pool( RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, first_token_id), reward_token_id.into(), - rewards_amount, + REWARDS_AMOUNT, 2u32.into(), ).unwrap(); @@ -315,7 +318,7 @@ benchmarks! { forward_to_next_session::(); assert_eq!( PoS::::calculate_3rdparty_rewards_amount(caller, liquidity_asset_id, reward_token_id).unwrap(), - rewards_amount/2 + REWARDS_AMOUNT/2 ) } @@ -330,39 +333,38 @@ benchmarks! { let schedules_limit = ::RewardsSchedulesLimit::get(); let caller: ::AccountId = whitelisted_caller(); let native_asset_id = ::NativeCurrencyId::get(); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewards::get(); loop { - let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); if token_id > native_asset_id { break; } } - let native_asset_amount: u128 = MILION * Into::::into(schedules_limit); + let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit); TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); - let first_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), first_token_id.into(), MILION.into()).unwrap(); + let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), first_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); let liquidity_asset_id = first_token_id + 1; - let second_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), second_token_id.into(), MILION.into()).unwrap(); + let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), second_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); let reward_token_id = second_token_id + 1; - let rewards_amount = 20_000u128; - PoS::::reward_pool( RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, first_token_id), reward_token_id.into(), - rewards_amount, + REWARDS_AMOUNT, 2u32.into(), ).unwrap(); assert!(TokensOf::::ensure_can_withdraw( liquidity_asset_id.into(), &caller, - MILION.into(), + REWARDS_AMOUNT.into(), WithdrawReasons::all(), Default::default(), ).is_ok()); @@ -379,7 +381,7 @@ benchmarks! { TokensOf::::ensure_can_withdraw( liquidity_asset_id.into(), &caller, - MILION.into(), + REWARDS_AMOUNT.into(), WithdrawReasons::all(), Default::default(), ).is_err() @@ -392,7 +394,7 @@ benchmarks! { assert!(TokensOf::::ensure_can_withdraw( liquidity_asset_id.into(), &caller, - MILION.into(), + REWARDS_AMOUNT.into(), WithdrawReasons::all(), Default::default(), ).is_ok()); @@ -411,32 +413,31 @@ benchmarks! { let schedules_limit = ::RewardsSchedulesLimit::get(); let caller: ::AccountId = whitelisted_caller(); let native_asset_id = ::NativeCurrencyId::get(); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewards::get(); loop { - let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); if token_id > native_asset_id { break; } } - let native_asset_amount: u128 = MILION * Into::::into(schedules_limit); + let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit); TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); - let first_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), first_token_id.into(), MILION.into()).unwrap(); + let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), first_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); let liquidity_asset_id = first_token_id + 1; - let second_token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), MILION.into(), second_token_id.into(), MILION.into()).unwrap(); + let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), second_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); let reward_token_id = second_token_id + 1; - let rewards_amount = 20_000u128; - PoS::::reward_pool( RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, first_token_id), reward_token_id.into(), - rewards_amount, + REWARDS_AMOUNT, 2u32.into(), ).unwrap(); @@ -451,17 +452,17 @@ benchmarks! { forward_to_next_session::(); assert_eq!( PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), - 10_000u128 + REWARDS_AMOUNT / 2 ); forward_to_next_session::(); assert_eq!( PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), - 20_000u128 + REWARDS_AMOUNT ); forward_to_next_session::(); assert_eq!( PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), - 20_000u128 + REWARDS_AMOUNT ); let balance_before:u128 = TokensOf::::free_balance(reward_token_id.into(), &caller).into(); @@ -475,7 +476,7 @@ benchmarks! { 0u128 ); - assert_eq!(balance_after - balance_before, 20_000u128); + assert_eq!(balance_after - balance_before, REWARDS_AMOUNT); } impl_benchmark_test_suite!(PoS, crate::mock::new_test_ext(), crate::mock::Test) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 5a4e97cd1d..aeae157e53 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -509,6 +509,9 @@ pub mod pallet { Error::::RewardTokenNotPairdWithNativeToken ); + let valutation = + ::ValuationApi::valuate_liquidity_token(liquidity_token_id, amount); + ensure!( ::ValuationApi::valuate_liquidity_token(liquidity_token_id, amount) >= T::Min3rdPartyRewards::get() || diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index cd50e1cce0..e87d04afd3 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -299,7 +299,7 @@ impl pos::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10>; type RewardsSchedulesLimit = ConstU32<10>; - type Min3rdPartyRewards = ConstU128<10>; + type Min3rdPartyRewards = ConstU128<100_000>; type WeightInfo = (); type ValuationApi = Xyk; } From 80b9c92869ea4f2577f1945970b68ab2d05b39c5 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 2 Oct 2023 22:47:08 +0200 Subject: [PATCH 034/125] apply benchmarks from ref machine --- .../src/weights/block_weights.rs | 21 +- .../src/weights/extrinsic_weights.rs | 21 +- .../src/weights/frame_system.rs | 58 ++-- .../src/weights/orml_asset_registry.rs | 10 +- .../mangata-kusama/src/weights/orml_tokens.rs | 30 +- .../src/weights/pallet_bootstrap.rs | 18 +- .../src/weights/pallet_collective_mangata.rs | 242 ++++++------- .../src/weights/pallet_crowdloan_rewards.rs | 216 ++++++------ .../src/weights/pallet_fee_lock.rs | 10 +- .../src/weights/pallet_issuance.rs | 22 +- .../weights/pallet_multipurpose_liquidity.rs | 10 +- .../src/weights/pallet_proof_of_stake.rs | 231 +++++++++---- .../src/weights/pallet_session.rs | 10 +- .../src/weights/pallet_timestamp.rs | 10 +- .../src/weights/pallet_treasury.rs | 42 +-- .../src/weights/pallet_utility_mangata.rs | 46 +-- .../src/weights/pallet_vesting_mangata.rs | 86 ++--- .../mangata-kusama/src/weights/pallet_xyk.rs | 170 +++++----- .../src/weights/parachain_staking.rs | 318 +++++++++--------- .../src/weights/block_weights.rs | 21 +- .../src/weights/extrinsic_weights.rs | 21 +- .../src/weights/frame_system.rs | 58 ++-- .../src/weights/orml_asset_registry.rs | 10 +- .../mangata-rococo/src/weights/orml_tokens.rs | 30 +- .../src/weights/pallet_bootstrap.rs | 18 +- .../src/weights/pallet_collective_mangata.rs | 242 ++++++------- .../src/weights/pallet_crowdloan_rewards.rs | 216 ++++++------ .../src/weights/pallet_fee_lock.rs | 10 +- .../src/weights/pallet_issuance.rs | 22 +- .../weights/pallet_multipurpose_liquidity.rs | 10 +- .../src/weights/pallet_proof_of_stake.rs | 231 +++++++++---- .../src/weights/pallet_session.rs | 10 +- .../src/weights/pallet_timestamp.rs | 10 +- .../src/weights/pallet_treasury.rs | 42 +-- .../src/weights/pallet_utility_mangata.rs | 46 +-- .../src/weights/pallet_vesting_mangata.rs | 86 ++--- .../mangata-rococo/src/weights/pallet_xyk.rs | 170 +++++----- .../src/weights/parachain_staking.rs | 318 +++++++++--------- 38 files changed, 1726 insertions(+), 1416 deletions(-) diff --git a/runtime/mangata-kusama/src/weights/block_weights.rs b/runtime/mangata-kusama/src/weights/block_weights.rs index 1e38e0097a..e190a4a858 100644 --- a/runtime/mangata-kusama/src/weights/block_weights.rs +++ b/runtime/mangata-kusama/src/weights/block_weights.rs @@ -1,6 +1,7 @@ + //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18 (Y/M/D) -//! HOSTNAME: `995c44fb4e67`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-10-02 (Y/M/D) +//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -29,17 +30,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 7_631_910, 8_052_540 - /// Average: 7_692_887 - /// Median: 7_661_290 - /// Std-Dev: 104885.3 + /// Min, Max: 7_983_500, 8_609_050 + /// Average: 8_057_882 + /// Median: 8_023_430 + /// Std-Dev: 118109.32 /// /// Percentiles nanoseconds: - /// 99th: 8_034_380 - /// 95th: 8_023_380 - /// 75th: 7_674_100 + /// 99th: 8_567_140 + /// 95th: 8_382_280 + /// 75th: 8_036_000 pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(7_692_887), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(8_057_882), 0); } #[cfg(test)] diff --git a/runtime/mangata-kusama/src/weights/extrinsic_weights.rs b/runtime/mangata-kusama/src/weights/extrinsic_weights.rs index 92fca50754..033bf75d8f 100644 --- a/runtime/mangata-kusama/src/weights/extrinsic_weights.rs +++ b/runtime/mangata-kusama/src/weights/extrinsic_weights.rs @@ -1,6 +1,7 @@ + //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18 (Y/M/D) -//! HOSTNAME: `995c44fb4e67`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-10-02 (Y/M/D) +//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -29,17 +30,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 114_329, 115_887 - /// Average: 114_756 - /// Median: 114_639 - /// Std-Dev: 309.81 + /// Min, Max: 116_665, 118_803 + /// Average: 117_078 + /// Median: 117_010 + /// Std-Dev: 306.32 /// /// Percentiles nanoseconds: - /// 99th: 115_799 - /// 95th: 115_437 - /// 75th: 114_859 + /// 99th: 118_109 + /// 95th: 117_513 + /// 75th: 117_236 pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(114_756), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(117_078), 0); } #[cfg(test)] diff --git a/runtime/mangata-kusama/src/weights/frame_system.rs b/runtime/mangata-kusama/src/weights/frame_system.rs index e2b9f77ec8..9bcfdbb3d8 100644 --- a/runtime/mangata-kusama/src/weights/frame_system.rs +++ b/runtime/mangata-kusama/src/weights/frame_system.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,46 +68,46 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl frame_system::WeightInfo for ModuleWeight { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(10_114_579, 0)) + (Weight::from_parts(9_964_525, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(518, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(30_615_946, 0)) + (Weight::from_parts(29_205_376, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(1_708, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) // Storage: unknown `0x3a686561707061676573` (r:0 w:1) // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_640_000, 0)) + (Weight::from_parts(7_610_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_030_000, 0)) - // Standard Error: 2_557 - .saturating_add((Weight::from_parts(1_227_455, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_160_000, 0)) + // Standard Error: 2_435 + .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_170_000, 0)) - // Standard Error: 1_127 - .saturating_add((Weight::from_parts(837_671, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_090_000, 0)) + // Standard Error: 1_110 + .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_530_000, 0)) - // Standard Error: 1_363 - .saturating_add((Weight::from_parts(1_454_847, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_640_000, 0)) + // Standard Error: 1_374 + .saturating_add((Weight::from_parts(1_459_706, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } @@ -116,46 +116,46 @@ impl frame_system::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(10_114_579, 0)) + (Weight::from_parts(9_964_525, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(518, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(30_615_946, 0)) + (Weight::from_parts(29_205_376, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(1_708, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) // Storage: unknown `0x3a686561707061676573` (r:0 w:1) // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_640_000, 0)) + (Weight::from_parts(7_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_030_000, 0)) - // Standard Error: 2_557 - .saturating_add((Weight::from_parts(1_227_455, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_160_000, 0)) + // Standard Error: 2_435 + .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_170_000, 0)) - // Standard Error: 1_127 - .saturating_add((Weight::from_parts(837_671, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_090_000, 0)) + // Standard Error: 1_110 + .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_530_000, 0)) - // Standard Error: 1_363 - .saturating_add((Weight::from_parts(1_454_847, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_640_000, 0)) + // Standard Error: 1_374 + .saturating_add((Weight::from_parts(1_459_706, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } diff --git a/runtime/mangata-kusama/src/weights/orml_asset_registry.rs b/runtime/mangata-kusama/src/weights/orml_asset_registry.rs index 341ffe99df..8242233fca 100644 --- a/runtime/mangata-kusama/src/weights/orml_asset_registry.rs +++ b/runtime/mangata-kusama/src/weights/orml_asset_registry.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for orml_asset_registry //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -72,7 +72,7 @@ impl orml_asset_registry::WeightInfo for ModuleWeight Weight { - (Weight::from_parts(48_380_000, 0)) + (Weight::from_parts(48_560_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -81,7 +81,7 @@ impl orml_asset_registry::WeightInfo for ModuleWeight Weight { - (Weight::from_parts(33_520_000, 0)) + (Weight::from_parts(33_480_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -98,7 +98,7 @@ impl WeightInfo for () { // Storage: AssetRegistry LocationToAssetId (r:1 w:1) // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) fn register_asset() -> Weight { - (Weight::from_parts(48_380_000, 0)) + (Weight::from_parts(48_560_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -107,7 +107,7 @@ impl WeightInfo for () { // Storage: AssetRegistry LocationToAssetId (r:1 w:1) // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) fn update_asset() -> Weight { - (Weight::from_parts(33_520_000, 0)) + (Weight::from_parts(33_480_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/orml_tokens.rs b/runtime/mangata-kusama/src/weights/orml_tokens.rs index 06359ec572..5508f3d7cb 100644 --- a/runtime/mangata-kusama/src/weights/orml_tokens.rs +++ b/runtime/mangata-kusama/src/weights/orml_tokens.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for orml_tokens //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -73,7 +73,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer() -> Weight { - (Weight::from_parts(53_910_000, 0)) + (Weight::from_parts(54_300_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -82,7 +82,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_all() -> Weight { - (Weight::from_parts(56_060_000, 0)) + (Weight::from_parts(56_740_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -91,7 +91,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(51_300_000, 0)) + (Weight::from_parts(52_380_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -100,7 +100,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn force_transfer() -> Weight { - (Weight::from_parts(57_360_000, 0)) + (Weight::from_parts(58_360_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -109,7 +109,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn set_balance() -> Weight { - (Weight::from_parts(31_560_000, 0)) + (Weight::from_parts(32_250_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -122,7 +122,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn create() -> Weight { - (Weight::from_parts(58_330_000, 0)) + (Weight::from_parts(58_930_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -135,7 +135,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn mint() -> Weight { - (Weight::from_parts(58_720_000, 0)) + (Weight::from_parts(59_170_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -148,7 +148,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer() -> Weight { - (Weight::from_parts(53_910_000, 0)) + (Weight::from_parts(54_300_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -157,7 +157,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_all() -> Weight { - (Weight::from_parts(56_060_000, 0)) + (Weight::from_parts(56_740_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -166,7 +166,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(51_300_000, 0)) + (Weight::from_parts(52_380_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -175,7 +175,7 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn force_transfer() -> Weight { - (Weight::from_parts(57_360_000, 0)) + (Weight::from_parts(58_360_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -184,7 +184,7 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn set_balance() -> Weight { - (Weight::from_parts(31_560_000, 0)) + (Weight::from_parts(32_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -197,7 +197,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn create() -> Weight { - (Weight::from_parts(58_330_000, 0)) + (Weight::from_parts(58_930_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -210,7 +210,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn mint() -> Weight { - (Weight::from_parts(58_720_000, 0)) + (Weight::from_parts(59_170_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs b/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs index b07baf19f9..7ebdf94b14 100644 --- a/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs +++ b/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_bootstrap //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -78,7 +78,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_440_000, 0)) + (Weight::from_parts(34_000_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -103,7 +103,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn provision() -> Weight { - (Weight::from_parts(103_400_000, 0)) + (Weight::from_parts(106_729_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -136,7 +136,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(216_740_000, 0)) + (Weight::from_parts(226_960_000, 0)) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -167,7 +167,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn finalize() -> Weight { - (Weight::from_parts(79_290_000, 0)) + (Weight::from_parts(79_150_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -188,7 +188,7 @@ impl WeightInfo for () { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_440_000, 0)) + (Weight::from_parts(34_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -213,7 +213,7 @@ impl WeightInfo for () { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn provision() -> Weight { - (Weight::from_parts(103_400_000, 0)) + (Weight::from_parts(106_729_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -246,7 +246,7 @@ impl WeightInfo for () { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(216_740_000, 0)) + (Weight::from_parts(226_960_000, 0)) .saturating_add(RocksDbWeight::get().reads(17 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -277,7 +277,7 @@ impl WeightInfo for () { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn finalize() -> Weight { - (Weight::from_parts(79_290_000, 0)) + (Weight::from_parts(79_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs b/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs index ff2788893c..ded612958c 100644 --- a/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs +++ b/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_collective_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -80,11 +80,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Prime (r:0 w:1) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_140_000, 0)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(5_481_522, 0)).saturating_mul(m as u64)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(10_538_444, 0)).saturating_mul(p as u64)) + (Weight::from_parts(90_800_000, 0)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -93,11 +93,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Members (r:1 w:0) // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(29_943_956, 0)) - // Standard Error: 73 - .saturating_add((Weight::from_parts(2_027, 0)).saturating_mul(b as u64)) - // Standard Error: 761 - .saturating_add((Weight::from_parts(27_217, 0)).saturating_mul(m as u64)) + (Weight::from_parts(31_313_537, 0)) + // Standard Error: 94 + .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) + // Standard Error: 972 + .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -105,11 +105,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:1 w:0) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(33_627_672, 0)) - // Standard Error: 82 - .saturating_add((Weight::from_parts(2_315, 0)).saturating_mul(b as u64)) - // Standard Error: 855 - .saturating_add((Weight::from_parts(45_555, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_536_810, 0)) + // Standard Error: 85 + .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) + // Standard Error: 883 + .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -125,13 +125,13 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Voting (r:0 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(48_107_905, 0)) - // Standard Error: 148 - .saturating_add((Weight::from_parts(4_689, 0)).saturating_mul(b as u64)) - // Standard Error: 1_547 - .saturating_add((Weight::from_parts(33_696, 0)).saturating_mul(m as u64)) - // Standard Error: 1_527 - .saturating_add((Weight::from_parts(306_730, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_784_354, 0)) + // Standard Error: 163 + .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) + // Standard Error: 1_705 + .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) + // Standard Error: 1_683 + .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -140,58 +140,58 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_661_933, 0)) - // Standard Error: 1_152 - .saturating_add((Weight::from_parts(70_484, 0)).saturating_mul(m as u64)) + (Weight::from_parts(45_999_012, 0)) + // Standard Error: 944 + .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(65_240_157, 0)) - // Standard Error: 1_748 - .saturating_add((Weight::from_parts(56_035, 0)).saturating_mul(m as u64)) - // Standard Error: 1_704 - .saturating_add((Weight::from_parts(287_256, 0)).saturating_mul(p as u64)) + (Weight::from_parts(67_599_850, 0)) + // Standard Error: 1_737 + .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) + // Standard Error: 1_694 + .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_748_886, 0)) - // Standard Error: 304 - .saturating_add((Weight::from_parts(2_436, 0)).saturating_mul(b as u64)) - // Standard Error: 3_220 - .saturating_add((Weight::from_parts(73_314, 0)).saturating_mul(m as u64)) - // Standard Error: 3_139 - .saturating_add((Weight::from_parts(313_478, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_619_427, 0)) + // Standard Error: 307 + .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) + // Standard Error: 3_251 + .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) + // Standard Error: 3_169 + .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) @@ -199,20 +199,20 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(69_217_092, 0)) - // Standard Error: 1_867 - .saturating_add((Weight::from_parts(66_672, 0)).saturating_mul(m as u64)) - // Standard Error: 1_821 - .saturating_add((Weight::from_parts(286_625, 0)).saturating_mul(p as u64)) + (Weight::from_parts(71_391_246, 0)) + // Standard Error: 1_912 + .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) + // Standard Error: 1_865 + .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) @@ -220,13 +220,13 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(95_973_593, 0)) - // Standard Error: 310 - .saturating_add((Weight::from_parts(2_185, 0)).saturating_mul(b as u64)) - // Standard Error: 3_288 - .saturating_add((Weight::from_parts(68_870, 0)).saturating_mul(m as u64)) - // Standard Error: 3_205 - .saturating_add((Weight::from_parts(311_244, 0)).saturating_mul(p as u64)) + (Weight::from_parts(98_330_423, 0)) + // Standard Error: 297 + .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) + // Standard Error: 3_149 + .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) + // Standard Error: 3_070 + .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -239,9 +239,9 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_150_886, 0)) - // Standard Error: 1_532 - .saturating_add((Weight::from_parts(281_687, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_844_726, 0)) + // Standard Error: 1_413 + .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -258,11 +258,11 @@ impl WeightInfo for () { // Storage: Council Prime (r:0 w:1) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_140_000, 0)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(5_481_522, 0)).saturating_mul(m as u64)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(10_538_444, 0)).saturating_mul(p as u64)) + (Weight::from_parts(90_800_000, 0)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) @@ -271,11 +271,11 @@ impl WeightInfo for () { // Storage: Council Members (r:1 w:0) // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(29_943_956, 0)) - // Standard Error: 73 - .saturating_add((Weight::from_parts(2_027, 0)).saturating_mul(b as u64)) - // Standard Error: 761 - .saturating_add((Weight::from_parts(27_217, 0)).saturating_mul(m as u64)) + (Weight::from_parts(31_313_537, 0)) + // Standard Error: 94 + .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) + // Standard Error: 972 + .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -283,11 +283,11 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:1 w:0) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(33_627_672, 0)) - // Standard Error: 82 - .saturating_add((Weight::from_parts(2_315, 0)).saturating_mul(b as u64)) - // Standard Error: 855 - .saturating_add((Weight::from_parts(45_555, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_536_810, 0)) + // Standard Error: 85 + .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) + // Standard Error: 883 + .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -303,13 +303,13 @@ impl WeightInfo for () { // Storage: Council Voting (r:0 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(48_107_905, 0)) - // Standard Error: 148 - .saturating_add((Weight::from_parts(4_689, 0)).saturating_mul(b as u64)) - // Standard Error: 1_547 - .saturating_add((Weight::from_parts(33_696, 0)).saturating_mul(m as u64)) - // Standard Error: 1_527 - .saturating_add((Weight::from_parts(306_730, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_784_354, 0)) + // Standard Error: 163 + .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) + // Standard Error: 1_705 + .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) + // Standard Error: 1_683 + .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -318,58 +318,58 @@ impl WeightInfo for () { // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_661_933, 0)) - // Standard Error: 1_152 - .saturating_add((Weight::from_parts(70_484, 0)).saturating_mul(m as u64)) + (Weight::from_parts(45_999_012, 0)) + // Standard Error: 944 + .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(65_240_157, 0)) - // Standard Error: 1_748 - .saturating_add((Weight::from_parts(56_035, 0)).saturating_mul(m as u64)) - // Standard Error: 1_704 - .saturating_add((Weight::from_parts(287_256, 0)).saturating_mul(p as u64)) + (Weight::from_parts(67_599_850, 0)) + // Standard Error: 1_737 + .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) + // Standard Error: 1_694 + .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_748_886, 0)) - // Standard Error: 304 - .saturating_add((Weight::from_parts(2_436, 0)).saturating_mul(b as u64)) - // Standard Error: 3_220 - .saturating_add((Weight::from_parts(73_314, 0)).saturating_mul(m as u64)) - // Standard Error: 3_139 - .saturating_add((Weight::from_parts(313_478, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_619_427, 0)) + // Standard Error: 307 + .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) + // Standard Error: 3_251 + .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) + // Standard Error: 3_169 + .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) @@ -377,20 +377,20 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(69_217_092, 0)) - // Standard Error: 1_867 - .saturating_add((Weight::from_parts(66_672, 0)).saturating_mul(m as u64)) - // Standard Error: 1_821 - .saturating_add((Weight::from_parts(286_625, 0)).saturating_mul(p as u64)) + (Weight::from_parts(71_391_246, 0)) + // Standard Error: 1_912 + .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) + // Standard Error: 1_865 + .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) @@ -398,13 +398,13 @@ impl WeightInfo for () { // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(95_973_593, 0)) - // Standard Error: 310 - .saturating_add((Weight::from_parts(2_185, 0)).saturating_mul(b as u64)) - // Standard Error: 3_288 - .saturating_add((Weight::from_parts(68_870, 0)).saturating_mul(m as u64)) - // Standard Error: 3_205 - .saturating_add((Weight::from_parts(311_244, 0)).saturating_mul(p as u64)) + (Weight::from_parts(98_330_423, 0)) + // Standard Error: 297 + .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) + // Standard Error: 3_149 + .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) + // Standard Error: 3_070 + .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -417,9 +417,9 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_150_886, 0)) - // Standard Error: 1_532 - .saturating_add((Weight::from_parts(281_687, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_844_726, 0)) + // Standard Error: 1_413 + .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs b/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs index dbdf56c152..a0016cb225 100644 --- a/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs +++ b/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_crowdloan_rewards //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,220 +68,234 @@ pub trait WeightInfo { /// Weights for pallet_crowdloan_rewards using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_crowdloan_rewards::WeightInfo for ModuleWeight { + // Storage: Crowdloan Initialized (r:1 w:0) + // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(5_800_000, 0)) + (Weight::from_parts(13_860_000, 0)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:100 w:0) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:100 w:100) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(170_661_769, 0)) - // Standard Error: 50_081 - .saturating_add((Weight::from_parts(71_125_436, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(x as u64))) + (Weight::from_parts(95_783_300, 0)) + // Standard Error: 25_873 + .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: Crowdloan Initialized (r:1 w:1) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:0 w:1) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) fn complete_initialization() -> Weight { - (Weight::from_parts(21_060_000, 0)) + (Weight::from_parts(27_331_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: Vesting Vesting (r:1 w:1) + // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) + // Storage: Tokens Locks (r:1 w:1) + // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn claim() -> Weight { - (Weight::from_parts(68_230_000, 0)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + (Weight::from_parts(129_060_000, 0)) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn update_reward_address() -> Weight { - (Weight::from_parts(31_860_000, 0)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + (Weight::from_parts(34_900_000, 0)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:1 w:1) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn associate_native_identity() -> Weight { - (Weight::from_parts(147_350_000, 0)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + (Weight::from_parts(114_790_000, 0)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(34_693_550, 0)) - // Standard Error: 8_870 - .saturating_add((Weight::from_parts(62_853_805, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + (Weight::from_parts(42_648_512, 0)) + // Standard Error: 10_539 + .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { + // Storage: Crowdloan Initialized (r:1 w:0) + // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(5_800_000, 0)) + (Weight::from_parts(13_860_000, 0)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:100 w:0) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:100 w:100) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(170_661_769, 0)) - // Standard Error: 50_081 - .saturating_add((Weight::from_parts(71_125_436, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(6 as u64)) - .saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) - .saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(x as u64))) + (Weight::from_parts(95_783_300, 0)) + // Standard Error: 25_873 + .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) + .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: Crowdloan Initialized (r:1 w:1) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:0 w:1) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) fn complete_initialization() -> Weight { - (Weight::from_parts(21_060_000, 0)) + (Weight::from_parts(27_331_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: Vesting Vesting (r:1 w:1) + // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) + // Storage: Tokens Locks (r:1 w:1) + // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn claim() -> Weight { - (Weight::from_parts(68_230_000, 0)) - .saturating_add(RocksDbWeight::get().reads(7 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + (Weight::from_parts(129_060_000, 0)) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn update_reward_address() -> Weight { - (Weight::from_parts(31_860_000, 0)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) + (Weight::from_parts(34_900_000, 0)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:1 w:1) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn associate_native_identity() -> Weight { - (Weight::from_parts(147_350_000, 0)) - .saturating_add(RocksDbWeight::get().reads(6 as u64)) - .saturating_add(RocksDbWeight::get().writes(5 as u64)) + (Weight::from_parts(114_790_000, 0)) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(34_693_550, 0)) - // Standard Error: 8_870 - .saturating_add((Weight::from_parts(62_853_805, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) + (Weight::from_parts(42_648_512, 0)) + // Standard Error: 10_539 + .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } } diff --git a/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs b/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs index 5320f4b45e..7057d5cf29 100644 --- a/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs +++ b/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_fee_lock //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -66,7 +66,7 @@ impl pallet_fee_lock::WeightInfo for ModuleWeight { // Storage: FeeLock FeeLockMetadata (r:1 w:1) // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(30_789_000, 0)) + (Weight::from_parts(31_000_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -81,7 +81,7 @@ impl pallet_fee_lock::WeightInfo for ModuleWeight { // Storage: FeeLock UnlockQueue (r:1 w:1) // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn unlock_fee() -> Weight { - (Weight::from_parts(56_080_000, 0)) + (Weight::from_parts(56_920_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -92,7 +92,7 @@ impl WeightInfo for () { // Storage: FeeLock FeeLockMetadata (r:1 w:1) // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(30_789_000, 0)) + (Weight::from_parts(31_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -107,7 +107,7 @@ impl WeightInfo for () { // Storage: FeeLock UnlockQueue (r:1 w:1) // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn unlock_fee() -> Weight { - (Weight::from_parts(56_080_000, 0)) + (Weight::from_parts(56_920_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_issuance.rs b/runtime/mangata-kusama/src/weights/pallet_issuance.rs index 5df4b34f6d..c7f3821ac2 100644 --- a/runtime/mangata-kusama/src/weights/pallet_issuance.rs +++ b/runtime/mangata-kusama/src/weights/pallet_issuance.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_issuance //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -71,14 +71,14 @@ impl pallet_issuance::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:0) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_870_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Issuance IsTGEFinalized (r:1 w:1) // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) fn finalize_tge() -> Weight { - (Weight::from_parts(15_849_000, 0)) + (Weight::from_parts(15_920_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -97,9 +97,9 @@ impl pallet_issuance::WeightInfo for ModuleWeight { // Storage: Issuance TGETotal (r:1 w:1) // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(26_585_737, 0)) - // Standard Error: 16_829 - .saturating_add((Weight::from_parts(83_061_110, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_064_606, 0)) + // Standard Error: 26_264 + .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -116,14 +116,14 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:0) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_870_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Issuance IsTGEFinalized (r:1 w:1) // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) fn finalize_tge() -> Weight { - (Weight::from_parts(15_849_000, 0)) + (Weight::from_parts(15_920_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -142,9 +142,9 @@ impl WeightInfo for () { // Storage: Issuance TGETotal (r:1 w:1) // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(26_585_737, 0)) - // Standard Error: 16_829 - .saturating_add((Weight::from_parts(83_061_110, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_064_606, 0)) + // Standard Error: 26_264 + .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) diff --git a/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs b/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs index 3fb479e9b7..4e536d93e4 100644 --- a/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs +++ b/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_multipurpose_liquidity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -76,7 +76,7 @@ impl pallet_multipurpose_liquidity::WeightInfo for Modu // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(127_250_000, 0)) + (Weight::from_parts(130_870_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -91,7 +91,7 @@ impl pallet_multipurpose_liquidity::WeightInfo for Modu // Storage: Tokens Locks (r:1 w:1) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(122_689_000, 0)) + (Weight::from_parts(126_300_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -112,7 +112,7 @@ impl WeightInfo for () { // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(127_250_000, 0)) + (Weight::from_parts(130_870_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -127,7 +127,7 @@ impl WeightInfo for () { // Storage: Tokens Locks (r:1 w:1) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(122_689_000, 0)) + (Weight::from_parts(126_300_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs b/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs index 99a6a2573d..6aac9c8080 100644 --- a/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs +++ b/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_proof_of_stake //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -57,13 +57,13 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_proof_of_stake. pub trait WeightInfo { fn claim_native_rewards() -> Weight; - fn claim_3rdparty_rewards() -> Weight; fn update_pool_promotion() -> Weight; fn activate_liquidity_for_native_rewards() -> Weight; fn deactivate_liquidity_for_native_rewards() -> Weight; - fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; - fn activate_liquidity_for_3rdparty_rewards() -> Weight; fn reward_pool() -> Weight; + fn activate_liquidity_for_3rdparty_rewards() -> Weight; + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; + fn claim_3rdparty_rewards() -> Weight; } /// Weights for pallet_proof_of_stake using the Mangata node and recommended hardware. @@ -76,20 +76,14 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn claim_native_rewards() -> Weight { - (Weight::from_parts(81_410_000, 0)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - - fn claim_3rdparty_rewards() -> Weight { - (Weight::from_parts(81_410_000, 0)) + (Weight::from_parts(86_750_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_600_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -104,7 +98,7 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn activate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(94_130_000, 0)) + (Weight::from_parts(100_109_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -119,61 +113,113 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn deactivate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(82_600_000, 0)) + (Weight::from_parts(91_990_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - - - fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Xyk LiquidityPools (r:1 w:0) + // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: Xyk Pools (r:1 w:0) + // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleId (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + fn reward_pool() -> Weight { + (Weight::from_parts(179_050_000, 0)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } - + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) fn activate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + (Weight::from_parts(120_360_000, 0)) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } - - fn reward_pool() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(125_160_000, 0)) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } -} - -// For backwards compatibility and tests -impl WeightInfo for () { // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_native_rewards() -> Weight { - (Weight::from_parts(81_410_000, 0)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(94_980_000, 0)) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } +} +// For backwards compatibility and tests +impl WeightInfo for () { // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake RewardsInfo (r:1 w:1) // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_3rdparty_rewards() -> Weight { - (Weight::from_parts(81_410_000, 0)) + fn claim_native_rewards() -> Weight { + (Weight::from_parts(86_750_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_600_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -188,7 +234,7 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn activate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(94_130_000, 0)) + (Weight::from_parts(100_109_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -203,27 +249,92 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn deactivate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(82_600_000, 0)) + (Weight::from_parts(91_990_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - - fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Xyk LiquidityPools (r:1 w:0) + // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: Xyk Pools (r:1 w:0) + // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleId (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + fn reward_pool() -> Weight { + (Weight::from_parts(179_050_000, 0)) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) fn activate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + (Weight::from_parts(120_360_000, 0)) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - - fn reward_pool() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(125_160_000, 0)) + .saturating_add(RocksDbWeight::get().reads(11 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(94_980_000, 0)) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - } diff --git a/runtime/mangata-kusama/src/weights/pallet_session.rs b/runtime/mangata-kusama/src/weights/pallet_session.rs index 1a2b8fef84..3b9299b1a8 100644 --- a/runtime/mangata-kusama/src/weights/pallet_session.rs +++ b/runtime/mangata-kusama/src/weights/pallet_session.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,7 +68,7 @@ impl pallet_session::WeightInfo for ModuleWeight { // Storage: Session KeyOwner (r:1 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_480_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,7 +77,7 @@ impl pallet_session::WeightInfo for ModuleWeight { // Storage: Session KeyOwner (r:0 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { - (Weight::from_parts(17_900_000, 0)) + (Weight::from_parts(17_880_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -90,7 +90,7 @@ impl WeightInfo for () { // Storage: Session KeyOwner (r:1 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_480_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -99,7 +99,7 @@ impl WeightInfo for () { // Storage: Session KeyOwner (r:0 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { - (Weight::from_parts(17_900_000, 0)) + (Weight::from_parts(17_880_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_timestamp.rs b/runtime/mangata-kusama/src/weights/pallet_timestamp.rs index a2a3ba9ec3..a32d4dafb2 100644 --- a/runtime/mangata-kusama/src/weights/pallet_timestamp.rs +++ b/runtime/mangata-kusama/src/weights/pallet_timestamp.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -66,12 +66,12 @@ impl pallet_timestamp::WeightInfo for ModuleWeight { // Storage: Timestamp Now (r:1 w:1) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - (Weight::from_parts(11_000_000, 0)) + (Weight::from_parts(10_120_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_280_000, 0)) + (Weight::from_parts(5_220_000, 0)) } } @@ -80,11 +80,11 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:1) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - (Weight::from_parts(11_000_000, 0)) + (Weight::from_parts(10_120_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_280_000, 0)) + (Weight::from_parts(5_220_000, 0)) } } diff --git a/runtime/mangata-kusama/src/weights/pallet_treasury.rs b/runtime/mangata-kusama/src/weights/pallet_treasury.rs index 34eb8ab30f..89616a60b5 100644 --- a/runtime/mangata-kusama/src/weights/pallet_treasury.rs +++ b/runtime/mangata-kusama/src/weights/pallet_treasury.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,7 +68,7 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_treasury::WeightInfo for ModuleWeight { fn spend() -> Weight { - (Weight::from_parts(420_000, 0)) + (Weight::from_parts(530_000, 0)) } // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -77,7 +77,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Treasury Proposals (r:0 w:1) // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - (Weight::from_parts(45_080_000, 0)) + (Weight::from_parts(46_150_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -88,7 +88,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - (Weight::from_parts(50_770_000, 0)) + (Weight::from_parts(52_520_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -97,16 +97,16 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_245_010, 0)) - // Standard Error: 1_597 - .saturating_add((Weight::from_parts(65_488, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_564_531, 0)) + // Standard Error: 1_841 + .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { - (Weight::from_parts(12_149_000, 0)) + (Weight::from_parts(12_011_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -121,9 +121,9 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(40_502_670, 0)) - // Standard Error: 6_134 - .saturating_add((Weight::from_parts(4_155_700, 0)).saturating_mul(p as u64)) + (Weight::from_parts(41_108_943, 0)) + // Standard Error: 7_113 + .saturating_add((Weight::from_parts(4_261_200, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -133,7 +133,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { fn spend() -> Weight { - (Weight::from_parts(420_000, 0)) + (Weight::from_parts(530_000, 0)) } // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -142,7 +142,7 @@ impl WeightInfo for () { // Storage: Treasury Proposals (r:0 w:1) // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - (Weight::from_parts(45_080_000, 0)) + (Weight::from_parts(46_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -153,7 +153,7 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - (Weight::from_parts(50_770_000, 0)) + (Weight::from_parts(52_520_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -162,16 +162,16 @@ impl WeightInfo for () { // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_245_010, 0)) - // Standard Error: 1_597 - .saturating_add((Weight::from_parts(65_488, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_564_531, 0)) + // Standard Error: 1_841 + .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { - (Weight::from_parts(12_149_000, 0)) + (Weight::from_parts(12_011_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -186,9 +186,9 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(40_502_670, 0)) - // Standard Error: 6_134 - .saturating_add((Weight::from_parts(4_155_700, 0)).saturating_mul(p as u64)) + (Weight::from_parts(41_108_943, 0)) + // Standard Error: 7_113 + .saturating_add((Weight::from_parts(4_261_200, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) diff --git a/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs b/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs index 8f55cdf831..933c8abfba 100644 --- a/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs +++ b/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_utility_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -67,49 +67,49 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_utility_mangata::WeightInfo for ModuleWeight { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(19_140_183, 0)) - // Standard Error: 3_444 - .saturating_add((Weight::from_parts(9_410_608, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_547_364, 0)) + // Standard Error: 3_907 + .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_100_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(14_978_625, 0)) - // Standard Error: 2_992 - .saturating_add((Weight::from_parts(9_802_086, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_586_041, 0)) + // Standard Error: 3_411 + .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(16_510_000, 0)) + (Weight::from_parts(17_000_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(18_073_256, 0)) - // Standard Error: 3_525 - .saturating_add((Weight::from_parts(9_368_770, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_747_173, 0)) + // Standard Error: 3_163 + .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(19_140_183, 0)) - // Standard Error: 3_444 - .saturating_add((Weight::from_parts(9_410_608, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_547_364, 0)) + // Standard Error: 3_907 + .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_100_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(14_978_625, 0)) - // Standard Error: 2_992 - .saturating_add((Weight::from_parts(9_802_086, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_586_041, 0)) + // Standard Error: 3_411 + .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(16_510_000, 0)) + (Weight::from_parts(17_000_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(18_073_256, 0)) - // Standard Error: 3_525 - .saturating_add((Weight::from_parts(9_368_770, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_747_173, 0)) + // Standard Error: 3_163 + .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) } } diff --git a/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs b/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs index f58fc1d6e6..1c975632c9 100644 --- a/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs +++ b/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_vesting_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -75,9 +75,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_309_417, 0)) - // Standard Error: 7_565 - .saturating_add((Weight::from_parts(219_965, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_243_152, 0)) + // Standard Error: 7_939 + .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -88,9 +88,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_355_755, 0)) - // Standard Error: 3_270 - .saturating_add((Weight::from_parts(44_362, 0)).saturating_mul(s as u64)) + (Weight::from_parts(73_252_114, 0)) + // Standard Error: 3_434 + .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -101,9 +101,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_645_987, 0)) - // Standard Error: 7_779 - .saturating_add((Weight::from_parts(207_339, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_977_339, 0)) + // Standard Error: 7_858 + .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -116,9 +116,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_436_663, 0)) - // Standard Error: 2_844 - .saturating_add((Weight::from_parts(76_147, 0)).saturating_mul(s as u64)) + (Weight::from_parts(72_574_520, 0)) + // Standard Error: 3_250 + .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -131,9 +131,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Locks (r:1 w:0) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(83_196_714, 0)) - // Standard Error: 29_574 - .saturating_add((Weight::from_parts(415_253, 0)).saturating_mul(s as u64)) + (Weight::from_parts(88_550_017, 0)) + // Standard Error: 13_455 + .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -144,9 +144,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_058_391, 0)) - // Standard Error: 7_609 - .saturating_add((Weight::from_parts(223_040, 0)).saturating_mul(s as u64)) + (Weight::from_parts(54_212_340, 0)) + // Standard Error: 8_032 + .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -157,9 +157,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_022_178, 0)) - // Standard Error: 12_945 - .saturating_add((Weight::from_parts(320_024, 0)).saturating_mul(s as u64)) + (Weight::from_parts(52_783_090, 0)) + // Standard Error: 13_737 + .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -174,9 +174,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_309_417, 0)) - // Standard Error: 7_565 - .saturating_add((Weight::from_parts(219_965, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_243_152, 0)) + // Standard Error: 7_939 + .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -187,9 +187,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_355_755, 0)) - // Standard Error: 3_270 - .saturating_add((Weight::from_parts(44_362, 0)).saturating_mul(s as u64)) + (Weight::from_parts(73_252_114, 0)) + // Standard Error: 3_434 + .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -200,9 +200,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_645_987, 0)) - // Standard Error: 7_779 - .saturating_add((Weight::from_parts(207_339, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_977_339, 0)) + // Standard Error: 7_858 + .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -215,9 +215,9 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_436_663, 0)) - // Standard Error: 2_844 - .saturating_add((Weight::from_parts(76_147, 0)).saturating_mul(s as u64)) + (Weight::from_parts(72_574_520, 0)) + // Standard Error: 3_250 + .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -230,9 +230,9 @@ impl WeightInfo for () { // Storage: Tokens Locks (r:1 w:0) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(83_196_714, 0)) - // Standard Error: 29_574 - .saturating_add((Weight::from_parts(415_253, 0)).saturating_mul(s as u64)) + (Weight::from_parts(88_550_017, 0)) + // Standard Error: 13_455 + .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -243,9 +243,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_058_391, 0)) - // Standard Error: 7_609 - .saturating_add((Weight::from_parts(223_040, 0)).saturating_mul(s as u64)) + (Weight::from_parts(54_212_340, 0)) + // Standard Error: 8_032 + .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -256,9 +256,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_022_178, 0)) - // Standard Error: 12_945 - .saturating_add((Weight::from_parts(320_024, 0)).saturating_mul(s as u64)) + (Weight::from_parts(52_783_090, 0)) + // Standard Error: 13_737 + .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_xyk.rs b/runtime/mangata-kusama/src/weights/pallet_xyk.rs index 62a52673ce..c1f831ff19 100644 --- a/runtime/mangata-kusama/src/weights/pallet_xyk.rs +++ b/runtime/mangata-kusama/src/weights/pallet_xyk.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_xyk //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -90,7 +90,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: Xyk LiquidityPools (r:0 w:1) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn create_pool() -> Weight { - (Weight::from_parts(199_311_000, 0)) + (Weight::from_parts(202_790_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -98,6 +98,10 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:3 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -105,12 +109,16 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn sell_asset() -> Weight { - (Weight::from_parts(226_860_000, 0)) - .saturating_add(T::DbWeight::get().reads(14 as u64)) + (Weight::from_parts(244_940_000, 0)) + .saturating_add(T::DbWeight::get().reads(16 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) // Storage: Xyk Pools (r:297 w:198) @@ -119,14 +127,12 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(618_130_000, 0)) - // Standard Error: 306_187 - .saturating_add((Weight::from_parts(245_461_340, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(661_629_000, 0)) + // Standard Error: 425_962 + .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) + .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -134,6 +140,10 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -141,28 +151,30 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn buy_asset() -> Weight { - (Weight::from_parts(233_140_000, 0)) - .saturating_add(T::DbWeight::get().reads(15 as u64)) + (Weight::from_parts(253_260_000, 0)) + .saturating_add(T::DbWeight::get().reads(18 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:297 w:198) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:400 w:400) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(632_069_000, 0)) - // Standard Error: 339_491 - .saturating_add((Weight::from_parts(252_882_037, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(691_040_000, 0)) + // Standard Error: 480_931 + .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) + .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -187,7 +199,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn mint_liquidity() -> Weight { - (Weight::from_parts(234_080_000, 0)) + (Weight::from_parts(241_610_000, 0)) .saturating_add(T::DbWeight::get().reads(15 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } @@ -208,17 +220,17 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(270_350_000, 0)) + (Weight::from_parts(277_529_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:2) + // Storage: Xyk LiquidityAssets (r:1 w:0) // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:2) + // Storage: Xyk Pools (r:1 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:5 w:5) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -230,17 +242,19 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn burn_liquidity() -> Weight { - (Weight::from_parts(216_470_000, 0)) + (Weight::from_parts(223_960_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) - .saturating_add(T::DbWeight::get().writes(14 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Xyk LiquidityPools (r:1 w:0) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:7 w:7) @@ -249,16 +263,12 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(369_290_000, 0)) + (Weight::from_parts(386_749_000, 0)) .saturating_add(T::DbWeight::get().reads(22 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } @@ -272,16 +282,16 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:8 w:8) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:2 w:2) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:2 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) @@ -289,7 +299,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn compound_rewards() -> Weight { - (Weight::from_parts(514_330_000, 0)) + (Weight::from_parts(546_000_000, 0)) .saturating_add(T::DbWeight::get().reads(25 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } @@ -316,7 +326,7 @@ impl WeightInfo for () { // Storage: Xyk LiquidityPools (r:0 w:1) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn create_pool() -> Weight { - (Weight::from_parts(199_311_000, 0)) + (Weight::from_parts(202_790_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(12 as u64)) } @@ -324,6 +334,10 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:3 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -331,12 +345,16 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn sell_asset() -> Weight { - (Weight::from_parts(226_860_000, 0)) - .saturating_add(RocksDbWeight::get().reads(14 as u64)) + (Weight::from_parts(244_940_000, 0)) + .saturating_add(RocksDbWeight::get().reads(16 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) // Storage: Xyk Pools (r:297 w:198) @@ -345,14 +363,12 @@ impl WeightInfo for () { // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(618_130_000, 0)) - // Standard Error: 306_187 - .saturating_add((Weight::from_parts(245_461_340, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(661_629_000, 0)) + // Standard Error: 425_962 + .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(29 as u64)) + .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -360,6 +376,10 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -367,28 +387,30 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn buy_asset() -> Weight { - (Weight::from_parts(233_140_000, 0)) - .saturating_add(RocksDbWeight::get().reads(15 as u64)) + (Weight::from_parts(253_260_000, 0)) + .saturating_add(RocksDbWeight::get().reads(18 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:297 w:198) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:400 w:400) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(632_069_000, 0)) - // Standard Error: 339_491 - .saturating_add((Weight::from_parts(252_882_037, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(691_040_000, 0)) + // Standard Error: 480_931 + .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(29 as u64)) + .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -413,7 +435,7 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn mint_liquidity() -> Weight { - (Weight::from_parts(234_080_000, 0)) + (Weight::from_parts(241_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(15 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } @@ -434,17 +456,17 @@ impl WeightInfo for () { // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(270_350_000, 0)) + (Weight::from_parts(277_529_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:2) + // Storage: Xyk LiquidityAssets (r:1 w:0) // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:2) + // Storage: Xyk Pools (r:1 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:5 w:5) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -456,17 +478,19 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn burn_liquidity() -> Weight { - (Weight::from_parts(216_470_000, 0)) + (Weight::from_parts(223_960_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) - .saturating_add(RocksDbWeight::get().writes(14 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: Xyk LiquidityPools (r:1 w:0) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:7 w:7) @@ -475,16 +499,12 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(369_290_000, 0)) + (Weight::from_parts(386_749_000, 0)) .saturating_add(RocksDbWeight::get().reads(22 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } @@ -498,16 +518,16 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:8 w:8) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:2 w:2) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:2 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) @@ -515,7 +535,7 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn compound_rewards() -> Weight { - (Weight::from_parts(514_330_000, 0)) + (Weight::from_parts(546_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(25 as u64)) .saturating_add(RocksDbWeight::get().writes(16 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/parachain_staking.rs b/runtime/mangata-kusama/src/weights/parachain_staking.rs index b2b31ca20e..aa9ad00b32 100644 --- a/runtime/mangata-kusama/src/weights/parachain_staking.rs +++ b/runtime/mangata-kusama/src/weights/parachain_staking.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for parachain_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -99,14 +99,14 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking TotalSelected (r:1 w:1) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) fn set_total_selected() -> Weight { - (Weight::from_parts(18_120_000, 0)) + (Weight::from_parts(18_150_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_170_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -133,11 +133,11 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(123_467_272, 0)) - // Standard Error: 5_457 - .saturating_add((Weight::from_parts(146_813, 0)).saturating_mul(x as u64)) - // Standard Error: 2_600 - .saturating_add((Weight::from_parts(190_628, 0)).saturating_mul(y as u64)) + (Weight::from_parts(128_769_592, 0)) + // Standard Error: 5_183 + .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) + // Standard Error: 5_120 + .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -148,9 +148,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_282_701, 0)) - // Standard Error: 2_623 - .saturating_add((Weight::from_parts(167_522, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_966_197, 0)) + // Standard Error: 1_766 + .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -158,20 +158,20 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:25 w:25) + // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:25 w:25) + // Storage: Tokens Accounts (r:30 w:30) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:24 w:24) + // Storage: ParachainStaking DelegatorState (r:29 w:29) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CandidateAggregator (r:1 w:0) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(60_685_134, 0)) - // Standard Error: 31_073 - .saturating_add((Weight::from_parts(31_446_338, 0)).saturating_mul(x as u64)) + (Weight::from_parts(61_759_888, 0)) + // Standard Error: 25_405 + .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -182,9 +182,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(37_579_077, 0)) - // Standard Error: 2_367 - .saturating_add((Weight::from_parts(161_581, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_197_562, 0)) + // Standard Error: 1_699 + .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -195,7 +195,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_offline() -> Weight { - (Weight::from_parts(38_880_000, 0)) + (Weight::from_parts(39_200_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -206,7 +206,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_online() -> Weight { - (Weight::from_parts(38_290_000, 0)) + (Weight::from_parts(38_610_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -219,7 +219,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(55_150_000, 0)) + (Weight::from_parts(56_000_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -234,7 +234,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_430_000, 0)) + (Weight::from_parts(57_740_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -251,7 +251,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(89_831_000, 0)) + (Weight::from_parts(90_910_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -268,21 +268,21 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(85_290_000, 0)) + (Weight::from_parts(87_720_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(29_900_000, 0)) + (Weight::from_parts(30_420_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_190_000, 0)) + (Weight::from_parts(29_860_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -307,11 +307,11 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(126_644_715, 0)) - // Standard Error: 7_517 - .saturating_add((Weight::from_parts(346_672, 0)).saturating_mul(x as u64)) - // Standard Error: 19_666 - .saturating_add((Weight::from_parts(396_238, 0)).saturating_mul(y as u64)) + (Weight::from_parts(127_734_458, 0)) + // Standard Error: 7_698 + .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) + // Standard Error: 7_439 + .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -320,7 +320,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(32_340_000, 0)) + (Weight::from_parts(33_410_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -339,9 +339,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_536_934, 0)) - // Standard Error: 26_983 - .saturating_add((Weight::from_parts(37_923_839, 0)).saturating_mul(x as u64)) + (Weight::from_parts(24_848_761, 0)) + // Standard Error: 26_767 + .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -350,7 +350,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(30_410_000, 0)) + (Weight::from_parts(31_130_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -359,7 +359,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(33_440_000, 0)) + (Weight::from_parts(34_070_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -372,7 +372,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_360_000, 0)) + (Weight::from_parts(56_650_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -381,7 +381,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(33_850_000, 0)) + (Weight::from_parts(34_280_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -400,7 +400,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(110_750_000, 0)) + (Weight::from_parts(111_770_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -419,7 +419,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(104_580_000, 0)) + (Weight::from_parts(103_940_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -438,28 +438,28 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(100_440_000, 0)) + (Weight::from_parts(99_690_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(30_630_000, 0)) + (Weight::from_parts(31_370_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_770_000, 0)) + (Weight::from_parts(35_290_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_660_000, 0)) + (Weight::from_parts(35_540_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -468,22 +468,22 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_003_682, 0)) - // Standard Error: 2_159 - .saturating_add((Weight::from_parts(179_452, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_340_872, 0)) + // Standard Error: 2_236 + .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_637_967, 0)) - // Standard Error: 1_732 - .saturating_add((Weight::from_parts(159_921, 0)).saturating_mul(x as u64)) + (Weight::from_parts(20_686_950, 0)) + // Standard Error: 1_638 + .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:49 w:0) + // Storage: ParachainStaking CandidateState (r:99 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking DelegatorState (r:1 w:0) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -492,8 +492,8 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidateAggregator (r:1 w:1) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(738_010_000, 0)) - .saturating_add(T::DbWeight::get().reads(52 as u64)) + (Weight::from_parts(1_946_910_000, 0)) + .saturating_add(T::DbWeight::get().reads(102 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:0) @@ -503,20 +503,20 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(97_980_000, 0)) + (Weight::from_parts(122_120_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:14 w:14) + // Storage: Tokens Accounts (r:32 w:32) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:14 w:13) + // Storage: System Account (r:32 w:31) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(646_079_000, 0)) - .saturating_add(T::DbWeight::get().reads(30 as u64)) - .saturating_add(T::DbWeight::get().writes(28 as u64)) + (Weight::from_parts(1_493_000_000, 0)) + .saturating_add(T::DbWeight::get().reads(66 as u64)) + .saturating_add(T::DbWeight::get().writes(64 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) @@ -525,14 +525,14 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(81_750_000, 0)) + (Weight::from_parts(87_790_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn passive_session_change() -> Weight { - (Weight::from_parts(7_450_000, 0)) + (Weight::from_parts(7_670_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: ParachainStaking Round (r:1 w:1) @@ -551,9 +551,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:27 w:26) + // Storage: ParachainStaking AwardedPts (r:52 w:51) // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:26 w:52) + // Storage: ParachainStaking AtStake (r:51 w:102) // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) @@ -571,37 +571,41 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking TotalSelected (r:1 w:0) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:26 w:0) + // Storage: ParachainStaking CandidateState (r:51 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: Issuance IssuanceConfigStore (r:1 w:0) // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:0) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:26 w:0) + // Storage: Session NextKeys (r:51 w:0) // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) // Storage: Aura Authorities (r:1 w:0) // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:26) + // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) // Storage: Session Validators (r:0 w:1) // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(962_696_231, 0)) - // Standard Error: 23_712 - .saturating_add((Weight::from_parts(18_001_066, 0)).saturating_mul(x as u64)) - // Standard Error: 102_677 - .saturating_add((Weight::from_parts(5_760_381, 0)).saturating_mul(y as u64)) - // Standard Error: 242_115 - .saturating_add((Weight::from_parts(29_808_290, 0)).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(124 as u64)) + (Weight::from_parts(1_634_783_507, 0)) + // Standard Error: 32_199 + .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) + // Standard Error: 66_033 + .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) + // Standard Error: 114_378 + .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) + .saturating_add(T::DbWeight::get().reads(226 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(119 as u64)) + .saturating_add(T::DbWeight::get().writes(220 as u64)) } } @@ -610,14 +614,14 @@ impl WeightInfo for () { // Storage: ParachainStaking TotalSelected (r:1 w:1) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) fn set_total_selected() -> Weight { - (Weight::from_parts(18_120_000, 0)) + (Weight::from_parts(18_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_170_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -644,11 +648,11 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(123_467_272, 0)) - // Standard Error: 5_457 - .saturating_add((Weight::from_parts(146_813, 0)).saturating_mul(x as u64)) - // Standard Error: 2_600 - .saturating_add((Weight::from_parts(190_628, 0)).saturating_mul(y as u64)) + (Weight::from_parts(128_769_592, 0)) + // Standard Error: 5_183 + .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) + // Standard Error: 5_120 + .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -659,9 +663,9 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_282_701, 0)) - // Standard Error: 2_623 - .saturating_add((Weight::from_parts(167_522, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_966_197, 0)) + // Standard Error: 1_766 + .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -669,20 +673,20 @@ impl WeightInfo for () { // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:25 w:25) + // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:25 w:25) + // Storage: Tokens Accounts (r:30 w:30) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:24 w:24) + // Storage: ParachainStaking DelegatorState (r:29 w:29) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CandidateAggregator (r:1 w:0) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(60_685_134, 0)) - // Standard Error: 31_073 - .saturating_add((Weight::from_parts(31_446_338, 0)).saturating_mul(x as u64)) + (Weight::from_parts(61_759_888, 0)) + // Standard Error: 25_405 + .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) @@ -693,9 +697,9 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(37_579_077, 0)) - // Standard Error: 2_367 - .saturating_add((Weight::from_parts(161_581, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_197_562, 0)) + // Standard Error: 1_699 + .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -706,7 +710,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_offline() -> Weight { - (Weight::from_parts(38_880_000, 0)) + (Weight::from_parts(39_200_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -717,7 +721,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_online() -> Weight { - (Weight::from_parts(38_290_000, 0)) + (Weight::from_parts(38_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -730,7 +734,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(55_150_000, 0)) + (Weight::from_parts(56_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -745,7 +749,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_430_000, 0)) + (Weight::from_parts(57_740_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -762,7 +766,7 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(89_831_000, 0)) + (Weight::from_parts(90_910_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -779,21 +783,21 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(85_290_000, 0)) + (Weight::from_parts(87_720_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(29_900_000, 0)) + (Weight::from_parts(30_420_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_190_000, 0)) + (Weight::from_parts(29_860_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -818,11 +822,11 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(126_644_715, 0)) - // Standard Error: 7_517 - .saturating_add((Weight::from_parts(346_672, 0)).saturating_mul(x as u64)) - // Standard Error: 19_666 - .saturating_add((Weight::from_parts(396_238, 0)).saturating_mul(y as u64)) + (Weight::from_parts(127_734_458, 0)) + // Standard Error: 7_698 + .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) + // Standard Error: 7_439 + .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -831,7 +835,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(32_340_000, 0)) + (Weight::from_parts(33_410_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -850,9 +854,9 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_536_934, 0)) - // Standard Error: 26_983 - .saturating_add((Weight::from_parts(37_923_839, 0)).saturating_mul(x as u64)) + (Weight::from_parts(24_848_761, 0)) + // Standard Error: 26_767 + .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -861,7 +865,7 @@ impl WeightInfo for () { // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(30_410_000, 0)) + (Weight::from_parts(31_130_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -870,7 +874,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(33_440_000, 0)) + (Weight::from_parts(34_070_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -883,7 +887,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_360_000, 0)) + (Weight::from_parts(56_650_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -892,7 +896,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(33_850_000, 0)) + (Weight::from_parts(34_280_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -911,7 +915,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(110_750_000, 0)) + (Weight::from_parts(111_770_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -930,7 +934,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(104_580_000, 0)) + (Weight::from_parts(103_940_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -949,28 +953,28 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(100_440_000, 0)) + (Weight::from_parts(99_690_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(30_630_000, 0)) + (Weight::from_parts(31_370_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_770_000, 0)) + (Weight::from_parts(35_290_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_660_000, 0)) + (Weight::from_parts(35_540_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -979,22 +983,22 @@ impl WeightInfo for () { // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_003_682, 0)) - // Standard Error: 2_159 - .saturating_add((Weight::from_parts(179_452, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_340_872, 0)) + // Standard Error: 2_236 + .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_637_967, 0)) - // Standard Error: 1_732 - .saturating_add((Weight::from_parts(159_921, 0)).saturating_mul(x as u64)) + (Weight::from_parts(20_686_950, 0)) + // Standard Error: 1_638 + .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:49 w:0) + // Storage: ParachainStaking CandidateState (r:99 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking DelegatorState (r:1 w:0) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -1003,8 +1007,8 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidateAggregator (r:1 w:1) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(738_010_000, 0)) - .saturating_add(RocksDbWeight::get().reads(52 as u64)) + (Weight::from_parts(1_946_910_000, 0)) + .saturating_add(RocksDbWeight::get().reads(102 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:0) @@ -1014,20 +1018,20 @@ impl WeightInfo for () { // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(97_980_000, 0)) + (Weight::from_parts(122_120_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:14 w:14) + // Storage: Tokens Accounts (r:32 w:32) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:14 w:13) + // Storage: System Account (r:32 w:31) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(646_079_000, 0)) - .saturating_add(RocksDbWeight::get().reads(30 as u64)) - .saturating_add(RocksDbWeight::get().writes(28 as u64)) + (Weight::from_parts(1_493_000_000, 0)) + .saturating_add(RocksDbWeight::get().reads(66 as u64)) + .saturating_add(RocksDbWeight::get().writes(64 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) @@ -1036,14 +1040,14 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(81_750_000, 0)) + (Weight::from_parts(87_790_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn passive_session_change() -> Weight { - (Weight::from_parts(7_450_000, 0)) + (Weight::from_parts(7_670_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } // Storage: ParachainStaking Round (r:1 w:1) @@ -1062,9 +1066,9 @@ impl WeightInfo for () { // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:27 w:26) + // Storage: ParachainStaking AwardedPts (r:52 w:51) // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:26 w:52) + // Storage: ParachainStaking AtStake (r:51 w:102) // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) @@ -1082,36 +1086,40 @@ impl WeightInfo for () { // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking TotalSelected (r:1 w:0) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:26 w:0) + // Storage: ParachainStaking CandidateState (r:51 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: Issuance IssuanceConfigStore (r:1 w:0) // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:0) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:26 w:0) + // Storage: Session NextKeys (r:51 w:0) // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) // Storage: Aura Authorities (r:1 w:0) // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:26) + // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) // Storage: Session Validators (r:0 w:1) // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(962_696_231, 0)) - // Standard Error: 23_712 - .saturating_add((Weight::from_parts(18_001_066, 0)).saturating_mul(x as u64)) - // Standard Error: 102_677 - .saturating_add((Weight::from_parts(5_760_381, 0)).saturating_mul(y as u64)) - // Standard Error: 242_115 - .saturating_add((Weight::from_parts(29_808_290, 0)).saturating_mul(z as u64)) - .saturating_add(RocksDbWeight::get().reads(124 as u64)) + (Weight::from_parts(1_634_783_507, 0)) + // Standard Error: 32_199 + .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) + // Standard Error: 66_033 + .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) + // Standard Error: 114_378 + .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) + .saturating_add(RocksDbWeight::get().reads(226 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(119 as u64)) + .saturating_add(RocksDbWeight::get().writes(220 as u64)) } } diff --git a/runtime/mangata-rococo/src/weights/block_weights.rs b/runtime/mangata-rococo/src/weights/block_weights.rs index 1e38e0097a..e190a4a858 100644 --- a/runtime/mangata-rococo/src/weights/block_weights.rs +++ b/runtime/mangata-rococo/src/weights/block_weights.rs @@ -1,6 +1,7 @@ + //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18 (Y/M/D) -//! HOSTNAME: `995c44fb4e67`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-10-02 (Y/M/D) +//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -29,17 +30,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 7_631_910, 8_052_540 - /// Average: 7_692_887 - /// Median: 7_661_290 - /// Std-Dev: 104885.3 + /// Min, Max: 7_983_500, 8_609_050 + /// Average: 8_057_882 + /// Median: 8_023_430 + /// Std-Dev: 118109.32 /// /// Percentiles nanoseconds: - /// 99th: 8_034_380 - /// 95th: 8_023_380 - /// 75th: 7_674_100 + /// 99th: 8_567_140 + /// 95th: 8_382_280 + /// 75th: 8_036_000 pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(7_692_887), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(8_057_882), 0); } #[cfg(test)] diff --git a/runtime/mangata-rococo/src/weights/extrinsic_weights.rs b/runtime/mangata-rococo/src/weights/extrinsic_weights.rs index 92fca50754..033bf75d8f 100644 --- a/runtime/mangata-rococo/src/weights/extrinsic_weights.rs +++ b/runtime/mangata-rococo/src/weights/extrinsic_weights.rs @@ -1,6 +1,7 @@ + //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18 (Y/M/D) -//! HOSTNAME: `995c44fb4e67`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-10-02 (Y/M/D) +//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -29,17 +30,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 114_329, 115_887 - /// Average: 114_756 - /// Median: 114_639 - /// Std-Dev: 309.81 + /// Min, Max: 116_665, 118_803 + /// Average: 117_078 + /// Median: 117_010 + /// Std-Dev: 306.32 /// /// Percentiles nanoseconds: - /// 99th: 115_799 - /// 95th: 115_437 - /// 75th: 114_859 + /// 99th: 118_109 + /// 95th: 117_513 + /// 75th: 117_236 pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(114_756), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(117_078), 0); } #[cfg(test)] diff --git a/runtime/mangata-rococo/src/weights/frame_system.rs b/runtime/mangata-rococo/src/weights/frame_system.rs index e2b9f77ec8..9bcfdbb3d8 100644 --- a/runtime/mangata-rococo/src/weights/frame_system.rs +++ b/runtime/mangata-rococo/src/weights/frame_system.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,46 +68,46 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl frame_system::WeightInfo for ModuleWeight { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(10_114_579, 0)) + (Weight::from_parts(9_964_525, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(518, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(30_615_946, 0)) + (Weight::from_parts(29_205_376, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(1_708, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) // Storage: unknown `0x3a686561707061676573` (r:0 w:1) // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_640_000, 0)) + (Weight::from_parts(7_610_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_030_000, 0)) - // Standard Error: 2_557 - .saturating_add((Weight::from_parts(1_227_455, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_160_000, 0)) + // Standard Error: 2_435 + .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_170_000, 0)) - // Standard Error: 1_127 - .saturating_add((Weight::from_parts(837_671, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_090_000, 0)) + // Standard Error: 1_110 + .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_530_000, 0)) - // Standard Error: 1_363 - .saturating_add((Weight::from_parts(1_454_847, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_640_000, 0)) + // Standard Error: 1_374 + .saturating_add((Weight::from_parts(1_459_706, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } @@ -116,46 +116,46 @@ impl frame_system::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(10_114_579, 0)) + (Weight::from_parts(9_964_525, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(518, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(30_615_946, 0)) + (Weight::from_parts(29_205_376, 0)) // Standard Error: 0 - .saturating_add((Weight::from_parts(1_708, 0)).saturating_mul(b as u64)) + .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) // Storage: unknown `0x3a686561707061676573` (r:0 w:1) // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_640_000, 0)) + (Weight::from_parts(7_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_030_000, 0)) - // Standard Error: 2_557 - .saturating_add((Weight::from_parts(1_227_455, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_160_000, 0)) + // Standard Error: 2_435 + .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_170_000, 0)) - // Standard Error: 1_127 - .saturating_add((Weight::from_parts(837_671, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_090_000, 0)) + // Standard Error: 1_110 + .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_530_000, 0)) - // Standard Error: 1_363 - .saturating_add((Weight::from_parts(1_454_847, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_640_000, 0)) + // Standard Error: 1_374 + .saturating_add((Weight::from_parts(1_459_706, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } diff --git a/runtime/mangata-rococo/src/weights/orml_asset_registry.rs b/runtime/mangata-rococo/src/weights/orml_asset_registry.rs index 341ffe99df..8242233fca 100644 --- a/runtime/mangata-rococo/src/weights/orml_asset_registry.rs +++ b/runtime/mangata-rococo/src/weights/orml_asset_registry.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for orml_asset_registry //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -72,7 +72,7 @@ impl orml_asset_registry::WeightInfo for ModuleWeight Weight { - (Weight::from_parts(48_380_000, 0)) + (Weight::from_parts(48_560_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -81,7 +81,7 @@ impl orml_asset_registry::WeightInfo for ModuleWeight Weight { - (Weight::from_parts(33_520_000, 0)) + (Weight::from_parts(33_480_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -98,7 +98,7 @@ impl WeightInfo for () { // Storage: AssetRegistry LocationToAssetId (r:1 w:1) // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) fn register_asset() -> Weight { - (Weight::from_parts(48_380_000, 0)) + (Weight::from_parts(48_560_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -107,7 +107,7 @@ impl WeightInfo for () { // Storage: AssetRegistry LocationToAssetId (r:1 w:1) // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) fn update_asset() -> Weight { - (Weight::from_parts(33_520_000, 0)) + (Weight::from_parts(33_480_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/orml_tokens.rs b/runtime/mangata-rococo/src/weights/orml_tokens.rs index 06359ec572..5508f3d7cb 100644 --- a/runtime/mangata-rococo/src/weights/orml_tokens.rs +++ b/runtime/mangata-rococo/src/weights/orml_tokens.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for orml_tokens //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -73,7 +73,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer() -> Weight { - (Weight::from_parts(53_910_000, 0)) + (Weight::from_parts(54_300_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -82,7 +82,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_all() -> Weight { - (Weight::from_parts(56_060_000, 0)) + (Weight::from_parts(56_740_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -91,7 +91,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(51_300_000, 0)) + (Weight::from_parts(52_380_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -100,7 +100,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn force_transfer() -> Weight { - (Weight::from_parts(57_360_000, 0)) + (Weight::from_parts(58_360_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -109,7 +109,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn set_balance() -> Weight { - (Weight::from_parts(31_560_000, 0)) + (Weight::from_parts(32_250_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -122,7 +122,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn create() -> Weight { - (Weight::from_parts(58_330_000, 0)) + (Weight::from_parts(58_930_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -135,7 +135,7 @@ impl orml_tokens::WeightInfo for ModuleWeight { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn mint() -> Weight { - (Weight::from_parts(58_720_000, 0)) + (Weight::from_parts(59_170_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -148,7 +148,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer() -> Weight { - (Weight::from_parts(53_910_000, 0)) + (Weight::from_parts(54_300_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -157,7 +157,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_all() -> Weight { - (Weight::from_parts(56_060_000, 0)) + (Weight::from_parts(56_740_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -166,7 +166,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(51_300_000, 0)) + (Weight::from_parts(52_380_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -175,7 +175,7 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn force_transfer() -> Weight { - (Weight::from_parts(57_360_000, 0)) + (Weight::from_parts(58_360_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -184,7 +184,7 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn set_balance() -> Weight { - (Weight::from_parts(31_560_000, 0)) + (Weight::from_parts(32_250_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -197,7 +197,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn create() -> Weight { - (Weight::from_parts(58_330_000, 0)) + (Weight::from_parts(58_930_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -210,7 +210,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn mint() -> Weight { - (Weight::from_parts(58_720_000, 0)) + (Weight::from_parts(59_170_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs b/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs index b07baf19f9..7ebdf94b14 100644 --- a/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs +++ b/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_bootstrap //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -78,7 +78,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_440_000, 0)) + (Weight::from_parts(34_000_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -103,7 +103,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn provision() -> Weight { - (Weight::from_parts(103_400_000, 0)) + (Weight::from_parts(106_729_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -136,7 +136,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(216_740_000, 0)) + (Weight::from_parts(226_960_000, 0)) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -167,7 +167,7 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn finalize() -> Weight { - (Weight::from_parts(79_290_000, 0)) + (Weight::from_parts(79_150_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -188,7 +188,7 @@ impl WeightInfo for () { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_440_000, 0)) + (Weight::from_parts(34_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -213,7 +213,7 @@ impl WeightInfo for () { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn provision() -> Weight { - (Weight::from_parts(103_400_000, 0)) + (Weight::from_parts(106_729_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -246,7 +246,7 @@ impl WeightInfo for () { // Storage: Bootstrap ProvisionAccounts (r:0 w:1) // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(216_740_000, 0)) + (Weight::from_parts(226_960_000, 0)) .saturating_add(RocksDbWeight::get().reads(17 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } @@ -277,7 +277,7 @@ impl WeightInfo for () { // Storage: Bootstrap ActivePair (r:0 w:1) // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) fn finalize() -> Weight { - (Weight::from_parts(79_290_000, 0)) + (Weight::from_parts(79_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs b/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs index ff2788893c..ded612958c 100644 --- a/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs +++ b/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_collective_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -80,11 +80,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Prime (r:0 w:1) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_140_000, 0)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(5_481_522, 0)).saturating_mul(m as u64)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(10_538_444, 0)).saturating_mul(p as u64)) + (Weight::from_parts(90_800_000, 0)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -93,11 +93,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Members (r:1 w:0) // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(29_943_956, 0)) - // Standard Error: 73 - .saturating_add((Weight::from_parts(2_027, 0)).saturating_mul(b as u64)) - // Standard Error: 761 - .saturating_add((Weight::from_parts(27_217, 0)).saturating_mul(m as u64)) + (Weight::from_parts(31_313_537, 0)) + // Standard Error: 94 + .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) + // Standard Error: 972 + .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -105,11 +105,11 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:1 w:0) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(33_627_672, 0)) - // Standard Error: 82 - .saturating_add((Weight::from_parts(2_315, 0)).saturating_mul(b as u64)) - // Standard Error: 855 - .saturating_add((Weight::from_parts(45_555, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_536_810, 0)) + // Standard Error: 85 + .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) + // Standard Error: 883 + .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -125,13 +125,13 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Voting (r:0 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(48_107_905, 0)) - // Standard Error: 148 - .saturating_add((Weight::from_parts(4_689, 0)).saturating_mul(b as u64)) - // Standard Error: 1_547 - .saturating_add((Weight::from_parts(33_696, 0)).saturating_mul(m as u64)) - // Standard Error: 1_527 - .saturating_add((Weight::from_parts(306_730, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_784_354, 0)) + // Standard Error: 163 + .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) + // Standard Error: 1_705 + .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) + // Standard Error: 1_683 + .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -140,58 +140,58 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_661_933, 0)) - // Standard Error: 1_152 - .saturating_add((Weight::from_parts(70_484, 0)).saturating_mul(m as u64)) + (Weight::from_parts(45_999_012, 0)) + // Standard Error: 944 + .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(65_240_157, 0)) - // Standard Error: 1_748 - .saturating_add((Weight::from_parts(56_035, 0)).saturating_mul(m as u64)) - // Standard Error: 1_704 - .saturating_add((Weight::from_parts(287_256, 0)).saturating_mul(p as u64)) + (Weight::from_parts(67_599_850, 0)) + // Standard Error: 1_737 + .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) + // Standard Error: 1_694 + .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_748_886, 0)) - // Standard Error: 304 - .saturating_add((Weight::from_parts(2_436, 0)).saturating_mul(b as u64)) - // Standard Error: 3_220 - .saturating_add((Weight::from_parts(73_314, 0)).saturating_mul(m as u64)) - // Standard Error: 3_139 - .saturating_add((Weight::from_parts(313_478, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_619_427, 0)) + // Standard Error: 307 + .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) + // Standard Error: 3_251 + .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) + // Standard Error: 3_169 + .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) @@ -199,20 +199,20 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(69_217_092, 0)) - // Standard Error: 1_867 - .saturating_add((Weight::from_parts(66_672, 0)).saturating_mul(m as u64)) - // Standard Error: 1_821 - .saturating_add((Weight::from_parts(286_625, 0)).saturating_mul(p as u64)) + (Weight::from_parts(71_391_246, 0)) + // Standard Error: 1_912 + .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) + // Standard Error: 1_865 + .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) @@ -220,13 +220,13 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(95_973_593, 0)) - // Standard Error: 310 - .saturating_add((Weight::from_parts(2_185, 0)).saturating_mul(b as u64)) - // Standard Error: 3_288 - .saturating_add((Weight::from_parts(68_870, 0)).saturating_mul(m as u64)) - // Standard Error: 3_205 - .saturating_add((Weight::from_parts(311_244, 0)).saturating_mul(p as u64)) + (Weight::from_parts(98_330_423, 0)) + // Standard Error: 297 + .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) + // Standard Error: 3_149 + .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) + // Standard Error: 3_070 + .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -239,9 +239,9 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_150_886, 0)) - // Standard Error: 1_532 - .saturating_add((Weight::from_parts(281_687, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_844_726, 0)) + // Standard Error: 1_413 + .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -258,11 +258,11 @@ impl WeightInfo for () { // Storage: Council Prime (r:0 w:1) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_140_000, 0)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(5_481_522, 0)).saturating_mul(m as u64)) - // Standard Error: 69_195 - .saturating_add((Weight::from_parts(10_538_444, 0)).saturating_mul(p as u64)) + (Weight::from_parts(90_800_000, 0)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) + // Standard Error: 69_203 + .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) @@ -271,11 +271,11 @@ impl WeightInfo for () { // Storage: Council Members (r:1 w:0) // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(29_943_956, 0)) - // Standard Error: 73 - .saturating_add((Weight::from_parts(2_027, 0)).saturating_mul(b as u64)) - // Standard Error: 761 - .saturating_add((Weight::from_parts(27_217, 0)).saturating_mul(m as u64)) + (Weight::from_parts(31_313_537, 0)) + // Standard Error: 94 + .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) + // Standard Error: 972 + .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -283,11 +283,11 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:1 w:0) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(33_627_672, 0)) - // Standard Error: 82 - .saturating_add((Weight::from_parts(2_315, 0)).saturating_mul(b as u64)) - // Standard Error: 855 - .saturating_add((Weight::from_parts(45_555, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_536_810, 0)) + // Standard Error: 85 + .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) + // Standard Error: 883 + .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -303,13 +303,13 @@ impl WeightInfo for () { // Storage: Council Voting (r:0 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(48_107_905, 0)) - // Standard Error: 148 - .saturating_add((Weight::from_parts(4_689, 0)).saturating_mul(b as u64)) - // Standard Error: 1_547 - .saturating_add((Weight::from_parts(33_696, 0)).saturating_mul(m as u64)) - // Standard Error: 1_527 - .saturating_add((Weight::from_parts(306_730, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_784_354, 0)) + // Standard Error: 163 + .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) + // Standard Error: 1_705 + .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) + // Standard Error: 1_683 + .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -318,58 +318,58 @@ impl WeightInfo for () { // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_661_933, 0)) - // Standard Error: 1_152 - .saturating_add((Weight::from_parts(70_484, 0)).saturating_mul(m as u64)) + (Weight::from_parts(45_999_012, 0)) + // Standard Error: 944 + .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(65_240_157, 0)) - // Standard Error: 1_748 - .saturating_add((Weight::from_parts(56_035, 0)).saturating_mul(m as u64)) - // Standard Error: 1_704 - .saturating_add((Weight::from_parts(287_256, 0)).saturating_mul(p as u64)) + (Weight::from_parts(67_599_850, 0)) + // Standard Error: 1_737 + .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) + // Standard Error: 1_694 + .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_748_886, 0)) - // Standard Error: 304 - .saturating_add((Weight::from_parts(2_436, 0)).saturating_mul(b as u64)) - // Standard Error: 3_220 - .saturating_add((Weight::from_parts(73_314, 0)).saturating_mul(m as u64)) - // Standard Error: 3_139 - .saturating_add((Weight::from_parts(313_478, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_619_427, 0)) + // Standard Error: 307 + .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) + // Standard Error: 3_251 + .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) + // Standard Error: 3_169 + .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Proposals (r:1 w:1) @@ -377,20 +377,20 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(69_217_092, 0)) - // Standard Error: 1_867 - .saturating_add((Weight::from_parts(66_672, 0)).saturating_mul(m as u64)) - // Standard Error: 1_821 - .saturating_add((Weight::from_parts(286_625, 0)).saturating_mul(p as u64)) + (Weight::from_parts(71_391_246, 0)) + // Standard Error: 1_912 + .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) + // Standard Error: 1_865 + .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: Council Members (r:1 w:0) + // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Voting (r:1 w:1) // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) // Storage: Council ProposalProposedTime (r:1 w:1) // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council Prime (r:1 w:0) // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) // Storage: Council ProposalOf (r:1 w:1) @@ -398,13 +398,13 @@ impl WeightInfo for () { // Storage: Council Proposals (r:1 w:1) // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(95_973_593, 0)) - // Standard Error: 310 - .saturating_add((Weight::from_parts(2_185, 0)).saturating_mul(b as u64)) - // Standard Error: 3_288 - .saturating_add((Weight::from_parts(68_870, 0)).saturating_mul(m as u64)) - // Standard Error: 3_205 - .saturating_add((Weight::from_parts(311_244, 0)).saturating_mul(p as u64)) + (Weight::from_parts(98_330_423, 0)) + // Standard Error: 297 + .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) + // Standard Error: 3_149 + .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) + // Standard Error: 3_070 + .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -417,9 +417,9 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:0 w:1) // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_150_886, 0)) - // Standard Error: 1_532 - .saturating_add((Weight::from_parts(281_687, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_844_726, 0)) + // Standard Error: 1_413 + .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs b/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs index dbdf56c152..a0016cb225 100644 --- a/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs +++ b/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_crowdloan_rewards //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,220 +68,234 @@ pub trait WeightInfo { /// Weights for pallet_crowdloan_rewards using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_crowdloan_rewards::WeightInfo for ModuleWeight { + // Storage: Crowdloan Initialized (r:1 w:0) + // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(5_800_000, 0)) + (Weight::from_parts(13_860_000, 0)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:100 w:0) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:100 w:100) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(170_661_769, 0)) - // Standard Error: 50_081 - .saturating_add((Weight::from_parts(71_125_436, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - .saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(x as u64))) + (Weight::from_parts(95_783_300, 0)) + // Standard Error: 25_873 + .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: Crowdloan Initialized (r:1 w:1) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:0 w:1) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) fn complete_initialization() -> Weight { - (Weight::from_parts(21_060_000, 0)) + (Weight::from_parts(27_331_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: Vesting Vesting (r:1 w:1) + // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) + // Storage: Tokens Locks (r:1 w:1) + // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn claim() -> Weight { - (Weight::from_parts(68_230_000, 0)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + (Weight::from_parts(129_060_000, 0)) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn update_reward_address() -> Weight { - (Weight::from_parts(31_860_000, 0)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + (Weight::from_parts(34_900_000, 0)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:1 w:1) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn associate_native_identity() -> Weight { - (Weight::from_parts(147_350_000, 0)) - .saturating_add(T::DbWeight::get().reads(6 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + (Weight::from_parts(114_790_000, 0)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(34_693_550, 0)) - // Standard Error: 8_870 - .saturating_add((Weight::from_parts(62_853_805, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) + (Weight::from_parts(42_648_512, 0)) + // Standard Error: 10_539 + .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { + // Storage: Crowdloan Initialized (r:1 w:0) + // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(5_800_000, 0)) + (Weight::from_parts(13_860_000, 0)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:100 w:0) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:100 w:100) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(170_661_769, 0)) - // Standard Error: 50_081 - .saturating_add((Weight::from_parts(71_125_436, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(6 as u64)) - .saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) - .saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(x as u64))) + (Weight::from_parts(95_783_300, 0)) + // Standard Error: 25_873 + .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) + .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } // Storage: Crowdloan Initialized (r:1 w:1) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:0 w:1) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) + // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) + // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) fn complete_initialization() -> Weight { - (Weight::from_parts(21_060_000, 0)) + (Weight::from_parts(27_331_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan Initialized (r:1 w:0) // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan InitRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan InitRelayBlock (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan EndRelayBlock (r:1 w:0) - // Proof Skipped: Crowdloan EndRelayBlock (max_values: Some(1), max_size: None, mode: Measured) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: Vesting Vesting (r:1 w:1) + // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) + // Storage: Tokens Locks (r:1 w:1) + // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn claim() -> Weight { - (Weight::from_parts(68_230_000, 0)) - .saturating_add(RocksDbWeight::get().reads(7 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + (Weight::from_parts(129_060_000, 0)) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn update_reward_address() -> Weight { - (Weight::from_parts(31_860_000, 0)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) + (Weight::from_parts(34_900_000, 0)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan UnassociatedContributions (r:1 w:1) // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:1 w:1) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn associate_native_identity() -> Weight { - (Weight::from_parts(147_350_000, 0)) - .saturating_add(RocksDbWeight::get().reads(6 as u64)) - .saturating_add(RocksDbWeight::get().writes(5 as u64)) + (Weight::from_parts(114_790_000, 0)) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } + // Storage: Crowdloan CrowdloanId (r:1 w:0) + // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) // Storage: Crowdloan AccountsPayable (r:2 w:2) // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(34_693_550, 0)) - // Standard Error: 8_870 - .saturating_add((Weight::from_parts(62_853_805, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) + (Weight::from_parts(42_648_512, 0)) + // Standard Error: 10_539 + .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } } diff --git a/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs b/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs index 5320f4b45e..7057d5cf29 100644 --- a/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs +++ b/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_fee_lock //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -66,7 +66,7 @@ impl pallet_fee_lock::WeightInfo for ModuleWeight { // Storage: FeeLock FeeLockMetadata (r:1 w:1) // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(30_789_000, 0)) + (Weight::from_parts(31_000_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -81,7 +81,7 @@ impl pallet_fee_lock::WeightInfo for ModuleWeight { // Storage: FeeLock UnlockQueue (r:1 w:1) // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn unlock_fee() -> Weight { - (Weight::from_parts(56_080_000, 0)) + (Weight::from_parts(56_920_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -92,7 +92,7 @@ impl WeightInfo for () { // Storage: FeeLock FeeLockMetadata (r:1 w:1) // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(30_789_000, 0)) + (Weight::from_parts(31_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -107,7 +107,7 @@ impl WeightInfo for () { // Storage: FeeLock UnlockQueue (r:1 w:1) // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn unlock_fee() -> Weight { - (Weight::from_parts(56_080_000, 0)) + (Weight::from_parts(56_920_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_issuance.rs b/runtime/mangata-rococo/src/weights/pallet_issuance.rs index 5df4b34f6d..c7f3821ac2 100644 --- a/runtime/mangata-rococo/src/weights/pallet_issuance.rs +++ b/runtime/mangata-rococo/src/weights/pallet_issuance.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_issuance //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -71,14 +71,14 @@ impl pallet_issuance::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:0) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_870_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Issuance IsTGEFinalized (r:1 w:1) // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) fn finalize_tge() -> Weight { - (Weight::from_parts(15_849_000, 0)) + (Weight::from_parts(15_920_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -97,9 +97,9 @@ impl pallet_issuance::WeightInfo for ModuleWeight { // Storage: Issuance TGETotal (r:1 w:1) // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(26_585_737, 0)) - // Standard Error: 16_829 - .saturating_add((Weight::from_parts(83_061_110, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_064_606, 0)) + // Standard Error: 26_264 + .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -116,14 +116,14 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:0) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_870_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Issuance IsTGEFinalized (r:1 w:1) // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) fn finalize_tge() -> Weight { - (Weight::from_parts(15_849_000, 0)) + (Weight::from_parts(15_920_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -142,9 +142,9 @@ impl WeightInfo for () { // Storage: Issuance TGETotal (r:1 w:1) // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(26_585_737, 0)) - // Standard Error: 16_829 - .saturating_add((Weight::from_parts(83_061_110, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_064_606, 0)) + // Standard Error: 26_264 + .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) diff --git a/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs b/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs index 3fb479e9b7..4e536d93e4 100644 --- a/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs +++ b/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_multipurpose_liquidity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -76,7 +76,7 @@ impl pallet_multipurpose_liquidity::WeightInfo for Modu // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(127_250_000, 0)) + (Weight::from_parts(130_870_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -91,7 +91,7 @@ impl pallet_multipurpose_liquidity::WeightInfo for Modu // Storage: Tokens Locks (r:1 w:1) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(122_689_000, 0)) + (Weight::from_parts(126_300_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -112,7 +112,7 @@ impl WeightInfo for () { // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(127_250_000, 0)) + (Weight::from_parts(130_870_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -127,7 +127,7 @@ impl WeightInfo for () { // Storage: Tokens Locks (r:1 w:1) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(122_689_000, 0)) + (Weight::from_parts(126_300_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs b/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs index 99a6a2573d..6aac9c8080 100644 --- a/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs +++ b/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_proof_of_stake //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -57,13 +57,13 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_proof_of_stake. pub trait WeightInfo { fn claim_native_rewards() -> Weight; - fn claim_3rdparty_rewards() -> Weight; fn update_pool_promotion() -> Weight; fn activate_liquidity_for_native_rewards() -> Weight; fn deactivate_liquidity_for_native_rewards() -> Weight; - fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; - fn activate_liquidity_for_3rdparty_rewards() -> Weight; fn reward_pool() -> Weight; + fn activate_liquidity_for_3rdparty_rewards() -> Weight; + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight; + fn claim_3rdparty_rewards() -> Weight; } /// Weights for pallet_proof_of_stake using the Mangata node and recommended hardware. @@ -76,20 +76,14 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn claim_native_rewards() -> Weight { - (Weight::from_parts(81_410_000, 0)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) - } - - fn claim_3rdparty_rewards() -> Weight { - (Weight::from_parts(81_410_000, 0)) + (Weight::from_parts(86_750_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_600_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -104,7 +98,7 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn activate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(94_130_000, 0)) + (Weight::from_parts(100_109_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -119,61 +113,113 @@ impl pallet_proof_of_stake::WeightInfo for ModuleWeight // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn deactivate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(82_600_000, 0)) + (Weight::from_parts(91_990_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - - - fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Xyk LiquidityPools (r:1 w:0) + // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: Xyk Pools (r:1 w:0) + // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleId (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + fn reward_pool() -> Weight { + (Weight::from_parts(179_050_000, 0)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } - + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) fn activate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + (Weight::from_parts(120_360_000, 0)) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } - - fn reward_pool() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(125_160_000, 0)) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } -} - -// For backwards compatibility and tests -impl WeightInfo for () { // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_native_rewards() -> Weight { - (Weight::from_parts(81_410_000, 0)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(94_980_000, 0)) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } +} +// For backwards compatibility and tests +impl WeightInfo for () { // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake RewardsInfo (r:1 w:1) // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn claim_3rdparty_rewards() -> Weight { - (Weight::from_parts(81_410_000, 0)) + fn claim_native_rewards() -> Weight { + (Weight::from_parts(86_750_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_600_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -188,7 +234,7 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn activate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(94_130_000, 0)) + (Weight::from_parts(100_109_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } @@ -203,27 +249,92 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn deactivate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(82_600_000, 0)) + (Weight::from_parts(91_990_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - - fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Xyk LiquidityPools (r:1 w:0) + // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: Xyk Pools (r:1 w:0) + // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleId (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + fn reward_pool() -> Weight { + (Weight::from_parts(179_050_000, 0)) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) fn activate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + (Weight::from_parts(120_360_000, 0)) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - - fn reward_pool() -> Weight { - (Weight::from_parts(118_250_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) + // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) + // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) + // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) + // Storage: Tokens Accounts (r:1 w:1) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { + (Weight::from_parts(125_160_000, 0)) + .saturating_add(RocksDbWeight::get().reads(11 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) + } + // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) + // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) + // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) + // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) + // Storage: Tokens Accounts (r:2 w:2) + // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + fn claim_3rdparty_rewards() -> Weight { + (Weight::from_parts(94_980_000, 0)) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - } diff --git a/runtime/mangata-rococo/src/weights/pallet_session.rs b/runtime/mangata-rococo/src/weights/pallet_session.rs index 1a2b8fef84..3b9299b1a8 100644 --- a/runtime/mangata-rococo/src/weights/pallet_session.rs +++ b/runtime/mangata-rococo/src/weights/pallet_session.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,7 +68,7 @@ impl pallet_session::WeightInfo for ModuleWeight { // Storage: Session KeyOwner (r:1 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_480_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -77,7 +77,7 @@ impl pallet_session::WeightInfo for ModuleWeight { // Storage: Session KeyOwner (r:0 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { - (Weight::from_parts(17_900_000, 0)) + (Weight::from_parts(17_880_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -90,7 +90,7 @@ impl WeightInfo for () { // Storage: Session KeyOwner (r:1 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn set_keys() -> Weight { - (Weight::from_parts(27_420_000, 0)) + (Weight::from_parts(27_480_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -99,7 +99,7 @@ impl WeightInfo for () { // Storage: Session KeyOwner (r:0 w:1) // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) fn purge_keys() -> Weight { - (Weight::from_parts(17_900_000, 0)) + (Weight::from_parts(17_880_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_timestamp.rs b/runtime/mangata-rococo/src/weights/pallet_timestamp.rs index a2a3ba9ec3..a32d4dafb2 100644 --- a/runtime/mangata-rococo/src/weights/pallet_timestamp.rs +++ b/runtime/mangata-rococo/src/weights/pallet_timestamp.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -66,12 +66,12 @@ impl pallet_timestamp::WeightInfo for ModuleWeight { // Storage: Timestamp Now (r:1 w:1) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - (Weight::from_parts(11_000_000, 0)) + (Weight::from_parts(10_120_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_280_000, 0)) + (Weight::from_parts(5_220_000, 0)) } } @@ -80,11 +80,11 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:1) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - (Weight::from_parts(11_000_000, 0)) + (Weight::from_parts(10_120_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_280_000, 0)) + (Weight::from_parts(5_220_000, 0)) } } diff --git a/runtime/mangata-rococo/src/weights/pallet_treasury.rs b/runtime/mangata-rococo/src/weights/pallet_treasury.rs index 34eb8ab30f..89616a60b5 100644 --- a/runtime/mangata-rococo/src/weights/pallet_treasury.rs +++ b/runtime/mangata-rococo/src/weights/pallet_treasury.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -68,7 +68,7 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_treasury::WeightInfo for ModuleWeight { fn spend() -> Weight { - (Weight::from_parts(420_000, 0)) + (Weight::from_parts(530_000, 0)) } // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -77,7 +77,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Treasury Proposals (r:0 w:1) // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - (Weight::from_parts(45_080_000, 0)) + (Weight::from_parts(46_150_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -88,7 +88,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - (Weight::from_parts(50_770_000, 0)) + (Weight::from_parts(52_520_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -97,16 +97,16 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_245_010, 0)) - // Standard Error: 1_597 - .saturating_add((Weight::from_parts(65_488, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_564_531, 0)) + // Standard Error: 1_841 + .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { - (Weight::from_parts(12_149_000, 0)) + (Weight::from_parts(12_011_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -121,9 +121,9 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(40_502_670, 0)) - // Standard Error: 6_134 - .saturating_add((Weight::from_parts(4_155_700, 0)).saturating_mul(p as u64)) + (Weight::from_parts(41_108_943, 0)) + // Standard Error: 7_113 + .saturating_add((Weight::from_parts(4_261_200, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -133,7 +133,7 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { fn spend() -> Weight { - (Weight::from_parts(420_000, 0)) + (Weight::from_parts(530_000, 0)) } // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -142,7 +142,7 @@ impl WeightInfo for () { // Storage: Treasury Proposals (r:0 w:1) // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn propose_spend() -> Weight { - (Weight::from_parts(45_080_000, 0)) + (Weight::from_parts(46_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -153,7 +153,7 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn reject_proposal() -> Weight { - (Weight::from_parts(50_770_000, 0)) + (Weight::from_parts(52_520_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -162,16 +162,16 @@ impl WeightInfo for () { // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_245_010, 0)) - // Standard Error: 1_597 - .saturating_add((Weight::from_parts(65_488, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_564_531, 0)) + // Standard Error: 1_841 + .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) fn remove_approval() -> Weight { - (Weight::from_parts(12_149_000, 0)) + (Weight::from_parts(12_011_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -186,9 +186,9 @@ impl WeightInfo for () { // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(40_502_670, 0)) - // Standard Error: 6_134 - .saturating_add((Weight::from_parts(4_155_700, 0)).saturating_mul(p as u64)) + (Weight::from_parts(41_108_943, 0)) + // Standard Error: 7_113 + .saturating_add((Weight::from_parts(4_261_200, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) diff --git a/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs b/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs index 8f55cdf831..933c8abfba 100644 --- a/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs +++ b/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_utility_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -67,49 +67,49 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_utility_mangata::WeightInfo for ModuleWeight { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(19_140_183, 0)) - // Standard Error: 3_444 - .saturating_add((Weight::from_parts(9_410_608, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_547_364, 0)) + // Standard Error: 3_907 + .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_100_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(14_978_625, 0)) - // Standard Error: 2_992 - .saturating_add((Weight::from_parts(9_802_086, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_586_041, 0)) + // Standard Error: 3_411 + .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(16_510_000, 0)) + (Weight::from_parts(17_000_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(18_073_256, 0)) - // Standard Error: 3_525 - .saturating_add((Weight::from_parts(9_368_770, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_747_173, 0)) + // Standard Error: 3_163 + .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(19_140_183, 0)) - // Standard Error: 3_444 - .saturating_add((Weight::from_parts(9_410_608, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_547_364, 0)) + // Standard Error: 3_907 + .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_100_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(14_978_625, 0)) - // Standard Error: 2_992 - .saturating_add((Weight::from_parts(9_802_086, 0)).saturating_mul(c as u64)) + (Weight::from_parts(9_586_041, 0)) + // Standard Error: 3_411 + .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(16_510_000, 0)) + (Weight::from_parts(17_000_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(18_073_256, 0)) - // Standard Error: 3_525 - .saturating_add((Weight::from_parts(9_368_770, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_747_173, 0)) + // Standard Error: 3_163 + .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) } } diff --git a/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs b/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs index f58fc1d6e6..1c975632c9 100644 --- a/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs +++ b/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_vesting_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -75,9 +75,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_309_417, 0)) - // Standard Error: 7_565 - .saturating_add((Weight::from_parts(219_965, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_243_152, 0)) + // Standard Error: 7_939 + .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -88,9 +88,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_355_755, 0)) - // Standard Error: 3_270 - .saturating_add((Weight::from_parts(44_362, 0)).saturating_mul(s as u64)) + (Weight::from_parts(73_252_114, 0)) + // Standard Error: 3_434 + .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -101,9 +101,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_645_987, 0)) - // Standard Error: 7_779 - .saturating_add((Weight::from_parts(207_339, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_977_339, 0)) + // Standard Error: 7_858 + .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -116,9 +116,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_436_663, 0)) - // Standard Error: 2_844 - .saturating_add((Weight::from_parts(76_147, 0)).saturating_mul(s as u64)) + (Weight::from_parts(72_574_520, 0)) + // Standard Error: 3_250 + .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -131,9 +131,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Locks (r:1 w:0) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(83_196_714, 0)) - // Standard Error: 29_574 - .saturating_add((Weight::from_parts(415_253, 0)).saturating_mul(s as u64)) + (Weight::from_parts(88_550_017, 0)) + // Standard Error: 13_455 + .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -144,9 +144,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_058_391, 0)) - // Standard Error: 7_609 - .saturating_add((Weight::from_parts(223_040, 0)).saturating_mul(s as u64)) + (Weight::from_parts(54_212_340, 0)) + // Standard Error: 8_032 + .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -157,9 +157,9 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_022_178, 0)) - // Standard Error: 12_945 - .saturating_add((Weight::from_parts(320_024, 0)).saturating_mul(s as u64)) + (Weight::from_parts(52_783_090, 0)) + // Standard Error: 13_737 + .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -174,9 +174,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_309_417, 0)) - // Standard Error: 7_565 - .saturating_add((Weight::from_parts(219_965, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_243_152, 0)) + // Standard Error: 7_939 + .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -187,9 +187,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_355_755, 0)) - // Standard Error: 3_270 - .saturating_add((Weight::from_parts(44_362, 0)).saturating_mul(s as u64)) + (Weight::from_parts(73_252_114, 0)) + // Standard Error: 3_434 + .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -200,9 +200,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_645_987, 0)) - // Standard Error: 7_779 - .saturating_add((Weight::from_parts(207_339, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_977_339, 0)) + // Standard Error: 7_858 + .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -215,9 +215,9 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(70_436_663, 0)) - // Standard Error: 2_844 - .saturating_add((Weight::from_parts(76_147, 0)).saturating_mul(s as u64)) + (Weight::from_parts(72_574_520, 0)) + // Standard Error: 3_250 + .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -230,9 +230,9 @@ impl WeightInfo for () { // Storage: Tokens Locks (r:1 w:0) // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(83_196_714, 0)) - // Standard Error: 29_574 - .saturating_add((Weight::from_parts(415_253, 0)).saturating_mul(s as u64)) + (Weight::from_parts(88_550_017, 0)) + // Standard Error: 13_455 + .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } @@ -243,9 +243,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_058_391, 0)) - // Standard Error: 7_609 - .saturating_add((Weight::from_parts(223_040, 0)).saturating_mul(s as u64)) + (Weight::from_parts(54_212_340, 0)) + // Standard Error: 8_032 + .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -256,9 +256,9 @@ impl WeightInfo for () { // Storage: Tokens Accounts (r:1 w:1) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_022_178, 0)) - // Standard Error: 12_945 - .saturating_add((Weight::from_parts(320_024, 0)).saturating_mul(s as u64)) + (Weight::from_parts(52_783_090, 0)) + // Standard Error: 13_737 + .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_xyk.rs b/runtime/mangata-rococo/src/weights/pallet_xyk.rs index 62a52673ce..c1f831ff19 100644 --- a/runtime/mangata-rococo/src/weights/pallet_xyk.rs +++ b/runtime/mangata-rococo/src/weights/pallet_xyk.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_xyk //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -90,7 +90,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: Xyk LiquidityPools (r:0 w:1) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn create_pool() -> Weight { - (Weight::from_parts(199_311_000, 0)) + (Weight::from_parts(202_790_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -98,6 +98,10 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:3 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -105,12 +109,16 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn sell_asset() -> Weight { - (Weight::from_parts(226_860_000, 0)) - .saturating_add(T::DbWeight::get().reads(14 as u64)) + (Weight::from_parts(244_940_000, 0)) + .saturating_add(T::DbWeight::get().reads(16 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) // Storage: Xyk Pools (r:297 w:198) @@ -119,14 +127,12 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(618_130_000, 0)) - // Standard Error: 306_187 - .saturating_add((Weight::from_parts(245_461_340, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(661_629_000, 0)) + // Standard Error: 425_962 + .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) + .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -134,6 +140,10 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -141,28 +151,30 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn buy_asset() -> Weight { - (Weight::from_parts(233_140_000, 0)) - .saturating_add(T::DbWeight::get().reads(15 as u64)) + (Weight::from_parts(253_260_000, 0)) + .saturating_add(T::DbWeight::get().reads(18 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:297 w:198) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:400 w:400) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(632_069_000, 0)) - // Standard Error: 339_491 - .saturating_add((Weight::from_parts(252_882_037, 0)).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(691_040_000, 0)) + // Standard Error: 480_931 + .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(29 as u64)) + .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -187,7 +199,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn mint_liquidity() -> Weight { - (Weight::from_parts(234_080_000, 0)) + (Weight::from_parts(241_610_000, 0)) .saturating_add(T::DbWeight::get().reads(15 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } @@ -208,17 +220,17 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(270_350_000, 0)) + (Weight::from_parts(277_529_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:2) + // Storage: Xyk LiquidityAssets (r:1 w:0) // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:2) + // Storage: Xyk Pools (r:1 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:5 w:5) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -230,17 +242,19 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn burn_liquidity() -> Weight { - (Weight::from_parts(216_470_000, 0)) + (Weight::from_parts(223_960_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) - .saturating_add(T::DbWeight::get().writes(14 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Xyk LiquidityPools (r:1 w:0) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:7 w:7) @@ -249,16 +263,12 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(369_290_000, 0)) + (Weight::from_parts(386_749_000, 0)) .saturating_add(T::DbWeight::get().reads(22 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } @@ -272,16 +282,16 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:8 w:8) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:2 w:2) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:2 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) @@ -289,7 +299,7 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn compound_rewards() -> Weight { - (Weight::from_parts(514_330_000, 0)) + (Weight::from_parts(546_000_000, 0)) .saturating_add(T::DbWeight::get().reads(25 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } @@ -316,7 +326,7 @@ impl WeightInfo for () { // Storage: Xyk LiquidityPools (r:0 w:1) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn create_pool() -> Weight { - (Weight::from_parts(199_311_000, 0)) + (Weight::from_parts(202_790_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(12 as u64)) } @@ -324,6 +334,10 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:1 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:3 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -331,12 +345,16 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn sell_asset() -> Weight { - (Weight::from_parts(226_860_000, 0)) - .saturating_add(RocksDbWeight::get().reads(14 as u64)) + (Weight::from_parts(244_940_000, 0)) + .saturating_add(RocksDbWeight::get().reads(16 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) // Storage: Xyk Pools (r:297 w:198) @@ -345,14 +363,12 @@ impl WeightInfo for () { // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(618_130_000, 0)) - // Standard Error: 306_187 - .saturating_add((Weight::from_parts(245_461_340, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(661_629_000, 0)) + // Standard Error: 425_962 + .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(29 as u64)) + .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -360,6 +376,10 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:0) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:6 w:6) @@ -367,28 +387,30 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn buy_asset() -> Weight { - (Weight::from_parts(233_140_000, 0)) - .saturating_add(RocksDbWeight::get().reads(15 as u64)) + (Weight::from_parts(253_260_000, 0)) + .saturating_add(RocksDbWeight::get().reads(18 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:100 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:99 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:100 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:297 w:198) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:400 w:400) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(632_069_000, 0)) - // Standard Error: 339_491 - .saturating_add((Weight::from_parts(252_882_037, 0)).saturating_mul(x as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().reads((8 as u64).saturating_mul(x as u64))) + (Weight::from_parts(691_040_000, 0)) + // Standard Error: 480_931 + .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + .saturating_add(RocksDbWeight::get().reads(29 as u64)) + .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } @@ -413,7 +435,7 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn mint_liquidity() -> Weight { - (Weight::from_parts(234_080_000, 0)) + (Weight::from_parts(241_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(15 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } @@ -434,17 +456,17 @@ impl WeightInfo for () { // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(270_350_000, 0)) + (Weight::from_parts(277_529_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:2) + // Storage: Xyk LiquidityAssets (r:1 w:0) // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:2) + // Storage: Xyk Pools (r:1 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:5 w:5) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) @@ -456,17 +478,19 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens TotalIssuance (r:1 w:1) // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) fn burn_liquidity() -> Weight { - (Weight::from_parts(216_470_000, 0)) + (Weight::from_parts(223_960_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) - .saturating_add(RocksDbWeight::get().writes(14 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: Xyk LiquidityPools (r:1 w:0) // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) // Storage: AssetRegistry Metadata (r:2 w:0) // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:1 w:1) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:4 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Tokens Accounts (r:7 w:7) @@ -475,16 +499,12 @@ impl WeightInfo for () { // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(369_290_000, 0)) + (Weight::from_parts(386_749_000, 0)) .saturating_add(RocksDbWeight::get().reads(22 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } @@ -498,16 +518,16 @@ impl WeightInfo for () { // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:8 w:8) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: Xyk LiquidityAssets (r:2 w:0) + // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + // Storage: Tokens TotalIssuance (r:2 w:2) + // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) // Storage: Xyk Pools (r:2 w:1) // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) // Storage: Maintenance MaintenanceStatus (r:1 w:0) // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) // Storage: Tokens NextCurrencyId (r:1 w:0) // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) @@ -515,7 +535,7 @@ impl WeightInfo for () { // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) fn compound_rewards() -> Weight { - (Weight::from_parts(514_330_000, 0)) + (Weight::from_parts(546_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(25 as u64)) .saturating_add(RocksDbWeight::get().writes(16 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/parachain_staking.rs b/runtime/mangata-rococo/src/weights/parachain_staking.rs index b2b31ca20e..aa9ad00b32 100644 --- a/runtime/mangata-rococo/src/weights/parachain_staking.rs +++ b/runtime/mangata-rococo/src/weights/parachain_staking.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for parachain_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 // Executed Command: @@ -99,14 +99,14 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking TotalSelected (r:1 w:1) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) fn set_total_selected() -> Weight { - (Weight::from_parts(18_120_000, 0)) + (Weight::from_parts(18_150_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_170_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -133,11 +133,11 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(123_467_272, 0)) - // Standard Error: 5_457 - .saturating_add((Weight::from_parts(146_813, 0)).saturating_mul(x as u64)) - // Standard Error: 2_600 - .saturating_add((Weight::from_parts(190_628, 0)).saturating_mul(y as u64)) + (Weight::from_parts(128_769_592, 0)) + // Standard Error: 5_183 + .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) + // Standard Error: 5_120 + .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -148,9 +148,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_282_701, 0)) - // Standard Error: 2_623 - .saturating_add((Weight::from_parts(167_522, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_966_197, 0)) + // Standard Error: 1_766 + .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -158,20 +158,20 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:25 w:25) + // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:25 w:25) + // Storage: Tokens Accounts (r:30 w:30) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:24 w:24) + // Storage: ParachainStaking DelegatorState (r:29 w:29) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CandidateAggregator (r:1 w:0) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(60_685_134, 0)) - // Standard Error: 31_073 - .saturating_add((Weight::from_parts(31_446_338, 0)).saturating_mul(x as u64)) + (Weight::from_parts(61_759_888, 0)) + // Standard Error: 25_405 + .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -182,9 +182,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(37_579_077, 0)) - // Standard Error: 2_367 - .saturating_add((Weight::from_parts(161_581, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_197_562, 0)) + // Standard Error: 1_699 + .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -195,7 +195,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_offline() -> Weight { - (Weight::from_parts(38_880_000, 0)) + (Weight::from_parts(39_200_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -206,7 +206,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_online() -> Weight { - (Weight::from_parts(38_290_000, 0)) + (Weight::from_parts(38_610_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -219,7 +219,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(55_150_000, 0)) + (Weight::from_parts(56_000_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -234,7 +234,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_430_000, 0)) + (Weight::from_parts(57_740_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -251,7 +251,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(89_831_000, 0)) + (Weight::from_parts(90_910_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -268,21 +268,21 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(85_290_000, 0)) + (Weight::from_parts(87_720_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(29_900_000, 0)) + (Weight::from_parts(30_420_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_190_000, 0)) + (Weight::from_parts(29_860_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -307,11 +307,11 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(126_644_715, 0)) - // Standard Error: 7_517 - .saturating_add((Weight::from_parts(346_672, 0)).saturating_mul(x as u64)) - // Standard Error: 19_666 - .saturating_add((Weight::from_parts(396_238, 0)).saturating_mul(y as u64)) + (Weight::from_parts(127_734_458, 0)) + // Standard Error: 7_698 + .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) + // Standard Error: 7_439 + .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -320,7 +320,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(32_340_000, 0)) + (Weight::from_parts(33_410_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -339,9 +339,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_536_934, 0)) - // Standard Error: 26_983 - .saturating_add((Weight::from_parts(37_923_839, 0)).saturating_mul(x as u64)) + (Weight::from_parts(24_848_761, 0)) + // Standard Error: 26_767 + .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) @@ -350,7 +350,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(30_410_000, 0)) + (Weight::from_parts(31_130_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -359,7 +359,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(33_440_000, 0)) + (Weight::from_parts(34_070_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -372,7 +372,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_360_000, 0)) + (Weight::from_parts(56_650_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -381,7 +381,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(33_850_000, 0)) + (Weight::from_parts(34_280_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -400,7 +400,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(110_750_000, 0)) + (Weight::from_parts(111_770_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -419,7 +419,7 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(104_580_000, 0)) + (Weight::from_parts(103_940_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -438,28 +438,28 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(100_440_000, 0)) + (Weight::from_parts(99_690_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(30_630_000, 0)) + (Weight::from_parts(31_370_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_770_000, 0)) + (Weight::from_parts(35_290_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_660_000, 0)) + (Weight::from_parts(35_540_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -468,22 +468,22 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_003_682, 0)) - // Standard Error: 2_159 - .saturating_add((Weight::from_parts(179_452, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_340_872, 0)) + // Standard Error: 2_236 + .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_637_967, 0)) - // Standard Error: 1_732 - .saturating_add((Weight::from_parts(159_921, 0)).saturating_mul(x as u64)) + (Weight::from_parts(20_686_950, 0)) + // Standard Error: 1_638 + .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:49 w:0) + // Storage: ParachainStaking CandidateState (r:99 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking DelegatorState (r:1 w:0) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -492,8 +492,8 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking CandidateAggregator (r:1 w:1) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(738_010_000, 0)) - .saturating_add(T::DbWeight::get().reads(52 as u64)) + (Weight::from_parts(1_946_910_000, 0)) + .saturating_add(T::DbWeight::get().reads(102 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:0) @@ -503,20 +503,20 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(97_980_000, 0)) + (Weight::from_parts(122_120_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:14 w:14) + // Storage: Tokens Accounts (r:32 w:32) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:14 w:13) + // Storage: System Account (r:32 w:31) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(646_079_000, 0)) - .saturating_add(T::DbWeight::get().reads(30 as u64)) - .saturating_add(T::DbWeight::get().writes(28 as u64)) + (Weight::from_parts(1_493_000_000, 0)) + .saturating_add(T::DbWeight::get().reads(66 as u64)) + .saturating_add(T::DbWeight::get().writes(64 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) @@ -525,14 +525,14 @@ impl parachain_staking::WeightInfo for ModuleWeight // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(81_750_000, 0)) + (Weight::from_parts(87_790_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn passive_session_change() -> Weight { - (Weight::from_parts(7_450_000, 0)) + (Weight::from_parts(7_670_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: ParachainStaking Round (r:1 w:1) @@ -551,9 +551,9 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:27 w:26) + // Storage: ParachainStaking AwardedPts (r:52 w:51) // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:26 w:52) + // Storage: ParachainStaking AtStake (r:51 w:102) // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) @@ -571,37 +571,41 @@ impl parachain_staking::WeightInfo for ModuleWeight // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking TotalSelected (r:1 w:0) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:26 w:0) + // Storage: ParachainStaking CandidateState (r:51 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: Issuance IssuanceConfigStore (r:1 w:0) // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:0) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:26 w:0) + // Storage: Session NextKeys (r:51 w:0) // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) // Storage: Aura Authorities (r:1 w:0) // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:26) + // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) // Storage: Session Validators (r:0 w:1) // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(962_696_231, 0)) - // Standard Error: 23_712 - .saturating_add((Weight::from_parts(18_001_066, 0)).saturating_mul(x as u64)) - // Standard Error: 102_677 - .saturating_add((Weight::from_parts(5_760_381, 0)).saturating_mul(y as u64)) - // Standard Error: 242_115 - .saturating_add((Weight::from_parts(29_808_290, 0)).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(124 as u64)) + (Weight::from_parts(1_634_783_507, 0)) + // Standard Error: 32_199 + .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) + // Standard Error: 66_033 + .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) + // Standard Error: 114_378 + .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) + .saturating_add(T::DbWeight::get().reads(226 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(119 as u64)) + .saturating_add(T::DbWeight::get().writes(220 as u64)) } } @@ -610,14 +614,14 @@ impl WeightInfo for () { // Storage: ParachainStaking TotalSelected (r:1 w:1) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) fn set_total_selected() -> Weight { - (Weight::from_parts(18_120_000, 0)) + (Weight::from_parts(18_150_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CollatorCommission (r:1 w:1) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_170_000, 0)) + (Weight::from_parts(18_530_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -644,11 +648,11 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(123_467_272, 0)) - // Standard Error: 5_457 - .saturating_add((Weight::from_parts(146_813, 0)).saturating_mul(x as u64)) - // Standard Error: 2_600 - .saturating_add((Weight::from_parts(190_628, 0)).saturating_mul(y as u64)) + (Weight::from_parts(128_769_592, 0)) + // Standard Error: 5_183 + .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) + // Standard Error: 5_120 + .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -659,9 +663,9 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_282_701, 0)) - // Standard Error: 2_623 - .saturating_add((Weight::from_parts(167_522, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_966_197, 0)) + // Standard Error: 1_766 + .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -669,20 +673,20 @@ impl WeightInfo for () { // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:25 w:25) + // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:25 w:25) + // Storage: Tokens Accounts (r:30 w:30) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:24 w:24) + // Storage: ParachainStaking DelegatorState (r:29 w:29) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CandidateAggregator (r:1 w:0) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(60_685_134, 0)) - // Standard Error: 31_073 - .saturating_add((Weight::from_parts(31_446_338, 0)).saturating_mul(x as u64)) + (Weight::from_parts(61_759_888, 0)) + // Standard Error: 25_405 + .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) @@ -693,9 +697,9 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(37_579_077, 0)) - // Standard Error: 2_367 - .saturating_add((Weight::from_parts(161_581, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_197_562, 0)) + // Standard Error: 1_699 + .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -706,7 +710,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_offline() -> Weight { - (Weight::from_parts(38_880_000, 0)) + (Weight::from_parts(39_200_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -717,7 +721,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn go_online() -> Weight { - (Weight::from_parts(38_290_000, 0)) + (Weight::from_parts(38_610_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } @@ -730,7 +734,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(55_150_000, 0)) + (Weight::from_parts(56_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -745,7 +749,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_430_000, 0)) + (Weight::from_parts(57_740_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -762,7 +766,7 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(89_831_000, 0)) + (Weight::from_parts(90_910_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } @@ -779,21 +783,21 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidatePool (r:1 w:1) // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(85_290_000, 0)) + (Weight::from_parts(87_720_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(29_900_000, 0)) + (Weight::from_parts(30_420_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:1) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_190_000, 0)) + (Weight::from_parts(29_860_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -818,11 +822,11 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(126_644_715, 0)) - // Standard Error: 7_517 - .saturating_add((Weight::from_parts(346_672, 0)).saturating_mul(x as u64)) - // Standard Error: 19_666 - .saturating_add((Weight::from_parts(396_238, 0)).saturating_mul(y as u64)) + (Weight::from_parts(127_734_458, 0)) + // Standard Error: 7_698 + .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) + // Standard Error: 7_439 + .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -831,7 +835,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(32_340_000, 0)) + (Weight::from_parts(33_410_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -850,9 +854,9 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_536_934, 0)) - // Standard Error: 26_983 - .saturating_add((Weight::from_parts(37_923_839, 0)).saturating_mul(x as u64)) + (Weight::from_parts(24_848_761, 0)) + // Standard Error: 26_767 + .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(4 as u64)) @@ -861,7 +865,7 @@ impl WeightInfo for () { // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(30_410_000, 0)) + (Weight::from_parts(31_130_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -870,7 +874,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(33_440_000, 0)) + (Weight::from_parts(34_070_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -883,7 +887,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_360_000, 0)) + (Weight::from_parts(56_650_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -892,7 +896,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(33_850_000, 0)) + (Weight::from_parts(34_280_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -911,7 +915,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(110_750_000, 0)) + (Weight::from_parts(111_770_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -930,7 +934,7 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(104_580_000, 0)) + (Weight::from_parts(103_940_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } @@ -949,28 +953,28 @@ impl WeightInfo for () { // Storage: ParachainStaking Total (r:1 w:1) // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(100_440_000, 0)) + (Weight::from_parts(99_690_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(30_630_000, 0)) + (Weight::from_parts(31_370_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_770_000, 0)) + (Weight::from_parts(35_290_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking DelegatorState (r:1 w:1) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_660_000, 0)) + (Weight::from_parts(35_540_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } @@ -979,22 +983,22 @@ impl WeightInfo for () { // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_003_682, 0)) - // Standard Error: 2_159 - .saturating_add((Weight::from_parts(179_452, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_340_872, 0)) + // Standard Error: 2_236 + .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_637_967, 0)) - // Standard Error: 1_732 - .saturating_add((Weight::from_parts(159_921, 0)).saturating_mul(x as u64)) + (Weight::from_parts(20_686_950, 0)) + // Standard Error: 1_638 + .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:49 w:0) + // Storage: ParachainStaking CandidateState (r:99 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking DelegatorState (r:1 w:0) // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -1003,8 +1007,8 @@ impl WeightInfo for () { // Storage: ParachainStaking CandidateAggregator (r:1 w:1) // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(738_010_000, 0)) - .saturating_add(RocksDbWeight::get().reads(52 as u64)) + (Weight::from_parts(1_946_910_000, 0)) + .saturating_add(RocksDbWeight::get().reads(102 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: ParachainStaking CandidateState (r:1 w:0) @@ -1014,20 +1018,20 @@ impl WeightInfo for () { // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(97_980_000, 0)) + (Weight::from_parts(122_120_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:14 w:14) + // Storage: Tokens Accounts (r:32 w:32) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:14 w:13) + // Storage: System Account (r:32 w:31) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(646_079_000, 0)) - .saturating_add(RocksDbWeight::get().reads(30 as u64)) - .saturating_add(RocksDbWeight::get().writes(28 as u64)) + (Weight::from_parts(1_493_000_000, 0)) + .saturating_add(RocksDbWeight::get().reads(66 as u64)) + .saturating_add(RocksDbWeight::get().writes(64 as u64)) } // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) @@ -1036,14 +1040,14 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:1) // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(81_750_000, 0)) + (Weight::from_parts(87_790_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: ParachainStaking Round (r:1 w:0) // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) fn passive_session_change() -> Weight { - (Weight::from_parts(7_450_000, 0)) + (Weight::from_parts(7_670_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } // Storage: ParachainStaking Round (r:1 w:1) @@ -1062,9 +1066,9 @@ impl WeightInfo for () { // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:27 w:26) + // Storage: ParachainStaking AwardedPts (r:52 w:51) // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:26 w:52) + // Storage: ParachainStaking AtStake (r:51 w:102) // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) // Storage: ParachainStaking CollatorCommission (r:1 w:0) // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) @@ -1082,36 +1086,40 @@ impl WeightInfo for () { // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) // Storage: ParachainStaking TotalSelected (r:1 w:0) // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:26 w:0) + // Storage: ParachainStaking CandidateState (r:51 w:0) // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) // Storage: Issuance IssuanceConfigStore (r:1 w:0) // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake RewardsSchedules (r:1 w:0) + // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) + // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) + // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) // Storage: Tokens Accounts (r:2 w:2) // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:26 w:0) + // Storage: Session NextKeys (r:51 w:0) // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) // Storage: Aura Authorities (r:1 w:0) // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) // Storage: ParachainStaking SelectedCandidates (r:0 w:1) // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:26) + // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) // Storage: Session Validators (r:0 w:1) // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(962_696_231, 0)) - // Standard Error: 23_712 - .saturating_add((Weight::from_parts(18_001_066, 0)).saturating_mul(x as u64)) - // Standard Error: 102_677 - .saturating_add((Weight::from_parts(5_760_381, 0)).saturating_mul(y as u64)) - // Standard Error: 242_115 - .saturating_add((Weight::from_parts(29_808_290, 0)).saturating_mul(z as u64)) - .saturating_add(RocksDbWeight::get().reads(124 as u64)) + (Weight::from_parts(1_634_783_507, 0)) + // Standard Error: 32_199 + .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) + // Standard Error: 66_033 + .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) + // Standard Error: 114_378 + .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) + .saturating_add(RocksDbWeight::get().reads(226 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(119 as u64)) + .saturating_add(RocksDbWeight::get().writes(220 as u64)) } } From b0bb7c641d3a91299b3815e9ae813e8193a3d5a3 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 2 Oct 2023 22:47:29 +0200 Subject: [PATCH 035/125] apply formatting --- runtime/mangata-kusama/src/weights/block_weights.rs | 1 - runtime/mangata-kusama/src/weights/extrinsic_weights.rs | 1 - runtime/mangata-rococo/src/weights/block_weights.rs | 1 - runtime/mangata-rococo/src/weights/extrinsic_weights.rs | 1 - 4 files changed, 4 deletions(-) diff --git a/runtime/mangata-kusama/src/weights/block_weights.rs b/runtime/mangata-kusama/src/weights/block_weights.rs index e190a4a858..6d27c66767 100644 --- a/runtime/mangata-kusama/src/weights/block_weights.rs +++ b/runtime/mangata-kusama/src/weights/block_weights.rs @@ -1,4 +1,3 @@ - //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-10-02 (Y/M/D) //! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` diff --git a/runtime/mangata-kusama/src/weights/extrinsic_weights.rs b/runtime/mangata-kusama/src/weights/extrinsic_weights.rs index 033bf75d8f..ddceb8ee70 100644 --- a/runtime/mangata-kusama/src/weights/extrinsic_weights.rs +++ b/runtime/mangata-kusama/src/weights/extrinsic_weights.rs @@ -1,4 +1,3 @@ - //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-10-02 (Y/M/D) //! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` diff --git a/runtime/mangata-rococo/src/weights/block_weights.rs b/runtime/mangata-rococo/src/weights/block_weights.rs index e190a4a858..6d27c66767 100644 --- a/runtime/mangata-rococo/src/weights/block_weights.rs +++ b/runtime/mangata-rococo/src/weights/block_weights.rs @@ -1,4 +1,3 @@ - //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-10-02 (Y/M/D) //! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` diff --git a/runtime/mangata-rococo/src/weights/extrinsic_weights.rs b/runtime/mangata-rococo/src/weights/extrinsic_weights.rs index 033bf75d8f..ddceb8ee70 100644 --- a/runtime/mangata-rococo/src/weights/extrinsic_weights.rs +++ b/runtime/mangata-rococo/src/weights/extrinsic_weights.rs @@ -1,4 +1,3 @@ - //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-10-02 (Y/M/D) //! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` From 17c1d75dff6ac7e5cf49f99f8162638d8c9fe310 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 11 Oct 2023 19:45:46 +0000 Subject: [PATCH 036/125] fwip --- Cargo.lock | 277 +-- Cargo.toml | 2202 +++++++++++---------- devops/parachain-launch/config.yml | 2 +- pallets/proof-of-stake/Cargo.toml | 5 +- pallets/proof-of-stake/src/lib.rs | 488 +++-- pallets/proof-of-stake/src/mock.rs | 5 + pallets/proof-of-stake/src/reward_info.rs | 15 +- pallets/proof-of-stake/src/tests.rs | 221 ++- pallets/xyk/src/lib.rs | 13 + pallets/xyk/src/tests.rs | 46 + runtime/common/src/lib.rs | 2 +- 11 files changed, 1782 insertions(+), 1494 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7f3ac00573..1102437ef3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -554,7 +554,6 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "hash-db 0.16.0", "log", @@ -1100,7 +1099,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -2612,7 +2611,6 @@ dependencies = [ [[package]] name = "extrinsic-shuffler" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "derive_more", "log", @@ -2781,7 +2779,6 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", ] @@ -2804,7 +2801,6 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-support-procedural", @@ -2830,7 +2826,6 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "Inflector", "array-bytes 4.2.0", @@ -2883,7 +2878,6 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2894,7 +2888,6 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2911,7 +2904,6 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "aquamarine", "extrinsic-shuffler", @@ -2945,7 +2937,6 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "futures", "log", @@ -2961,7 +2952,6 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "bitflags", "environmental", @@ -2995,7 +2985,6 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "Inflector", "cfg-expr", @@ -3010,7 +2999,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -3022,7 +3010,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "proc-macro2", "quote", @@ -3032,7 +3019,6 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "extrinsic-shuffler", "frame-support", @@ -3052,22 +3038,6 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#afd05d5ed525572ed1b6d6a19aeac2465f552e1f" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "frame-system-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -3082,7 +3052,6 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "sp-api", @@ -3091,7 +3060,6 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "parity-scale-codec", @@ -4144,7 +4112,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -4988,7 +4956,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -5112,7 +5080,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-aura", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sc-consensus-grandpa", "sc-executor", "sc-keystore", "sc-network", @@ -5178,7 +5146,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -5272,7 +5240,6 @@ dependencies = [ [[package]] name = "mangata-support" version = "0.1.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "mangata-types", @@ -5285,7 +5252,6 @@ dependencies = [ [[package]] name = "mangata-types" version = "0.1.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "scale-info", @@ -5453,7 +5419,6 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "futures", "log", @@ -5473,7 +5438,6 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "anyhow", "jsonrpsee", @@ -6111,7 +6075,6 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -6127,7 +6090,6 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -6143,7 +6105,6 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -6157,7 +6118,6 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6181,7 +6141,6 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6201,7 +6160,6 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6216,7 +6174,6 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -6235,10 +6192,9 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", - "binary-merkle-tree 4.0.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "binary-merkle-tree 4.0.0-dev", "frame-support", "frame-system", "log", @@ -6291,7 +6247,6 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6309,7 +6264,6 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6328,7 +6282,6 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6345,7 +6298,6 @@ dependencies = [ [[package]] name = "pallet-collective-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6362,7 +6314,6 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6403,7 +6354,6 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6421,14 +6371,13 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", "log", - "pallet-election-provider-support-benchmarking 4.0.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "pallet-election-provider-support-benchmarking 4.0.0-dev", "parity-scale-codec", "rand 0.8.5", "scale-info", @@ -6444,7 +6393,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6470,7 +6418,6 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6488,7 +6435,6 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6535,7 +6481,6 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6558,7 +6503,6 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6574,7 +6518,6 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6594,7 +6537,6 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6663,7 +6605,6 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6680,7 +6621,6 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6727,7 +6667,6 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6743,7 +6682,6 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6759,7 +6697,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -6796,7 +6733,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6807,7 +6743,6 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -6848,7 +6783,6 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6902,7 +6836,6 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6917,7 +6850,6 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6935,7 +6867,6 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -6950,7 +6881,6 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6969,7 +6899,6 @@ dependencies = [ [[package]] name = "pallet-root-testing" version = "1.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#afd05d5ed525572ed1b6d6a19aeac2465f552e1f" dependencies = [ "frame-support", "frame-system", @@ -6984,7 +6913,6 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -7001,7 +6929,6 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -7038,7 +6965,6 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -7052,7 +6978,6 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7075,7 +7000,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7086,7 +7010,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "log", "sp-arithmetic", @@ -7104,7 +7027,6 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -7121,7 +7043,6 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -7135,7 +7056,6 @@ dependencies = [ [[package]] name = "pallet-sudo-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -7167,7 +7087,6 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -7185,7 +7104,6 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -7204,7 +7122,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -7220,7 +7137,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-support", "frame-system", @@ -7236,7 +7152,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-mangata-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "jsonrpsee", "pallet-transaction-payment-mangata-rpc-runtime-api", @@ -7252,7 +7167,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-mangata-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "pallet-transaction-payment-mangata", "parity-scale-codec", @@ -7264,7 +7178,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7280,7 +7193,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7292,7 +7204,6 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -7309,7 +7220,6 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -7325,7 +7235,6 @@ dependencies = [ [[package]] name = "pallet-utility-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -7341,7 +7250,6 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -7356,7 +7264,6 @@ dependencies = [ [[package]] name = "pallet-vesting-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -7372,7 +7279,6 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-benchmarking", "frame-support", @@ -7475,7 +7381,6 @@ dependencies = [ [[package]] name = "parachain-staking" version = "3.0.0" -source = "git+https://github.com/mangata-finance//moonbeam?branch=mangata-dev#2ac7a339be795ee58603e3cb68e65fedc1b1c295" dependencies = [ "aquamarine", "frame-benchmarking", @@ -8593,7 +8498,7 @@ dependencies = [ "sc-consensus-beefy", "sc-consensus-beefy-rpc", "sc-consensus-epochs", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-consensus-grandpa", "sc-consensus-grandpa-rpc", "sc-rpc", "sc-sync-state-rpc", @@ -8620,7 +8525,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -8884,7 +8789,7 @@ dependencies = [ "sc-consensus", "sc-consensus-babe", "sc-consensus-beefy", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-consensus-grandpa", "sc-consensus-slots", "sc-executor", "sc-keystore", @@ -9047,7 +8952,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-babe", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-consensus-grandpa", "sc-executor", "sc-network", "sc-service", @@ -9752,7 +9657,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -10102,7 +10007,6 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "log", "sp-core", @@ -10113,7 +10017,6 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "futures", @@ -10141,7 +10044,6 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "futures", "futures-timer", @@ -10164,7 +10066,6 @@ dependencies = [ [[package]] name = "sc-basic-authorship-ver" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "aquamarine", "futures", @@ -10190,7 +10091,6 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -10205,7 +10105,6 @@ dependencies = [ [[package]] name = "sc-block-builder-ver" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "aquamarine", "extrinsic-shuffler", @@ -10226,7 +10125,6 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -10245,7 +10143,6 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10256,7 +10153,6 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "chrono", @@ -10296,7 +10192,6 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "fnv", "futures", @@ -10322,7 +10217,6 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -10348,7 +10242,6 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "futures", @@ -10373,7 +10266,6 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "futures", @@ -10402,7 +10294,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "fork-tree", @@ -10443,7 +10334,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "futures", "jsonrpsee", @@ -10465,7 +10355,6 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10519,7 +10408,6 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10532,47 +10420,6 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "ahash 0.8.3", - "array-bytes 4.2.0", - "async-trait", - "dyn-clone", - "finality-grandpa", - "fork-tree", - "futures", - "futures-timer", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-telemetry", - "sc-utils", - "serde_json", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-consensus-grandpa", - "sp-core", - "sp-keystore", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-consensus-grandpa" -version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#afd05d5ed525572ed1b6d6a19aeac2465f552e1f" dependencies = [ "ahash 0.8.3", "array-bytes 4.2.0", @@ -10620,7 +10467,7 @@ dependencies = [ "log", "parity-scale-codec", "sc-client-api", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-consensus-grandpa", "sc-rpc", "serde", "sp-blockchain", @@ -10632,7 +10479,6 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "futures", @@ -10657,7 +10503,6 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -10681,7 +10526,6 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -10694,7 +10538,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "log", "sc-allocator", @@ -10707,7 +10550,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "anyhow", "cfg-if", @@ -10725,7 +10567,6 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "ansi_term", "futures", @@ -10741,7 +10582,6 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10756,7 +10596,6 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "async-channel", @@ -10800,7 +10639,6 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "cid", "futures", @@ -10820,7 +10658,6 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10848,7 +10685,6 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "ahash 0.8.3", "futures", @@ -10867,7 +10703,6 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10889,7 +10724,6 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10923,7 +10757,6 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10943,7 +10776,6 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -10974,7 +10806,6 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "futures", "libp2p", @@ -10987,7 +10818,6 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10996,7 +10826,6 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "futures", "hash-db 0.15.2", @@ -11027,7 +10856,6 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -11047,7 +10875,6 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "futures", "http", @@ -11063,7 +10890,6 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "futures", @@ -11089,7 +10915,6 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "directories", @@ -11121,7 +10946,7 @@ dependencies = [ "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", - "sc-storage-monitor 0.1.0 (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-storage-monitor 0.1.0", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -11161,7 +10986,6 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "log", "parity-scale-codec", @@ -11172,7 +10996,6 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "clap", "fs4", @@ -11204,7 +11027,6 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -11212,7 +11034,7 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-epochs", - "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=mangata-dev)", + "sc-consensus-grandpa", "serde", "serde_json", "sp-blockchain", @@ -11223,7 +11045,6 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "futures", "libc", @@ -11242,7 +11063,6 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "chrono", "futures", @@ -11261,7 +11081,6 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "ansi_term", "atty", @@ -11292,7 +11111,6 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11303,7 +11121,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "futures", @@ -11330,7 +11147,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "futures", @@ -11344,7 +11160,6 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-channel", "futures", @@ -11857,7 +11672,6 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "hash-db 0.16.0", "log", @@ -11875,7 +11689,6 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "Inflector", "blake2", @@ -11889,7 +11702,6 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "scale-info", @@ -11902,7 +11714,6 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "integer-sqrt", "num-traits", @@ -11916,7 +11727,6 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "scale-info", @@ -11929,7 +11739,6 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "sp-api", @@ -11941,7 +11750,6 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "futures", "log", @@ -11959,7 +11767,6 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "futures", @@ -11974,7 +11781,6 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "parity-scale-codec", @@ -11992,7 +11798,6 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "merlin", @@ -12015,7 +11820,6 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "lazy_static", "parity-scale-codec", @@ -12034,7 +11838,6 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "finality-grandpa", "log", @@ -12052,7 +11855,6 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "scale-info", @@ -12066,7 +11868,6 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "scale-info", @@ -12079,7 +11880,6 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "base58", @@ -12123,7 +11923,6 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "blake2b_simd", "byteorder", @@ -12137,7 +11936,6 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "proc-macro2", "quote", @@ -12148,7 +11946,6 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -12157,7 +11954,6 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "proc-macro2", "quote", @@ -12167,7 +11963,6 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "environmental", "parity-scale-codec", @@ -12178,7 +11973,6 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -12193,7 +11987,6 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "bytes", "ed25519", @@ -12218,7 +12011,6 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "lazy_static", "sp-core", @@ -12229,7 +12021,6 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "futures", @@ -12246,7 +12037,6 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "thiserror", "zstd", @@ -12255,7 +12045,6 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -12273,7 +12062,6 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "scale-info", @@ -12287,7 +12075,6 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "sp-api", "sp-core", @@ -12297,7 +12084,6 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "backtrace", "lazy_static", @@ -12307,7 +12093,6 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "rustc-hash", "serde", @@ -12317,7 +12102,6 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "either", "hash256-std-hasher", @@ -12340,7 +12124,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -12358,7 +12141,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "Inflector", "proc-macro-crate", @@ -12370,7 +12152,6 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "scale-info", @@ -12384,7 +12165,6 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "scale-info", @@ -12396,7 +12176,6 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "hash-db 0.16.0", "log", @@ -12416,12 +12195,10 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12434,7 +12211,6 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "futures-timer", @@ -12449,7 +12225,6 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "sp-std", @@ -12461,7 +12236,6 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "sp-api", "sp-runtime", @@ -12470,7 +12244,6 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "log", @@ -12486,7 +12259,6 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "ahash 0.8.3", "hash-db 0.16.0", @@ -12509,7 +12281,6 @@ dependencies = [ [[package]] name = "sp-ver" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "log", @@ -12527,7 +12298,6 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12544,7 +12314,6 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -12555,7 +12324,6 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -12569,7 +12337,6 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "scale-info", @@ -12748,7 +12515,6 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "platforms 2.0.0", ] @@ -12756,7 +12522,6 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12775,7 +12540,6 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "hyper", "log", @@ -12787,7 +12551,6 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "jsonrpsee", @@ -12800,7 +12563,6 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "jsonrpsee", "log", @@ -12819,7 +12581,6 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -12845,7 +12606,6 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "ansi_term", "build-helper", @@ -13489,7 +13249,6 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "clap", @@ -13702,7 +13461,6 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "ver-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "derive_more", "futures", @@ -14395,7 +14153,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -15034,14 +14792,11 @@ dependencies = [ [[patch.unused]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" [[patch.unused]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" [[patch.unused]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" diff --git a/Cargo.toml b/Cargo.toml index aeae1a639f..80d3a23727 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,8 +55,8 @@ orml-tokens = { git = "https://github.com/mangata-finance//open-runtime-module-l # patch generated by ./scripts/dev_manifest.sh [patch."https://github.com/mangata-finance/moonbeam"] # parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "feature/update-staking-benchmarks" } -parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "mangata-dev" } -# parachain-staking = { path = "../moonbeam/pallets/parachain-staking" } +# parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "mangata-dev" } +parachain-staking = { path = "../moonbeam/pallets/parachain-staking" } [patch."https://github.com/mangata-finance/crowdloan-rewards"] pallet-crowdloan-rewards = { git = "https://github.com/mangata-finance//crowdloan-rewards", branch = "mangata-dev" } @@ -370,1100 +370,1120 @@ xcm-procedural = { git = "https://github.com/mangata-finance//polkadot", branch # xcm = { path = "../polkadot/xcm" } # xcm-procedural = { path = "../polkadot/xcm/procedural" } - # patch generated by ./scripts/dev-0.9.29_manifest.sh +# # patch generated by ./scripts/dev-0.9.29_manifest.sh +# [patch."https://github.com/mangata-finance/substrate"] +# sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# +# # patch generated by ./scripts/dev-0.9.29_manifest.sh +# [patch."https://github.com/paritytech/substrate"] +# sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# +# # patch generated by ./scripts/dev-0.9.29_manifest.sh +# [patch."https://github.com/PureStake/substrate"] +# sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +# sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } + +[patch."https://github.com/mangata-finance//substrate"] +pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } + +# patch generated by ./scripts/dev_manifest.sh [patch."https://github.com/mangata-finance/substrate"] -sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-offchain = { path = "../substrate/client/offchain" } +sc-keystore = { path = "../substrate/client/keystore" } +mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } +mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } +sc-informant = { path = "../substrate/client/informant" } +sc-client-db = { path = "../substrate/client/db" } +sc-rpc-api = { path = "../substrate/client/rpc-api" } +sc-client-api = { path = "../substrate/client/api" } +sc-block-builder = { path = "../substrate/client/block-builder" } +sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } +sc-transaction-pool = { path = "../substrate/client/transaction-pool" } +sc-utils = { path = "../substrate/client/utils" } +sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } +sc-tracing = { path = "../substrate/client/tracing" } +sc-state-db = { path = "../substrate/client/state-db" } +sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } +sc-authority-discovery = { path = "../substrate/client/authority-discovery" } +sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } +sc-consensus-babe = { path = "../substrate/client/consensus/babe" } +sc-consensus-slots = { path = "../substrate/client/consensus/slots" } +sc-consensus = { path = "../substrate/client/consensus/common" } +sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } +sc-consensus-aura = { path = "../substrate/client/consensus/aura" } +sc-basic-authorship = { path = "../substrate/client/basic-authorship" } +sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } +sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } +sc-executor = { path = "../substrate/client/executor" } +sc-executor-common = { path = "../substrate/client/executor/common" } +sc-cli = { path = "../substrate/client/cli" } +sc-peerset = { path = "../substrate/client/peerset" } +sc-telemetry = { path = "../substrate/client/telemetry" } +sc-allocator = { path = "../substrate/client/allocator" } +sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } +sc-network-gossip = { path = "../substrate/client/network-gossip" } +sc-sysinfo = { path = "../substrate/client/sysinfo" } +sc-rpc-server = { path = "../substrate/client/rpc-servers" } +sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } +sc-rpc = { path = "../substrate/client/rpc" } +sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } +sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } +sc-chain-spec = { path = "../substrate/client/chain-spec" } +sc-network-sync = { path = "../substrate/client/network/sync" } +sc-network-bitswap = { path = "../substrate/client/network/bitswap" } +sc-network-light = { path = "../substrate/client/network/light" } +sc-network-transactions = { path = "../substrate/client/network/transactions" } +sc-network = { path = "../substrate/client/network" } +sc-network-common = { path = "../substrate/client/network/common" } +sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } +sc-service = { path = "../substrate/client/service" } +substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } +fork-tree = { path = "../substrate/utils/fork-tree" } +frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } +try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } +frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } +substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } +substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } +substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } +substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } +substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } +pallet-referenda = { path = "../substrate/frame/referenda" } +pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } +pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } +pallet-utility = { path = "../substrate/frame/utility" } +pallet-session = { path = "../substrate/frame/session" } +pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } +pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } +pallet-treasury = { path = "../substrate/frame/treasury" } +pallet-sudo = { path = "../substrate/frame/sudo" } +pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } +pallet-membership = { path = "../substrate/frame/membership" } +pallet-recovery = { path = "../substrate/frame/recovery" } +pallet-tips = { path = "../substrate/frame/tips" } +pallet-balances = { path = "../substrate/frame/balances" } +pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } +frame-executive = { path = "../substrate/frame/executive" } +pallet-timestamp = { path = "../substrate/frame/timestamp" } +pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } +pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } +pallet-preimage = { path = "../substrate/frame/preimage" } +frame-try-runtime = { path = "../substrate/frame/try-runtime" } +pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } +pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } +pallet-society = { path = "../substrate/frame/society" } +pallet-identity = { path = "../substrate/frame/identity" } +pallet-babe = { path = "../substrate/frame/babe" } +pallet-child-bounties = { path = "../substrate/frame/child-bounties" } +pallet-vesting = { path = "../substrate/frame/vesting" } +pallet-bounties = { path = "../substrate/frame/bounties" } +frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } +frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } +pallet-indices = { path = "../substrate/frame/indices" } +pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } +pallet-collective = { path = "../substrate/frame/collective" } +pallet-multisig = { path = "../substrate/frame/multisig" } +pallet-offences = { path = "../substrate/frame/offences" } +pallet-scheduler = { path = "../substrate/frame/scheduler" } +pallet-nis = { path = "../substrate/frame/nis" } +frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } +frame-system = { path = "../substrate/frame/system" } +frame-benchmarking = { path = "../substrate/frame/benchmarking" } +pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } +pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } +pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } +pallet-proxy = { path = "../substrate/frame/proxy" } +pallet-whitelist = { path = "../substrate/frame/whitelist" } +pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } +pallet-bags-list = { path = "../substrate/frame/bags-list" } +pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } +pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } +pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } +pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } +frame-support = { path = "../substrate/frame/support" } +frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } +frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } +frame-support-procedural = { path = "../substrate/frame/support/procedural" } +pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } +pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } +pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } +pallet-staking = { path = "../substrate/frame/staking" } +pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } +pallet-grandpa = { path = "../substrate/frame/grandpa" } +pallet-democracy = { path = "../substrate/frame/democracy" } +pallet-beefy = { path = "../substrate/frame/beefy" } +pallet-aura = { path = "../substrate/frame/aura" } +pallet-authorship = { path = "../substrate/frame/authorship" } +pallet-im-online = { path = "../substrate/frame/im-online" } +mangata-support = { path = "../substrate/frame/mangata-support" } +substrate-test-client = { path = "../substrate/test-utils/client" } +sp-offchain = { path = "../substrate/primitives/offchain" } +sp-keystore = { path = "../substrate/primitives/keystore" } +sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } +sp-keyring = { path = "../substrate/primitives/keyring" } +sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } +sp-state-machine = { path = "../substrate/primitives/state-machine" } +sp-session = { path = "../substrate/primitives/session" } +sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } +ver-api = { path = "../substrate/primitives/ver-api" } +sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } +sp-api = { path = "../substrate/primitives/api" } +sp-externalities = { path = "../substrate/primitives/externalities" } +sp-std = { path = "../substrate/primitives/std" } +sp-trie = { path = "../substrate/primitives/trie" } +sp-block-builder = { path = "../substrate/primitives/block-builder" } +sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } +sp-tracing = { path = "../substrate/primitives/tracing" } +sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } +sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } +sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } +sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } +sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } +sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } +sp-consensus = { path = "../substrate/primitives/consensus/common" } +sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } +sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } +sp-io = { path = "../substrate/primitives/io" } +sp-timestamp = { path = "../substrate/primitives/timestamp" } +sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } +sp-core-hashing = { path = "../substrate/primitives/core/hashing" } +sp-core = { path = "../substrate/primitives/core" } +sp-panic-handler = { path = "../substrate/primitives/panic-handler" } +sp-database = { path = "../substrate/primitives/database" } +sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } +sp-version = { path = "../substrate/primitives/version" } +extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } +mangata-types = { path = "../substrate/primitives/mangata-types" } +sp-rpc = { path = "../substrate/primitives/rpc" } +sp-ver = { path = "../substrate/primitives/ver" } +sp-blockchain = { path = "../substrate/primitives/blockchain" } +sp-application-crypto = { path = "../substrate/primitives/application-crypto" } +sp-runtime = { path = "../substrate/primitives/runtime" } +sp-debug-derive = { path = "../substrate/primitives/debug-derive" } +sp-staking = { path = "../substrate/primitives/staking" } +sp-weights = { path = "../substrate/primitives/weights" } +sp-arithmetic = { path = "../substrate/primitives/arithmetic" } +sp-npos-elections = { path = "../substrate/primitives/npos-elections" } +sp-authorship = { path = "../substrate/primitives/authorship" } +sp-storage = { path = "../substrate/primitives/storage" } +sp-inherents = { path = "../substrate/primitives/inherents" } +frame-system-benchmarking = { path = "../substrate/frame/system/benchmarking" } +sp-consensus-beefy = { path = "../substrate/primitives/consensus/beefy" } +sc-consensus-beefy = { path = "../substrate/client/consensus/beefy" } +sp-consensus-grandpa = { path = "../substrate/primitives/consensus/grandpa" } +sc-consensus-grandpa = { path = "../substrate/client/consensus/grandpa" } +pallet-root-testing = { path = "../substrate/frame/root-testing" } -# patch generated by ./scripts/dev-0.9.29_manifest.sh +# patch generated by ./scripts/dev_manifest.sh [patch."https://github.com/paritytech/substrate"] -sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } - sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } +sc-offchain = { path = "../substrate/client/offchain" } +sc-keystore = { path = "../substrate/client/keystore" } +mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } +mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } +sc-informant = { path = "../substrate/client/informant" } +sc-client-db = { path = "../substrate/client/db" } +sc-rpc-api = { path = "../substrate/client/rpc-api" } +sc-client-api = { path = "../substrate/client/api" } +sc-block-builder = { path = "../substrate/client/block-builder" } +sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } +sc-transaction-pool = { path = "../substrate/client/transaction-pool" } +sc-utils = { path = "../substrate/client/utils" } +sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } +sc-tracing = { path = "../substrate/client/tracing" } +sc-state-db = { path = "../substrate/client/state-db" } +sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } +sc-authority-discovery = { path = "../substrate/client/authority-discovery" } +sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } +sc-consensus-babe = { path = "../substrate/client/consensus/babe" } +sc-consensus-slots = { path = "../substrate/client/consensus/slots" } +sc-consensus = { path = "../substrate/client/consensus/common" } +sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } +sc-consensus-aura = { path = "../substrate/client/consensus/aura" } +sc-basic-authorship = { path = "../substrate/client/basic-authorship" } +sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } +sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } +sc-executor = { path = "../substrate/client/executor" } +sc-executor-common = { path = "../substrate/client/executor/common" } +sc-cli = { path = "../substrate/client/cli" } +sc-peerset = { path = "../substrate/client/peerset" } +sc-telemetry = { path = "../substrate/client/telemetry" } +sc-allocator = { path = "../substrate/client/allocator" } +sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } +sc-network-gossip = { path = "../substrate/client/network-gossip" } +sc-sysinfo = { path = "../substrate/client/sysinfo" } +sc-rpc-server = { path = "../substrate/client/rpc-servers" } +sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } +sc-rpc = { path = "../substrate/client/rpc" } +sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } +sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } +sc-chain-spec = { path = "../substrate/client/chain-spec" } +sc-network-sync = { path = "../substrate/client/network/sync" } +sc-network-bitswap = { path = "../substrate/client/network/bitswap" } +sc-network-light = { path = "../substrate/client/network/light" } +sc-network-transactions = { path = "../substrate/client/network/transactions" } +sc-network = { path = "../substrate/client/network" } +sc-network-common = { path = "../substrate/client/network/common" } +sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } +sc-service = { path = "../substrate/client/service" } +substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } +fork-tree = { path = "../substrate/utils/fork-tree" } +frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } +try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } +frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } +substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } +substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } +substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } +substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } +substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } +pallet-referenda = { path = "../substrate/frame/referenda" } +pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } +pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } +pallet-utility = { path = "../substrate/frame/utility" } +pallet-session = { path = "../substrate/frame/session" } +pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } +pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } +pallet-treasury = { path = "../substrate/frame/treasury" } +pallet-sudo = { path = "../substrate/frame/sudo" } +pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } +pallet-membership = { path = "../substrate/frame/membership" } +pallet-recovery = { path = "../substrate/frame/recovery" } +pallet-tips = { path = "../substrate/frame/tips" } +pallet-balances = { path = "../substrate/frame/balances" } +pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } +frame-executive = { path = "../substrate/frame/executive" } +pallet-timestamp = { path = "../substrate/frame/timestamp" } +pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } +pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } +pallet-preimage = { path = "../substrate/frame/preimage" } +frame-try-runtime = { path = "../substrate/frame/try-runtime" } +pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } +pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } +pallet-society = { path = "../substrate/frame/society" } +pallet-identity = { path = "../substrate/frame/identity" } +pallet-babe = { path = "../substrate/frame/babe" } +pallet-child-bounties = { path = "../substrate/frame/child-bounties" } +pallet-vesting = { path = "../substrate/frame/vesting" } +pallet-bounties = { path = "../substrate/frame/bounties" } +frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } +frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } +pallet-indices = { path = "../substrate/frame/indices" } +pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } +pallet-collective = { path = "../substrate/frame/collective" } +pallet-multisig = { path = "../substrate/frame/multisig" } +pallet-offences = { path = "../substrate/frame/offences" } +pallet-scheduler = { path = "../substrate/frame/scheduler" } +pallet-nis = { path = "../substrate/frame/nis" } +frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } +frame-system = { path = "../substrate/frame/system" } +frame-benchmarking = { path = "../substrate/frame/benchmarking" } +pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } +pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } +pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } +pallet-proxy = { path = "../substrate/frame/proxy" } +pallet-whitelist = { path = "../substrate/frame/whitelist" } +pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } +pallet-bags-list = { path = "../substrate/frame/bags-list" } +pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } +pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } +pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } +pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } +frame-support = { path = "../substrate/frame/support" } +frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } +frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } +frame-support-procedural = { path = "../substrate/frame/support/procedural" } +pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } +pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } +pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } +pallet-staking = { path = "../substrate/frame/staking" } +pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } +pallet-grandpa = { path = "../substrate/frame/grandpa" } +pallet-democracy = { path = "../substrate/frame/democracy" } +pallet-beefy = { path = "../substrate/frame/beefy" } +pallet-aura = { path = "../substrate/frame/aura" } +pallet-authorship = { path = "../substrate/frame/authorship" } +pallet-im-online = { path = "../substrate/frame/im-online" } +mangata-support = { path = "../substrate/frame/mangata-support" } +substrate-test-client = { path = "../substrate/test-utils/client" } +sp-offchain = { path = "../substrate/primitives/offchain" } +sp-keystore = { path = "../substrate/primitives/keystore" } +sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } +sp-keyring = { path = "../substrate/primitives/keyring" } +sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } +sp-state-machine = { path = "../substrate/primitives/state-machine" } +sp-session = { path = "../substrate/primitives/session" } +sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } +ver-api = { path = "../substrate/primitives/ver-api" } +sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } +sp-api = { path = "../substrate/primitives/api" } +sp-externalities = { path = "../substrate/primitives/externalities" } +sp-std = { path = "../substrate/primitives/std" } +sp-trie = { path = "../substrate/primitives/trie" } +sp-block-builder = { path = "../substrate/primitives/block-builder" } +sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } +sp-tracing = { path = "../substrate/primitives/tracing" } +sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } +sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } +sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } +sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } +sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } +sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } +sp-consensus = { path = "../substrate/primitives/consensus/common" } +sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } +sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } +sp-io = { path = "../substrate/primitives/io" } +sp-timestamp = { path = "../substrate/primitives/timestamp" } +sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } +sp-core-hashing = { path = "../substrate/primitives/core/hashing" } +sp-core = { path = "../substrate/primitives/core" } +sp-panic-handler = { path = "../substrate/primitives/panic-handler" } +sp-database = { path = "../substrate/primitives/database" } +sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } +sp-version = { path = "../substrate/primitives/version" } +extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } +mangata-types = { path = "../substrate/primitives/mangata-types" } +sp-rpc = { path = "../substrate/primitives/rpc" } +sp-ver = { path = "../substrate/primitives/ver" } +sp-blockchain = { path = "../substrate/primitives/blockchain" } +sp-application-crypto = { path = "../substrate/primitives/application-crypto" } +sp-runtime = { path = "../substrate/primitives/runtime" } +sp-debug-derive = { path = "../substrate/primitives/debug-derive" } +sp-staking = { path = "../substrate/primitives/staking" } +sp-weights = { path = "../substrate/primitives/weights" } +sp-arithmetic = { path = "../substrate/primitives/arithmetic" } +sp-npos-elections = { path = "../substrate/primitives/npos-elections" } +sp-authorship = { path = "../substrate/primitives/authorship" } +sp-storage = { path = "../substrate/primitives/storage" } +sp-inherents = { path = "../substrate/primitives/inherents" } +frame-system-benchmarking = { path = "../substrate/frame/system/benchmarking" } +sp-consensus-beefy = { path = "../substrate/primitives/consensus/beefy" } +sc-consensus-beefy = { path = "../substrate/client/consensus/beefy" } +sp-consensus-grandpa = { path = "../substrate/primitives/consensus/grandpa" } +sc-consensus-grandpa = { path = "../substrate/client/consensus/grandpa" } +pallet-root-testing = { path = "../substrate/frame/root-testing" } -# patch generated by ./scripts/dev-0.9.29_manifest.sh +# patch generated by ./scripts/dev_manifest.sh [patch."https://github.com/PureStake/substrate"] -sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } - - -# # patch generated by ./scripts/dev_manifest.sh -# [patch."https://github.com/mangata-finance/substrate"] -# sc-offchain = { path = "../substrate/client/offchain" } -# sc-keystore = { path = "../substrate/client/keystore" } -# mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } -# mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } -# sc-informant = { path = "../substrate/client/informant" } -# sc-client-db = { path = "../substrate/client/db" } -# sc-rpc-api = { path = "../substrate/client/rpc-api" } -# sc-client-api = { path = "../substrate/client/api" } -# sc-block-builder = { path = "../substrate/client/block-builder" } -# sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } -# sc-transaction-pool = { path = "../substrate/client/transaction-pool" } -# sc-utils = { path = "../substrate/client/utils" } -# sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } -# sc-tracing = { path = "../substrate/client/tracing" } -# sc-state-db = { path = "../substrate/client/state-db" } -# sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } -# sc-authority-discovery = { path = "../substrate/client/authority-discovery" } -# sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } -# sc-consensus-babe = { path = "../substrate/client/consensus/babe" } -# sc-consensus-slots = { path = "../substrate/client/consensus/slots" } -# sc-consensus = { path = "../substrate/client/consensus/common" } -# sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } -# sc-consensus-aura = { path = "../substrate/client/consensus/aura" } -# sc-basic-authorship = { path = "../substrate/client/basic-authorship" } -# sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } -# sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } -# sc-executor = { path = "../substrate/client/executor" } -# sc-executor-common = { path = "../substrate/client/executor/common" } -# sc-cli = { path = "../substrate/client/cli" } -# sc-peerset = { path = "../substrate/client/peerset" } -# sc-telemetry = { path = "../substrate/client/telemetry" } -# sc-allocator = { path = "../substrate/client/allocator" } -# sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } -# sc-network-gossip = { path = "../substrate/client/network-gossip" } -# sc-sysinfo = { path = "../substrate/client/sysinfo" } -# sc-rpc-server = { path = "../substrate/client/rpc-servers" } -# sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } -# sc-rpc = { path = "../substrate/client/rpc" } -# sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } -# sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } -# sc-chain-spec = { path = "../substrate/client/chain-spec" } -# sc-network-sync = { path = "../substrate/client/network/sync" } -# sc-network-bitswap = { path = "../substrate/client/network/bitswap" } -# sc-network-light = { path = "../substrate/client/network/light" } -# sc-network-transactions = { path = "../substrate/client/network/transactions" } -# sc-network = { path = "../substrate/client/network" } -# sc-network-common = { path = "../substrate/client/network/common" } -# sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } -# sc-service = { path = "../substrate/client/service" } -# substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } -# fork-tree = { path = "../substrate/utils/fork-tree" } -# frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } -# try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } -# frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } -# substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } -# substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } -# substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } -# substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } -# substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } -# pallet-referenda = { path = "../substrate/frame/referenda" } -# pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } -# pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } -# pallet-utility = { path = "../substrate/frame/utility" } -# pallet-session = { path = "../substrate/frame/session" } -# pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } -# pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } -# pallet-treasury = { path = "../substrate/frame/treasury" } -# pallet-sudo = { path = "../substrate/frame/sudo" } -# pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } -# pallet-membership = { path = "../substrate/frame/membership" } -# pallet-recovery = { path = "../substrate/frame/recovery" } -# pallet-tips = { path = "../substrate/frame/tips" } -# pallet-balances = { path = "../substrate/frame/balances" } -# pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } -# frame-executive = { path = "../substrate/frame/executive" } -# pallet-timestamp = { path = "../substrate/frame/timestamp" } -# pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } -# pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } -# pallet-preimage = { path = "../substrate/frame/preimage" } -# frame-try-runtime = { path = "../substrate/frame/try-runtime" } -# pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } -# pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } -# pallet-society = { path = "../substrate/frame/society" } -# pallet-identity = { path = "../substrate/frame/identity" } -# pallet-babe = { path = "../substrate/frame/babe" } -# pallet-child-bounties = { path = "../substrate/frame/child-bounties" } -# pallet-vesting = { path = "../substrate/frame/vesting" } -# pallet-bounties = { path = "../substrate/frame/bounties" } -# frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } -# frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } -# pallet-indices = { path = "../substrate/frame/indices" } -# pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } -# pallet-collective = { path = "../substrate/frame/collective" } -# pallet-multisig = { path = "../substrate/frame/multisig" } -# pallet-offences = { path = "../substrate/frame/offences" } -# pallet-scheduler = { path = "../substrate/frame/scheduler" } -# pallet-nis = { path = "../substrate/frame/nis" } -# frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } -# frame-system = { path = "../substrate/frame/system" } -# frame-benchmarking = { path = "../substrate/frame/benchmarking" } -# pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } -# pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } -# pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } -# pallet-proxy = { path = "../substrate/frame/proxy" } -# pallet-whitelist = { path = "../substrate/frame/whitelist" } -# pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } -# pallet-bags-list = { path = "../substrate/frame/bags-list" } -# pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } -# pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } -# pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } -# pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } -# frame-support = { path = "../substrate/frame/support" } -# frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } -# frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } -# frame-support-procedural = { path = "../substrate/frame/support/procedural" } -# pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } -# pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } -# pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } -# pallet-staking = { path = "../substrate/frame/staking" } -# pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } -# pallet-grandpa = { path = "../substrate/frame/grandpa" } -# pallet-democracy = { path = "../substrate/frame/democracy" } -# pallet-beefy = { path = "../substrate/frame/beefy" } -# pallet-aura = { path = "../substrate/frame/aura" } -# pallet-authorship = { path = "../substrate/frame/authorship" } -# pallet-im-online = { path = "../substrate/frame/im-online" } -# mangata-support = { path = "../substrate/frame/mangata-support" } -# substrate-test-client = { path = "../substrate/test-utils/client" } -# sp-offchain = { path = "../substrate/primitives/offchain" } -# sp-keystore = { path = "../substrate/primitives/keystore" } -# sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } -# sp-keyring = { path = "../substrate/primitives/keyring" } -# sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } -# sp-state-machine = { path = "../substrate/primitives/state-machine" } -# sp-session = { path = "../substrate/primitives/session" } -# sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } -# ver-api = { path = "../substrate/primitives/ver-api" } -# sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } -# sp-api = { path = "../substrate/primitives/api" } -# sp-externalities = { path = "../substrate/primitives/externalities" } -# sp-std = { path = "../substrate/primitives/std" } -# sp-trie = { path = "../substrate/primitives/trie" } -# sp-block-builder = { path = "../substrate/primitives/block-builder" } -# sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } -# sp-tracing = { path = "../substrate/primitives/tracing" } -# sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } -# sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } -# sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } -# sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } -# sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } -# sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } -# sp-consensus = { path = "../substrate/primitives/consensus/common" } -# sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } -# sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } -# sp-io = { path = "../substrate/primitives/io" } -# sp-timestamp = { path = "../substrate/primitives/timestamp" } -# sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } -# sp-core-hashing = { path = "../substrate/primitives/core/hashing" } -# sp-core = { path = "../substrate/primitives/core" } -# sp-panic-handler = { path = "../substrate/primitives/panic-handler" } -# sp-database = { path = "../substrate/primitives/database" } -# sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } -# sp-version = { path = "../substrate/primitives/version" } -# extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } -# mangata-types = { path = "../substrate/primitives/mangata-types" } -# sp-rpc = { path = "../substrate/primitives/rpc" } -# sp-ver = { path = "../substrate/primitives/ver" } -# sp-blockchain = { path = "../substrate/primitives/blockchain" } -# sp-application-crypto = { path = "../substrate/primitives/application-crypto" } -# sp-runtime = { path = "../substrate/primitives/runtime" } -# sp-debug-derive = { path = "../substrate/primitives/debug-derive" } -# sp-staking = { path = "../substrate/primitives/staking" } -# sp-weights = { path = "../substrate/primitives/weights" } -# sp-arithmetic = { path = "../substrate/primitives/arithmetic" } -# sp-npos-elections = { path = "../substrate/primitives/npos-elections" } -# sp-authorship = { path = "../substrate/primitives/authorship" } -# sp-storage = { path = "../substrate/primitives/storage" } -# sp-inherents = { path = "../substrate/primitives/inherents" } - -# # # patch generated by ./scripts/dev_manifest.sh -# # [patch."https://github.com/paritytech/substrate"] -# sc-offchain = { path = "../substrate/client/offchain" } -# sc-keystore = { path = "../substrate/client/keystore" } -# mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } -# mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } -# sc-informant = { path = "../substrate/client/informant" } -# sc-client-db = { path = "../substrate/client/db" } -# sc-rpc-api = { path = "../substrate/client/rpc-api" } -# sc-client-api = { path = "../substrate/client/api" } -# sc-block-builder = { path = "../substrate/client/block-builder" } -# sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } -# sc-transaction-pool = { path = "../substrate/client/transaction-pool" } -# sc-utils = { path = "../substrate/client/utils" } -# sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } -# sc-tracing = { path = "../substrate/client/tracing" } -# sc-state-db = { path = "../substrate/client/state-db" } -# sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } -# sc-authority-discovery = { path = "../substrate/client/authority-discovery" } -# sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } -# sc-consensus-babe = { path = "../substrate/client/consensus/babe" } -# sc-consensus-slots = { path = "../substrate/client/consensus/slots" } -# sc-consensus = { path = "../substrate/client/consensus/common" } -# sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } -# sc-consensus-aura = { path = "../substrate/client/consensus/aura" } -# sc-basic-authorship = { path = "../substrate/client/basic-authorship" } -# sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } -# sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } -# sc-executor = { path = "../substrate/client/executor" } -# sc-executor-common = { path = "../substrate/client/executor/common" } -# sc-cli = { path = "../substrate/client/cli" } -# sc-peerset = { path = "../substrate/client/peerset" } -# sc-telemetry = { path = "../substrate/client/telemetry" } -# sc-allocator = { path = "../substrate/client/allocator" } -# sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } -# sc-network-gossip = { path = "../substrate/client/network-gossip" } -# sc-sysinfo = { path = "../substrate/client/sysinfo" } -# sc-rpc-server = { path = "../substrate/client/rpc-servers" } -# sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } -# sc-rpc = { path = "../substrate/client/rpc" } -# sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } -# sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } -# sc-chain-spec = { path = "../substrate/client/chain-spec" } -# sc-network-sync = { path = "../substrate/client/network/sync" } -# sc-network-bitswap = { path = "../substrate/client/network/bitswap" } -# sc-network-light = { path = "../substrate/client/network/light" } -# sc-network-transactions = { path = "../substrate/client/network/transactions" } -# sc-network = { path = "../substrate/client/network" } -# sc-network-common = { path = "../substrate/client/network/common" } -# sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } -# sc-service = { path = "../substrate/client/service" } -# substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } -# fork-tree = { path = "../substrate/utils/fork-tree" } -# frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } -# try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } -# frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } -# substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } -# substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } -# substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } -# substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } -# substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } -# pallet-referenda = { path = "../substrate/frame/referenda" } -# pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } -# pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } -# pallet-utility = { path = "../substrate/frame/utility" } -# pallet-session = { path = "../substrate/frame/session" } -# pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } -# pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } -# pallet-treasury = { path = "../substrate/frame/treasury" } -# pallet-sudo = { path = "../substrate/frame/sudo" } -# pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } -# pallet-membership = { path = "../substrate/frame/membership" } -# pallet-recovery = { path = "../substrate/frame/recovery" } -# pallet-tips = { path = "../substrate/frame/tips" } -# pallet-balances = { path = "../substrate/frame/balances" } -# pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } -# frame-executive = { path = "../substrate/frame/executive" } -# pallet-timestamp = { path = "../substrate/frame/timestamp" } -# pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } -# pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } -# pallet-preimage = { path = "../substrate/frame/preimage" } -# frame-try-runtime = { path = "../substrate/frame/try-runtime" } -# pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } -# pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } -# pallet-society = { path = "../substrate/frame/society" } -# pallet-identity = { path = "../substrate/frame/identity" } -# pallet-babe = { path = "../substrate/frame/babe" } -# pallet-child-bounties = { path = "../substrate/frame/child-bounties" } -# pallet-vesting = { path = "../substrate/frame/vesting" } -# pallet-bounties = { path = "../substrate/frame/bounties" } -# frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } -# frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } -# pallet-indices = { path = "../substrate/frame/indices" } -# pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } -# pallet-collective = { path = "../substrate/frame/collective" } -# pallet-multisig = { path = "../substrate/frame/multisig" } -# pallet-offences = { path = "../substrate/frame/offences" } -# pallet-scheduler = { path = "../substrate/frame/scheduler" } -# pallet-nis = { path = "../substrate/frame/nis" } -# frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } -# frame-system = { path = "../substrate/frame/system" } -# frame-benchmarking = { path = "../substrate/frame/benchmarking" } -# pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } -# pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } -# pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } -# pallet-proxy = { path = "../substrate/frame/proxy" } -# pallet-whitelist = { path = "../substrate/frame/whitelist" } -# pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } -# pallet-bags-list = { path = "../substrate/frame/bags-list" } -# pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } -# pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } -# pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } -# pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } -# frame-support = { path = "../substrate/frame/support" } -# frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } -# frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } -# frame-support-procedural = { path = "../substrate/frame/support/procedural" } -# pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } -# pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } -# pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } -# pallet-staking = { path = "../substrate/frame/staking" } -# pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } -# pallet-grandpa = { path = "../substrate/frame/grandpa" } -# pallet-democracy = { path = "../substrate/frame/democracy" } -# pallet-beefy = { path = "../substrate/frame/beefy" } -# pallet-aura = { path = "../substrate/frame/aura" } -# pallet-authorship = { path = "../substrate/frame/authorship" } -# pallet-im-online = { path = "../substrate/frame/im-online" } -# mangata-support = { path = "../substrate/frame/mangata-support" } -# substrate-test-client = { path = "../substrate/test-utils/client" } -# sp-offchain = { path = "../substrate/primitives/offchain" } -# sp-keystore = { path = "../substrate/primitives/keystore" } -# sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } -# sp-keyring = { path = "../substrate/primitives/keyring" } -# sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } -# sp-state-machine = { path = "../substrate/primitives/state-machine" } -# sp-session = { path = "../substrate/primitives/session" } -# sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } -# ver-api = { path = "../substrate/primitives/ver-api" } -# sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } -# sp-api = { path = "../substrate/primitives/api" } -# sp-externalities = { path = "../substrate/primitives/externalities" } -# sp-std = { path = "../substrate/primitives/std" } -# sp-trie = { path = "../substrate/primitives/trie" } -# sp-block-builder = { path = "../substrate/primitives/block-builder" } -# sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } -# sp-tracing = { path = "../substrate/primitives/tracing" } -# sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } -# sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } -# sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } -# sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } -# sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } -# sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } -# sp-consensus = { path = "../substrate/primitives/consensus/common" } -# sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } -# sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } -# sp-io = { path = "../substrate/primitives/io" } -# sp-timestamp = { path = "../substrate/primitives/timestamp" } -# sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } -# sp-core-hashing = { path = "../substrate/primitives/core/hashing" } -# sp-core = { path = "../substrate/primitives/core" } -# sp-panic-handler = { path = "../substrate/primitives/panic-handler" } -# sp-database = { path = "../substrate/primitives/database" } -# sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } -# sp-version = { path = "../substrate/primitives/version" } -# extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } -# mangata-types = { path = "../substrate/primitives/mangata-types" } -# sp-rpc = { path = "../substrate/primitives/rpc" } -# sp-ver = { path = "../substrate/primitives/ver" } -# sp-blockchain = { path = "../substrate/primitives/blockchain" } -# sp-application-crypto = { path = "../substrate/primitives/application-crypto" } -# sp-runtime = { path = "../substrate/primitives/runtime" } -# sp-debug-derive = { path = "../substrate/primitives/debug-derive" } -# sp-staking = { path = "../substrate/primitives/staking" } -# sp-weights = { path = "../substrate/primitives/weights" } -# sp-arithmetic = { path = "../substrate/primitives/arithmetic" } -# sp-npos-elections = { path = "../substrate/primitives/npos-elections" } -# sp-authorship = { path = "../substrate/primitives/authorship" } -# sp-storage = { path = "../substrate/primitives/storage" } -# sp-inherents = { path = "../substrate/primitives/inherents" } - -# # patch generated by ./scripts/dev_manifest.sh -# [patch."https://github.com/PureStake/substrate"] -# sc-offchain = { path = "../substrate/client/offchain" } -# sc-keystore = { path = "../substrate/client/keystore" } -# mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } -# mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } -# sc-informant = { path = "../substrate/client/informant" } -# sc-client-db = { path = "../substrate/client/db" } -# sc-rpc-api = { path = "../substrate/client/rpc-api" } -# sc-client-api = { path = "../substrate/client/api" } -# sc-block-builder = { path = "../substrate/client/block-builder" } -# sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } -# sc-transaction-pool = { path = "../substrate/client/transaction-pool" } -# sc-utils = { path = "../substrate/client/utils" } -# sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } -# sc-tracing = { path = "../substrate/client/tracing" } -# sc-state-db = { path = "../substrate/client/state-db" } -# sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } -# sc-authority-discovery = { path = "../substrate/client/authority-discovery" } -# sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } -# sc-consensus-babe = { path = "../substrate/client/consensus/babe" } -# sc-consensus-slots = { path = "../substrate/client/consensus/slots" } -# sc-consensus = { path = "../substrate/client/consensus/common" } -# sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } -# sc-consensus-aura = { path = "../substrate/client/consensus/aura" } -# sc-basic-authorship = { path = "../substrate/client/basic-authorship" } -# sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } -# sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } -# sc-executor = { path = "../substrate/client/executor" } -# sc-executor-common = { path = "../substrate/client/executor/common" } -# sc-cli = { path = "../substrate/client/cli" } -# sc-peerset = { path = "../substrate/client/peerset" } -# sc-telemetry = { path = "../substrate/client/telemetry" } -# sc-allocator = { path = "../substrate/client/allocator" } -# sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } -# sc-network-gossip = { path = "../substrate/client/network-gossip" } -# sc-sysinfo = { path = "../substrate/client/sysinfo" } -# sc-rpc-server = { path = "../substrate/client/rpc-servers" } -# sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } -# sc-rpc = { path = "../substrate/client/rpc" } -# sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } -# sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } -# sc-chain-spec = { path = "../substrate/client/chain-spec" } -# sc-network-sync = { path = "../substrate/client/network/sync" } -# sc-network-bitswap = { path = "../substrate/client/network/bitswap" } -# sc-network-light = { path = "../substrate/client/network/light" } -# sc-network-transactions = { path = "../substrate/client/network/transactions" } -# sc-network = { path = "../substrate/client/network" } -# sc-network-common = { path = "../substrate/client/network/common" } -# sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } -# sc-service = { path = "../substrate/client/service" } -# substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } -# fork-tree = { path = "../substrate/utils/fork-tree" } -# frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } -# try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } -# frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } -# substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } -# substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } -# substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } -# substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } -# substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } -# pallet-referenda = { path = "../substrate/frame/referenda" } -# pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } -# pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } -# pallet-utility = { path = "../substrate/frame/utility" } -# pallet-session = { path = "../substrate/frame/session" } -# pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } -# pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } -# pallet-treasury = { path = "../substrate/frame/treasury" } -# pallet-sudo = { path = "../substrate/frame/sudo" } -# pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } -# pallet-membership = { path = "../substrate/frame/membership" } -# pallet-recovery = { path = "../substrate/frame/recovery" } -# pallet-tips = { path = "../substrate/frame/tips" } -# pallet-balances = { path = "../substrate/frame/balances" } -# pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } -# frame-executive = { path = "../substrate/frame/executive" } -# pallet-timestamp = { path = "../substrate/frame/timestamp" } -# pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } -# pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } -# pallet-preimage = { path = "../substrate/frame/preimage" } -# frame-try-runtime = { path = "../substrate/frame/try-runtime" } -# pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } -# pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } -# pallet-society = { path = "../substrate/frame/society" } -# pallet-identity = { path = "../substrate/frame/identity" } -# pallet-babe = { path = "../substrate/frame/babe" } -# pallet-child-bounties = { path = "../substrate/frame/child-bounties" } -# pallet-vesting = { path = "../substrate/frame/vesting" } -# pallet-bounties = { path = "../substrate/frame/bounties" } -# frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } -# frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } -# pallet-indices = { path = "../substrate/frame/indices" } -# pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } -# pallet-collective = { path = "../substrate/frame/collective" } -# pallet-multisig = { path = "../substrate/frame/multisig" } -# pallet-offences = { path = "../substrate/frame/offences" } -# pallet-scheduler = { path = "../substrate/frame/scheduler" } -# pallet-nis = { path = "../substrate/frame/nis" } -# frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } -# frame-system = { path = "../substrate/frame/system" } -# frame-benchmarking = { path = "../substrate/frame/benchmarking" } -# pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } -# pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } -# pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } -# pallet-proxy = { path = "../substrate/frame/proxy" } -# pallet-whitelist = { path = "../substrate/frame/whitelist" } -# pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } -# pallet-bags-list = { path = "../substrate/frame/bags-list" } -# pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } -# pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } -# pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } -# pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } -# frame-support = { path = "../substrate/frame/support" } -# frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } -# frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } -# frame-support-procedural = { path = "../substrate/frame/support/procedural" } -# pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } -# pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } -# pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } -# pallet-staking = { path = "../substrate/frame/staking" } -# pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } -# pallet-grandpa = { path = "../substrate/frame/grandpa" } -# pallet-democracy = { path = "../substrate/frame/democracy" } -# pallet-beefy = { path = "../substrate/frame/beefy" } -# pallet-aura = { path = "../substrate/frame/aura" } -# pallet-authorship = { path = "../substrate/frame/authorship" } -# pallet-im-online = { path = "../substrate/frame/im-online" } -# mangata-support = { path = "../substrate/frame/mangata-support" } -# substrate-test-client = { path = "../substrate/test-utils/client" } -# sp-offchain = { path = "../substrate/primitives/offchain" } -# sp-keystore = { path = "../substrate/primitives/keystore" } -# sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } -# sp-keyring = { path = "../substrate/primitives/keyring" } -# sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } -# sp-state-machine = { path = "../substrate/primitives/state-machine" } -# sp-session = { path = "../substrate/primitives/session" } -# sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } -# ver-api = { path = "../substrate/primitives/ver-api" } -# sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } -# sp-api = { path = "../substrate/primitives/api" } -# sp-externalities = { path = "../substrate/primitives/externalities" } -# sp-std = { path = "../substrate/primitives/std" } -# sp-trie = { path = "../substrate/primitives/trie" } -# sp-block-builder = { path = "../substrate/primitives/block-builder" } -# sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } -# sp-tracing = { path = "../substrate/primitives/tracing" } -# sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } -# sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } -# sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } -# sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } -# sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } -# sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } -# sp-consensus = { path = "../substrate/primitives/consensus/common" } -# sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } -# sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } -# sp-io = { path = "../substrate/primitives/io" } -# sp-timestamp = { path = "../substrate/primitives/timestamp" } -# sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } -# sp-core-hashing = { path = "../substrate/primitives/core/hashing" } -# sp-core = { path = "../substrate/primitives/core" } -# sp-panic-handler = { path = "../substrate/primitives/panic-handler" } -# sp-database = { path = "../substrate/primitives/database" } -# sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } -# sp-version = { path = "../substrate/primitives/version" } -# extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } -# mangata-types = { path = "../substrate/primitives/mangata-types" } -# sp-rpc = { path = "../substrate/primitives/rpc" } -# sp-ver = { path = "../substrate/primitives/ver" } -# sp-blockchain = { path = "../substrate/primitives/blockchain" } -# sp-application-crypto = { path = "../substrate/primitives/application-crypto" } -# sp-runtime = { path = "../substrate/primitives/runtime" } -# sp-debug-derive = { path = "../substrate/primitives/debug-derive" } -# sp-staking = { path = "../substrate/primitives/staking" } -# sp-weights = { path = "../substrate/primitives/weights" } -# sp-arithmetic = { path = "../substrate/primitives/arithmetic" } -# sp-npos-elections = { path = "../substrate/primitives/npos-elections" } -# sp-authorship = { path = "../substrate/primitives/authorship" } -# sp-storage = { path = "../substrate/primitives/storage" } -# sp-inherents = { path = "../substrate/primitives/inherents" } +sc-offchain = { path = "../substrate/client/offchain" } +sc-keystore = { path = "../substrate/client/keystore" } +mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } +mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } +sc-informant = { path = "../substrate/client/informant" } +sc-client-db = { path = "../substrate/client/db" } +sc-rpc-api = { path = "../substrate/client/rpc-api" } +sc-client-api = { path = "../substrate/client/api" } +sc-block-builder = { path = "../substrate/client/block-builder" } +sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } +sc-transaction-pool = { path = "../substrate/client/transaction-pool" } +sc-utils = { path = "../substrate/client/utils" } +sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } +sc-tracing = { path = "../substrate/client/tracing" } +sc-state-db = { path = "../substrate/client/state-db" } +sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } +sc-authority-discovery = { path = "../substrate/client/authority-discovery" } +sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } +sc-consensus-babe = { path = "../substrate/client/consensus/babe" } +sc-consensus-slots = { path = "../substrate/client/consensus/slots" } +sc-consensus = { path = "../substrate/client/consensus/common" } +sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } +sc-consensus-aura = { path = "../substrate/client/consensus/aura" } +sc-basic-authorship = { path = "../substrate/client/basic-authorship" } +sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } +sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } +sc-executor = { path = "../substrate/client/executor" } +sc-executor-common = { path = "../substrate/client/executor/common" } +sc-cli = { path = "../substrate/client/cli" } +sc-peerset = { path = "../substrate/client/peerset" } +sc-telemetry = { path = "../substrate/client/telemetry" } +sc-allocator = { path = "../substrate/client/allocator" } +sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } +sc-network-gossip = { path = "../substrate/client/network-gossip" } +sc-sysinfo = { path = "../substrate/client/sysinfo" } +sc-rpc-server = { path = "../substrate/client/rpc-servers" } +sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } +sc-rpc = { path = "../substrate/client/rpc" } +sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } +sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } +sc-chain-spec = { path = "../substrate/client/chain-spec" } +sc-network-sync = { path = "../substrate/client/network/sync" } +sc-network-bitswap = { path = "../substrate/client/network/bitswap" } +sc-network-light = { path = "../substrate/client/network/light" } +sc-network-transactions = { path = "../substrate/client/network/transactions" } +sc-network = { path = "../substrate/client/network" } +sc-network-common = { path = "../substrate/client/network/common" } +sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } +sc-service = { path = "../substrate/client/service" } +substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } +fork-tree = { path = "../substrate/utils/fork-tree" } +frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } +try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } +frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } +substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } +substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } +substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } +substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } +substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } +pallet-referenda = { path = "../substrate/frame/referenda" } +pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } +pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } +pallet-utility = { path = "../substrate/frame/utility" } +pallet-session = { path = "../substrate/frame/session" } +pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } +pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } +pallet-treasury = { path = "../substrate/frame/treasury" } +pallet-sudo = { path = "../substrate/frame/sudo" } +pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } +pallet-membership = { path = "../substrate/frame/membership" } +pallet-recovery = { path = "../substrate/frame/recovery" } +pallet-tips = { path = "../substrate/frame/tips" } +pallet-balances = { path = "../substrate/frame/balances" } +pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } +frame-executive = { path = "../substrate/frame/executive" } +pallet-timestamp = { path = "../substrate/frame/timestamp" } +pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } +pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } +pallet-preimage = { path = "../substrate/frame/preimage" } +frame-try-runtime = { path = "../substrate/frame/try-runtime" } +pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } +pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } +pallet-society = { path = "../substrate/frame/society" } +pallet-identity = { path = "../substrate/frame/identity" } +pallet-babe = { path = "../substrate/frame/babe" } +pallet-child-bounties = { path = "../substrate/frame/child-bounties" } +pallet-vesting = { path = "../substrate/frame/vesting" } +pallet-bounties = { path = "../substrate/frame/bounties" } +frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } +frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } +pallet-indices = { path = "../substrate/frame/indices" } +pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } +pallet-collective = { path = "../substrate/frame/collective" } +pallet-multisig = { path = "../substrate/frame/multisig" } +pallet-offences = { path = "../substrate/frame/offences" } +pallet-scheduler = { path = "../substrate/frame/scheduler" } +pallet-nis = { path = "../substrate/frame/nis" } +frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } +frame-system = { path = "../substrate/frame/system" } +frame-benchmarking = { path = "../substrate/frame/benchmarking" } +pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } +pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } +pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } +pallet-proxy = { path = "../substrate/frame/proxy" } +pallet-whitelist = { path = "../substrate/frame/whitelist" } +pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } +pallet-bags-list = { path = "../substrate/frame/bags-list" } +pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } +pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } +pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } +pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } +frame-support = { path = "../substrate/frame/support" } +frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } +frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } +frame-support-procedural = { path = "../substrate/frame/support/procedural" } +pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } +pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } +pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } +pallet-staking = { path = "../substrate/frame/staking" } +pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } +pallet-grandpa = { path = "../substrate/frame/grandpa" } +pallet-democracy = { path = "../substrate/frame/democracy" } +pallet-beefy = { path = "../substrate/frame/beefy" } +pallet-aura = { path = "../substrate/frame/aura" } +pallet-authorship = { path = "../substrate/frame/authorship" } +pallet-im-online = { path = "../substrate/frame/im-online" } +mangata-support = { path = "../substrate/frame/mangata-support" } +substrate-test-client = { path = "../substrate/test-utils/client" } +sp-offchain = { path = "../substrate/primitives/offchain" } +sp-keystore = { path = "../substrate/primitives/keystore" } +sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } +sp-keyring = { path = "../substrate/primitives/keyring" } +sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } +sp-state-machine = { path = "../substrate/primitives/state-machine" } +sp-session = { path = "../substrate/primitives/session" } +sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } +ver-api = { path = "../substrate/primitives/ver-api" } +sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } +sp-api = { path = "../substrate/primitives/api" } +sp-externalities = { path = "../substrate/primitives/externalities" } +sp-std = { path = "../substrate/primitives/std" } +sp-trie = { path = "../substrate/primitives/trie" } +sp-block-builder = { path = "../substrate/primitives/block-builder" } +sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } +sp-tracing = { path = "../substrate/primitives/tracing" } +sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } +sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } +sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } +sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } +sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } +sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } +sp-consensus = { path = "../substrate/primitives/consensus/common" } +sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } +sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } +sp-io = { path = "../substrate/primitives/io" } +sp-timestamp = { path = "../substrate/primitives/timestamp" } +sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } +sp-core-hashing = { path = "../substrate/primitives/core/hashing" } +sp-core = { path = "../substrate/primitives/core" } +sp-panic-handler = { path = "../substrate/primitives/panic-handler" } +sp-database = { path = "../substrate/primitives/database" } +sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } +sp-version = { path = "../substrate/primitives/version" } +extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } +mangata-types = { path = "../substrate/primitives/mangata-types" } +sp-rpc = { path = "../substrate/primitives/rpc" } +sp-ver = { path = "../substrate/primitives/ver" } +sp-blockchain = { path = "../substrate/primitives/blockchain" } +sp-application-crypto = { path = "../substrate/primitives/application-crypto" } +sp-runtime = { path = "../substrate/primitives/runtime" } +sp-debug-derive = { path = "../substrate/primitives/debug-derive" } +sp-staking = { path = "../substrate/primitives/staking" } +sp-weights = { path = "../substrate/primitives/weights" } +sp-arithmetic = { path = "../substrate/primitives/arithmetic" } +sp-npos-elections = { path = "../substrate/primitives/npos-elections" } +sp-authorship = { path = "../substrate/primitives/authorship" } +sp-storage = { path = "../substrate/primitives/storage" } +sp-inherents = { path = "../substrate/primitives/inherents" } +frame-system-benchmarking = { path = "../substrate/frame/system/benchmarking" } +sc-consensus-beefy = { path = "../substrate/client/consensus/beefy" } +sp-consensus-beefy = { path = "../substrate/primitives/consensus/beefy" } +sp-consensus-grandpa = { path = "../substrate/primitives/consensus/grandpa" } +sc-consensus-grandpa = { path = "../substrate/client/consensus/grandpa" } +pallet-root-testing = { path = "../substrate/frame/root-testing" } # # patch generated by ./scripts/dev_manifest.sh # [patch."https://github.com/mangata-finance/cumulus"] diff --git a/devops/parachain-launch/config.yml b/devops/parachain-launch/config.yml index 5f733fcd56..388bee31c5 100644 --- a/devops/parachain-launch/config.yml +++ b/devops/parachain-launch/config.yml @@ -17,7 +17,7 @@ relaychain: - name: bob parachains: -- image: mangatasolutions/mangata-node:develop +- image: mangatasolutions/mangata-node:dev chain: base: rococo-local collators: diff --git a/pallets/proof-of-stake/Cargo.toml b/pallets/proof-of-stake/Cargo.toml index c222722179..c6aedfa0ad 100644 --- a/pallets/proof-of-stake/Cargo.toml +++ b/pallets/proof-of-stake/Cargo.toml @@ -62,7 +62,10 @@ std = [ "scale-info/std", ] -runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"] +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "mangata-support/runtime-benchmarks", +] try-runtime = [ "frame-support/try-runtime", diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index aeae157e53..68e43e3a7e 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -93,9 +93,19 @@ use frame_support::pallet_prelude::*; +pub type ScheduleId = u64; + +#[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +pub struct Schedule{ + last_session: u64, + liq_token: TokenId, + reward_token: TokenId, + amount_per_session: Balance, +} + use frame_benchmarking::Zero; use frame_support::{ - dispatch::{DispatchError, DispatchResult}, + dispatch::{DispatchError, DispatchErrorWithPostInfo, PostDispatchInfo, DispatchResult}, ensure, storage::bounded_btree_map::BoundedBTreeMap, traits::Nothing, @@ -176,7 +186,107 @@ pub mod pallet { pub struct Pallet(PhantomData); #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks for Pallet { + fn on_initialize(n: T::BlockNumber) -> Weight { + const AMOUNT_PER_BLOCK: u64 = 5; + + // NOTE: 3R + let mut prev = None; + let mut pos = match ( + ScheduleListPos::::get(), + ScheduleListHead::::get(), + ScheduleListTail::::get(), + ){ + (None, None, None) => { + None + }, + (Some(pos), Some(head), Some(tail)) if pos == tail => { + None + }, + (None, Some(head), Some(_tail)) => { + Some(head) + }, + (Some(pos), Some(_head), Some(_tail)) => { + Some(pos + 1) + }, + }; + + // 1R 1W 15RW + + //NOTE: 5 transfers => 15R 15W + + // TODO: make configurable + // NOTE: 3R + 1R + let session_id = frame_system::Pallet::::block_number().saturated_into::() / 5u64; + + for _ in 0..AMOUNT_PER_BLOCK { + match (prev.as_mut(),pos.as_mut()) { + (Some(prev_val), Some(pos_val)) => { + if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ + + ScheduleRewardsTotal::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ + if schedule.last_session < session_id{ + *val += schedule.amount_per_session; + *pos = Some(next); + *prev = Some(pos_val); + }else{ + // NOTE: consider removing elements from list + RewardsSchedulesList::::mutate(prev_val, |data|{ + if let Some((schedule, prev_next)) = data{ + *prev_next = next; + } + }); + ScheduleListTail::::put(prev_val); + } + }); + + }else{ + break; + } + }, + (None, Some(pos_val)) => { + if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ + ScheduleRewardsTotal::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ + if schedule.last_session < session_id{ + *val += schedule.amount_per_session; + *pos = Some(next); + *prev = Some(pos_val); + }else{ + // NOTE: consider removing elements from list + ScheduleListHead::::kill(); + ScheduleListTail::::kill(); + } + }); + }else{ + break; + } + }, + (Some(pos), None) => { + break; + }, + (None, None) => { + break; + } + + } + } + Default::default() + // if let Some((schedule, next)) = RewardsSchedulesList::::get(pos){ + // ScheduleRewardsTotal::mutate_exists((schedule.liq_token, schedudle.reward_token, session_id), |val|{ + // if schedudle.last_session <= session_id{ + // *val += schedule.amount_per_session; + // pos = next; + // }else{ + // None + // } + // }) + // }else{ + // break; + // + // } + // + } + } #[cfg(feature = "runtime-benchmarks")] pub trait PoSBenchmarkingConfig: pallet_issuance::Config {} @@ -267,8 +377,8 @@ pub mod pallet { TooManySchedules, /// Too little rewards per session TooLittleRewards, - /// Reward token not paired with native token - RewardTokenNotPairdWithNativeToken, + // Liquidity is reused for 3rdparty rewards + LiquidityLockedIn3rdpartyRewards, } #[pallet::event] @@ -336,7 +446,12 @@ pub mod pallet { /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic #[pallet::storage] pub type ScheduleRewardsPerSingleLiquidity = - StorageValue<_, BTreeMap<(TokenId, TokenId), U256>, ValueQuery>; + StorageValue<_, BTreeMap<(TokenId, TokenId), u128>, ValueQuery>; + + /// How much scheduled rewards per single liquidty_token should be distribute_rewards + /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic + #[pallet::storage] + pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat ,(TokenId, TokenId, u64), u128, ValueQuery>; /// List of activated schedules sorted by expiry date #[pallet::storage] @@ -351,9 +466,17 @@ pub mod pallet { ValueQuery, >; - /// Unique id of the schedule #[pallet::storage] - pub type ScheduleId = StorageValue<_, u64, ValueQuery>; + pub type ScheduleListPos = StorageValue<_, ScheduleId, OptionQuery>; + + #[pallet::storage] + pub type ScheduleListHead = StorageValue<_, ScheduleId, OptionQuery>; + + #[pallet::storage] + pub type ScheduleListTail = StorageValue<_, ScheduleId, OptionQuery>; + + #[pallet::storage] + pub type RewardsSchedulesList = StorageMap<_, Twox64Concat, ScheduleId, (Schedule, Option), OptionQuery>; /// Maps liquidity token to list of tokens that it ever was rewarded with #[pallet::storage] @@ -363,7 +486,11 @@ pub mod pallet { /// Total amount of activated liquidity for each schedule #[pallet::storage] pub type TotalActivatedLiquidityForSchedules = - StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, u128, ValueQuery>; + StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (u64, u128), ValueQuery>; + + #[pallet::storage] + pub type PrevTotalActivatedLiquidityForSchedules = + StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (u64, u128), ValueQuery>; /// Tracks how much liquidity user activated for particular (liq token, reward token) pair /// StorageNMap was used because it only require single read to know if user deactivated all @@ -388,6 +515,13 @@ pub mod pallet { pub type ActivatedLockedLiquidityForSchedules = StorageDoubleMap<_, Twox64Concat, AccountIdOf, Twox64Concat, TokenId, u128, ValueQuery>; + /// Tracks how much of the liquidity was activated for schedule rewards and not yet + /// liquidity mining rewards. That information is essential to properly handle token unlcocks + /// when liquidity is deactivated. + #[pallet::storage] + pub type ActivatedNativeRewardsLiq = + StorageDoubleMap<_, Twox64Concat, AccountIdOf, Twox64Concat, TokenId, u128, ValueQuery>; + #[pallet::call] impl Pallet { /// Claims liquidity mining rewards @@ -476,6 +610,7 @@ pub mod pallet { /// - amount - amount of the token /// - schedule_end - id of the last rewarded seession. Rewards will be distributedd equally between sessions in range (now .. /// schedule_end). Distribution starts from the *next* session till `schedule_end`. + // TODO: delays schedule by 1 session #[transactional] #[pallet::call_index(4)] #[pallet::weight(<::WeightInfo>::reward_pool())] @@ -487,71 +622,7 @@ pub mod pallet { schedule_end: T::BlockNumber, ) -> DispatchResult { let sender = ensure_signed(origin)?; - - let liquidity_token_id = - ::ValuationApi::get_liquidity_asset(pool.0, pool.1) - .map_err(|_| Error::::PoolDoesNotExist)?; - - let current_session = Self::session_index(); - ensure!( - schedule_end.saturated_into::() > current_session, - Error::::CannotScheduleRewardsInPast - ); - - let amount_per_session = schedule_end - .saturated_into::() - .checked_sub(current_session) - .and_then(|v| amount.checked_div(v.into())) - .ok_or(Error::::MathOverflow)?; - - ensure!( - pool.0 == Self::native_token_id() || pool.1 == Self::native_token_id(), - Error::::RewardTokenNotPairdWithNativeToken - ); - - let valutation = - ::ValuationApi::valuate_liquidity_token(liquidity_token_id, amount); - - ensure!( - ::ValuationApi::valuate_liquidity_token(liquidity_token_id, amount) >= - T::Min3rdPartyRewards::get() || - ((token_id == Into::::into(Self::native_token_id())) && - amount_per_session >= T::Min3rdPartyRewards::get()), - Error::::TooLittleRewards - ); - - RewardTokensPerPool::::insert(liquidity_token_id, token_id, ()); - - T::Currency::transfer( - token_id.into(), - &sender, - &Self::pallet_account(), - amount.into(), - ExistenceRequirement::KeepAlive, - )?; - - let current_session = Self::session_index(); - let schedule_id = ScheduleId::::get(); - - RewardsSchedules::::try_mutate(|map| { - let key: Option<(_, _, _, _, _)> = map.first_key_value().map(|(x, y)| x.clone()); - - if let Some(val) = key { - if current_session > val.0.saturated_into::() { - map.remove_entry(&val); - } - } - - map.try_insert( - (schedule_end, liquidity_token_id, token_id, amount_per_session, schedule_id), - (), - ) - }) - .or(Err(Error::::TooManySchedules))?; - - ScheduleId::::mutate(|v| *v += 1); - - Ok(()) + Self::reward_pool_impl(sender, pool, token_id, amount, schedule_end) } /// Increases number of tokens used for liquidity mining purposes. @@ -570,7 +641,7 @@ pub mod pallet { amount: Balance, reward_token: TokenId, use_balance_from: Option, - ) -> DispatchResult { + ) -> DispatchResultWithPostInfo { let sender = ensure_signed(origin)?; Self::activate_liquidity_for_3rdparty_rewards_impl( @@ -580,6 +651,14 @@ pub mod pallet { use_balance_from.unwrap_or(ThirdPartyActivationKind::ActivateKind(None)), reward_token, ) + .map_err(|err| DispatchErrorWithPostInfo { + post_info: PostDispatchInfo { + actual_weight: Some(<::WeightInfo>::activate_liquidity_for_3rdparty_rewards()), + pays_fee: Pays::Yes, + }, + error: err, + })?; + Ok(Pays::No.into()) } /// Decreases number of tokens used for liquidity mining purposes. @@ -596,7 +675,7 @@ pub mod pallet { liquidity_token_id: TokenId, amount: Balance, reward_token: TokenId, - ) -> DispatchResult { + ) -> DispatchResultWithPostInfo { let sender = ensure_signed(origin)?; Self::deactivate_liquidity_for_3rdparty_rewards_impl( @@ -605,6 +684,14 @@ pub mod pallet { amount, reward_token, ) + .map_err(|err| DispatchErrorWithPostInfo { + post_info: PostDispatchInfo { + actual_weight: Some(<::WeightInfo>::activate_liquidity_for_3rdparty_rewards()), + pays_fee: Pays::Yes, + }, + error: err, + })?; + Ok(Pays::No.into()) } /// Claims liquidity mining rewards @@ -685,6 +772,33 @@ pub mod pallet { } impl Pallet { + + fn total_activated_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ + let (idx, amount) = TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward); + if idx == (frame_system::Pallet::::block_number().saturated_into::() / 5){ + amount + }else{ + PrevTotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward).1 + } + } + + fn update_total_activated_liqudity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, diff: Balance, change: bool) { + // TODO: make configurable + let session_id = frame_system::Pallet::::block_number().saturated_into::() / 5; + if let Ok((idx, amount)) = TotalActivatedLiquidityForSchedules::::try_get(liquidity_asset_id, liquidity_assets_reward){ + let new_amount = if change{ + amount + diff + }else{ + amount - diff + }; + + if session_id > idx { + PrevTotalActivatedLiquidityForSchedules::::insert(liquidity_asset_id, liquidity_assets_reward, (idx, amount)); + } + TotalActivatedLiquidityForSchedules::::insert(liquidity_asset_id, liquidity_assets_reward, (session_id, new_amount)); + } + } + fn activate_liquidity_for_native_rewards_impl( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -744,6 +858,12 @@ impl Pallet { liquidity_asset_id: TokenId, amount: Balance, ) -> DispatchResult { + + ensure!( + ActivatedNativeRewardsLiq::::get(user.clone(), liquidity_asset_id) == 0, + Error::::LiquidityLockedIn3rdpartyRewards + ); + if amount > 0 { Self::set_liquidity_burning_checkpoint(user.clone(), liquidity_asset_id, amount)?; Pallet::::deposit_event(Event::LiquidityDeactivated( @@ -811,6 +931,11 @@ impl Pallet { already_activated_amount + amount <= available_amount, Error::::NotEnoughAssets ); + ActivatedNativeRewardsLiq::::mutate( + user.clone(), + liquidity_asset_id, + |val| *val += amount, + ); }, } @@ -1020,15 +1145,17 @@ impl Pallet { }, )?; - TotalActivatedLiquidityForSchedules::::mutate( - liquidity_asset_id, - liquidity_assets_reward, - |amount| -> DispatchResult { - *amount = - amount.checked_add(liquidity_assets_added).ok_or(Error::::MathOverflow)?; - Ok(()) - }, - )?; + Self::update_total_activated_liqudity(liquidity_asset_id, liquidity_assets_reward, liquidity_assets_added, true); + + // TotalActivatedLiquidityForSchedules::::mutate( + // liquidity_asset_id, + // liquidity_assets_reward, + // |amount| -> DispatchResult { + // *amount = + // amount.checked_add(liquidity_assets_added).ok_or(Error::::MathOverflow)?; + // Ok(()) + // }, + // )?; Ok(()) } @@ -1099,15 +1226,17 @@ impl Pallet { rewards_info, ); - TotalActivatedLiquidityForSchedules::::try_mutate( - liquidity_asset_id, - reward_token, - |amount| -> DispatchResult { - *amount = - amount.checked_sub(liquidity_assets_burned).ok_or(Error::::MathOverflow)?; - Ok(()) - }, - )?; + + Self::update_total_activated_liqudity(liquidity_asset_id, reward_token, liquidity_assets_burned, false); + // TotalActivatedLiquidityForSchedules::::try_mutate( + // liquidity_asset_id, + // reward_token, + // |amount| -> DispatchResult { + // *amount = + // amount.checked_sub(liquidity_assets_burned).ok_or(Error::::MathOverflow)?; + // Ok(()) + // }, + // )?; ActivatedLiquidityForSchedules::::try_mutate_exists( (user.clone(), liquidity_asset_id, reward_token), @@ -1147,6 +1276,17 @@ impl Pallet { &user, amount, ); + + let amount = ActivatedNativeRewardsLiq::::mutate( + user.clone(), + liquidity_asset_id, + |val| { + let prev = *val; + *val = 0; + prev + }, + ); + } Ok(()) @@ -1189,6 +1329,80 @@ impl Pallet { Ok(total_available_rewards) } + + pub (crate) fn reward_pool_impl( + sender: T::AccountId, + pool: (TokenId, TokenId), + token_id: TokenId, + amount: Balance, + schedule_end: T::BlockNumber, + ) -> DispatchResult { + + let liquidity_token_id = + ::ValuationApi::get_liquidity_asset(pool.0, pool.1) + .map_err(|_| Error::::PoolDoesNotExist)?; + + let current_session = Self::session_index(); + ensure!( + schedule_end.saturated_into::() > current_session, + Error::::CannotScheduleRewardsInPast + ); + + let amount_per_session = schedule_end + .saturated_into::() + .checked_sub(current_session) + .and_then(|v| amount.checked_div(v.into())) + .ok_or(Error::::MathOverflow)?; + + ensure!( + ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= T::Min3rdPartyRewards::get() || + ((token_id == Into::::into(Self::native_token_id())) && amount_per_session >= T::Min3rdPartyRewards::get()) || + ::ValuationApi::valuate_non_liquidity_token(token_id, amount_per_session) >= T::Min3rdPartyRewards::get() + , + Error::::TooLittleRewards + ); + + RewardTokensPerPool::::insert(liquidity_token_id, token_id, ()); + + T::Currency::transfer( + token_id.into(), + &sender, + &Self::pallet_account(), + amount.into(), + ExistenceRequirement::KeepAlive, + )?; + + let current_session = Self::session_index(); + + let head = ScheduleListHead::::get(); + let tail = ScheduleListTail::::get(); + let schedule = Schedule{ + last_session: schedule_end.saturated_into::(), + liq_token: liquidity_token_id, + reward_token: token_id, + amount_per_session: amount_per_session + }; + + match (head, tail){ + (None, None) => { // first schedule + RewardsSchedulesList::::insert(0, (schedule, None::)); + ScheduleListHead::::put(0); + ScheduleListTail::::put(0); + }, + (Some(_head), Some(tail)) => { + RewardsSchedulesList::::mutate(tail, |info| { + if let Some((_schedule, next)) = info.as_mut(){ + *next = Some(tail + 1u64) + } + }); + RewardsSchedulesList::::insert(tail + 1, (schedule, None::)); + ScheduleListHead::::put(tail + 1); + }, + _ => {} // invariant assures this will never happen + } + + Ok(()) + } } impl ProofOfStakeRewardsApi for Pallet { @@ -1196,6 +1410,18 @@ impl ProofOfStakeRewardsApi for Pallet { type CurrencyId = TokenId; + #[cfg(feature = "runtime-benchmarks")] + fn enable_3rdparty_rewards(account: T::AccountId, pool: (Self::CurrencyId,Self::CurrencyId), reward_token_id: Self::CurrencyId, last_session: u32, amount: Self::Balance){ + let liquidity_token_id = ::ValuationApi::get_liquidity_asset(pool.0, pool.1).expect("pool exist"); + log!(info, "XXXX {}", liquidity_token_id); + Pallet::::reward_pool_impl(account.clone(), pool, reward_token_id, amount, last_session.into()).expect("call should pass"); + } + + #[cfg(feature = "runtime-benchmarks")] + fn activate_liquidity_for_3rdparty_rewards(account: T::AccountId, liquidity_token: Self::CurrencyId, amount: Self::Balance, reward_token_id: Self::CurrencyId){ + Pallet::::activate_liquidity_for_3rdparty_rewards_impl(account, liquidity_token, amount, ThirdPartyActivationKind::ActivateKind(None), reward_token_id).expect("call should pass") + } + fn enable(liquidity_token_id: TokenId, weight: u8) { PromotedPoolRewards::::mutate(|promoted_pools| { promoted_pools @@ -1282,44 +1508,44 @@ impl LiquidityMiningApi for Pallet { /// Distributs liquidity mining rewards between all the activated tokens based on their weight fn distribute_rewards(liquidity_mining_rewards: Balance) { // R:1 W:0 - let schedules = RewardsSchedules::::get(); - - // R:1 W:0 - let mut pools = ScheduleRewardsPerSingleLiquidity::::get(); - - let it = - schedules - .iter() - .filter_map(|((session, rewarded_token, tokenid, amount, _), ())| { - if (*session).saturated_into::() >= Self::session_index() { - Some((rewarded_token, tokenid, amount)) - } else { - None - } - }); - - for (staked_token, rewarded_token, amount) in it { - // R: T::RewardsSchedulesLimit - in most pesimistic case - match TotalActivatedLiquidityForSchedules::::get(staked_token, rewarded_token) { - 0 => {}, - activated_amount => { - let activated_amount = U256::from(activated_amount); - let rewards = - pools.get(&(*staked_token, *rewarded_token)).cloned().unwrap_or_default(); - let rewards_for_liquidity = U256::from(*amount) - .checked_mul(U256::from(u128::MAX)) - .and_then(|x| x.checked_div(activated_amount)) - .and_then(|x| x.checked_add(rewards)); - - if let Some(val) = rewards_for_liquidity { - pools.insert((*staked_token, *rewarded_token), val); - } - }, - } - } - - ScheduleRewardsPerSingleLiquidity::::put(pools); - + // let schedules = RewardsSchedules::::get(); + // + // // R:1 W:0 + // let mut pools = ScheduleRewardsPerSingleLiquidity::::get(); + // + // let it = + // schedules + // .iter() + // .filter_map(|((session, rewarded_token, tokenid, amount, _), ())| { + // if (*session).saturated_into::() >= Self::session_index() { + // Some((rewarded_token, tokenid, amount)) + // } else { + // None + // } + // }); + // + // for (staked_token, rewarded_token, amount) in it { + // // R: T::RewardsSchedulesLimit - in most pesimistic case + // match TotalActivatedLiquidityForSchedules::::get(staked_token, rewarded_token) { + // 0 => {}, + // activated_amount => { + // let activated_amount = U256::from(activated_amount); + // let rewards = + // pools.get(&(*staked_token, *rewarded_token)).cloned().unwrap_or_default(); + // let rewards_for_liquidity = U256::from(*amount) + // .checked_mul(U256::from(u128::MAX)) + // .and_then(|x| x.checked_div(activated_amount)) + // .and_then(|x| x.checked_add(rewards)); + // + // if let Some(val) = rewards_for_liquidity { + // pools.insert((*staked_token, *rewarded_token), val); + // } + // }, + // } + // } + // + // ScheduleRewardsPerSingleLiquidity::::put(pools); + // let _ = PromotedPoolRewards::::try_mutate(|promoted_pools| -> DispatchResult { // benchmark with max of X prom pools let activated_pools: Vec<_> = promoted_pools diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index e87d04afd3..ebaddba9d0 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -217,6 +217,11 @@ mockall::mock! { liquidity_token_amount: Balance, ) -> Balance; + fn valuate_non_liquidity_token( + liquidity_token_id: TokenId, + liquidity_token_amount: Balance, + ) -> Balance; + fn scale_liquidity_by_mga_valuation( mga_valuation: Balance, liquidity_token_amount: Balance, diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index b4ba8c7e85..f70b201653 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -86,17 +86,22 @@ impl RewardsCalculator { crate::Error::::NotAPromotedPool ); - let pool_map = crate::ScheduleRewardsPerSingleLiquidity::::get(); + // NOTE: take into acout previous rewards (prev + rewards/activated) + let total_activated = Pallet::::total_activated_liquidity(asset_id, reward_asset_id); + let total_rewards = Pallet::::total_activated_liquidity(asset_id, reward_asset_id); + let pool_ratio_current = total_rewards/total_activated; - let pool_ratio_current = - pool_map.get(&(asset_id, reward_asset_id)).cloned().unwrap_or(U256::from(0)); + // let pool_map = crate::ScheduleRewardsPerSingleLiquidity::::get(); + + // let pool_ratio_current = + // pool_map.get(&(asset_id, reward_asset_id)).cloned().unwrap_or(U256::from(0)); let default_rewards = RewardInfo { activated_amount: 0_u128, rewards_not_yet_claimed: 0_u128, rewards_already_claimed: 0_u128, last_checkpoint: current_time, - pool_ratio_at_last_checkpoint: pool_ratio_current, + pool_ratio_at_last_checkpoint: pool_ratio_current.into(), missing_at_last_checkpoint: U256::from(0u128), }; @@ -109,7 +114,7 @@ impl RewardsCalculator { Ok(Self { rewards_context: RewardsContext { current_time: Pallet::::get_current_rewards_time()?, - pool_ratio_current, + pool_ratio_current: pool_ratio_current.into(), }, rewards_info, _curve: PhantomData::, diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 021cb35605..e2a62f5f65 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -4,7 +4,7 @@ use super::*; use crate::mock::*; -use frame_support::{assert_err, assert_ok}; +use frame_support::{assert_err, assert_err_ignore_postinfo,assert_ok}; use mockall::predicate::eq; use serial_test::serial; @@ -1218,6 +1218,7 @@ const SECOND_REWARD_TOKEN: u32 = 6u32; const LIQUIDITY_TOKEN: u32 = 10; const FIRST_LIQUIDITY_TOKEN: u32 = 10; const SECOND_LIQUIDITY_TOKEN: u32 = 11; +const TOKEN_PAIRED_WITH_MGX: u32 = 15; const ALICE: u128 = 2; const BOB: u128 = 3; const CHARLIE: u128 = 4; @@ -1490,6 +1491,9 @@ fn reject_schedule_with_too_little_rewards_per_session() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(1u128); + let valuate_non_liquidity_token_mock = MockValuationApi::valuate_non_liquidity_token_context(); + valuate_non_liquidity_token_mock.expect().return_const(0u128); + roll_to_session(4); assert_err!( @@ -1516,7 +1520,7 @@ fn accept_schedule_valuated_in_native_token() { let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); get_liquidity_asset_mock.expect().return_const(Ok(10u32)); let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(1u128); + valuate_liquidity_token_mock.expect().return_const(0u128); roll_to_session(4); @@ -1530,6 +1534,37 @@ fn accept_schedule_valuated_in_native_token() { }); } +#[test] +#[serial] +fn accept_schedule_valuated_in_token_paired_with_native_token() { + ExtBuilder::new() + .issue(ALICE, ProofOfStake::native_token_id(), REWARD_AMOUNT) + .issue(ALICE, TOKEN_PAIRED_WITH_MGX, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(0u128); + + let valuate_non_liquidity_token_mock = MockValuationApi::valuate_non_liquidity_token_context(); + valuate_non_liquidity_token_mock.expect().return_const(10u128); + + roll_to_session(4); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + TOKEN_PAIRED_WITH_MGX, + REWARD_AMOUNT, + 5u32.into() + ),); + }); +} + + #[test] #[serial] fn user_can_claim_3rdparty_rewards() { @@ -1853,6 +1888,7 @@ fn deactivate_3rdparty_rewards() { }); } + #[test] #[serial] fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() { @@ -2158,6 +2194,99 @@ fn liquidity_minting_liquidity_can_be_resused() { }); } +#[test] +#[serial] +fn fail_to_transfer_tokens_that_has_been_partially_deactivated() { + // 1. activate tokens for native rewards + // 2. re-activate tokens for 3rdparty rewards + // 4. deactivate tokens for 3rdparty rewards + // 5. fail to transfer assets as they are still locked + // 6. deactivate tokens for native rewards + // 7. successfully transfer unlocked tokens + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ).unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + Some(ThirdPartyActivationKind::LiquidityMining), + ) + .unwrap(); + + assert_err!( + ProofOfStake::deactivate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + ), + Error::::LiquidityLockedIn3rdpartyRewards + ); + + assert_err!( + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + FIRST_REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + ) + .unwrap(); + + assert_ok!( + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ) + ); + + }); +} + #[test] #[serial] fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { @@ -2464,7 +2593,7 @@ fn can_not_provide_liquidity_for_schedule_rewards_when_its_only_activated_for_li ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) .unwrap(); - assert_err!( + assert_err_ignore_postinfo!( ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -2512,3 +2641,89 @@ fn can_not_provide_liquidity_for_mining_rewards_when_its_only_activated_for_sche ); }); } + +use frame_support::dispatch::{GetDispatchInfo, Pays}; +use sp_runtime::{traits::Dispatchable, Permill}; + +#[test] +#[serial] +fn activate_deactivate_calls_are_free_of_charge() { + ExtBuilder::new() + .build() + .execute_with(|| { + System::set_block_number(1); + + let activate_call = mock::RuntimeCall::ProofOfStake( + Call::activate_liquidity_for_3rdparty_rewards{ + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + use_balance_from: None, + } + ); + + let deactivate_call = mock::RuntimeCall::ProofOfStake( + Call::deactivate_liquidity_for_3rdparty_rewards{ + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + } + ); + + assert_eq!( + activate_call.get_dispatch_info().pays_fee, + Pays::No + ); + + assert_eq!( + deactivate_call.get_dispatch_info().pays_fee, + Pays::No + ); + + }); +} + +#[test] +#[serial] +fn unsuccessul_activate_deactivate_calls_charges_fees() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + let activate_call = mock::RuntimeCall::ProofOfStake( + Call::activate_liquidity_for_3rdparty_rewards{ + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + use_balance_from: None, + } + ); + + let deactivate_call = mock::RuntimeCall::ProofOfStake( + Call::deactivate_liquidity_for_3rdparty_rewards{ + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + } + ); + + + assert_eq!( + activate_call.dispatch(RuntimeOrigin::signed(BOB)).unwrap_err().post_info.pays_fee, + Pays::Yes + ); + + assert_eq!( + deactivate_call.dispatch(RuntimeOrigin::signed(BOB)).unwrap_err().post_info.pays_fee, + Pays::Yes + ); + }); +} diff --git a/pallets/xyk/src/lib.rs b/pallets/xyk/src/lib.rs index 79db4e5682..4b79ea5018 100644 --- a/pallets/xyk/src/lib.rs +++ b/pallets/xyk/src/lib.rs @@ -3427,6 +3427,19 @@ impl Valuate for Pallet { .unwrap_or(Balance::max_value()) } + fn valuate_non_liquidity_token( + non_liquidity_token_id: Self::CurrencyId, + amount: Self::Balance, + ) -> Self::Balance { + let native_token_id = Pallet::::native_token_id(); + + let (native_reserves, token_reserves) = match Pallet::::get_reserves(native_token_id, non_liquidity_token_id) { + Ok(reserves) => reserves, + Err(_) => return Default::default(), + }; + Pallet::::calculate_sell_price_no_fee(token_reserves, native_reserves, amount).unwrap_or_default() + } + fn scale_liquidity_by_mga_valuation( mga_valuation: Self::Balance, liquidity_token_amount: Self::Balance, diff --git a/pallets/xyk/src/tests.rs b/pallets/xyk/src/tests.rs index 47861dc9ea..4d224f0cf5 100644 --- a/pallets/xyk/src/tests.rs +++ b/pallets/xyk/src/tests.rs @@ -2581,3 +2581,49 @@ fn buy_W_maintenance_mode() { ); }); } + +#[test] +#[serial] +fn valuate_token_paired_with_mgx() { + new_test_ext().execute_with(|| { + System::set_block_number(1); + let native_token_id = XykStorage::create_new_token(&DUMMY_USER_ID, 2_000_000_u128); + assert_eq!(native_token_id, XykStorage::native_token_id()); + + + let first_token = XykStorage::create_new_token(&DUMMY_USER_ID, 1_000_000_u128); + let second_token = XykStorage::create_new_token(&DUMMY_USER_ID, 1_000_000_u128); + let first_token_pool = second_token + 1; + let second_token_pool = second_token + 2; + + + XykStorage::create_pool( + RuntimeOrigin::signed(DUMMY_USER_ID), + native_token_id, + 1_000_000_u128, + first_token, + 500_000_u128, + ) + .unwrap(); + + XykStorage::create_pool( + RuntimeOrigin::signed(DUMMY_USER_ID), + second_token, + 1_000_000_u128, + native_token_id, + 500_000_u128, + ) + .unwrap(); + + + assert_eq!( + as Valuate>::valuate_non_liquidity_token(first_token, 100), + 199 + ); + + assert_eq!( + as Valuate>::valuate_non_liquidity_token(second_token, 100), + 49 + ); + }); +} diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 7bdff2fdac..b08a94149d 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1371,7 +1371,7 @@ where use super::*; parameter_types! { - pub const RewardsSchedulesLimit: u32 = 150; + pub const RewardsSchedulesLimit: u32 = 200; // TODO: allign properly pub const Min3rdPartyRewards: u128 = 100 * 30_000 * currency::DOLLARS; } From e3521d7cd5e21ac6964cc517ba8a2faa9eb33959 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 13 Oct 2023 10:49:03 +0000 Subject: [PATCH 037/125] basic list operation works --- pallets/proof-of-stake/src/lib.rs | 73 ++++++++++--- pallets/proof-of-stake/src/tests.rs | 163 +++++++++++++++++++++++++++- 2 files changed, 217 insertions(+), 19 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 68e43e3a7e..75e25cda3c 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -188,8 +188,11 @@ pub mod pallet { #[pallet::hooks] impl Hooks for Pallet { fn on_initialize(n: T::BlockNumber) -> Weight { + + println!("on_initialize {}", n); const AMOUNT_PER_BLOCK: u64 = 5; + // NOTE: 3R let mut prev = None; let mut pos = match ( @@ -209,8 +212,15 @@ pub mod pallet { (Some(pos), Some(_head), Some(_tail)) => { Some(pos + 1) }, + _ => { + None + }, }; + println!("ScheduleListPos : {:?}", ScheduleListPos::::get()); + println!("ScheduleListHead : {:?}", ScheduleListHead::::get()); + println!("ScheduleListTail : {:?}", ScheduleListTail::::get()); + // 1R 1W 15RW //NOTE: 5 transfers => 15R 15W @@ -219,16 +229,26 @@ pub mod pallet { // NOTE: 3R + 1R let session_id = frame_system::Pallet::::block_number().saturated_into::() / 5u64; - for _ in 0..AMOUNT_PER_BLOCK { - match (prev.as_mut(),pos.as_mut()) { + if frame_system::Pallet::::block_number().saturated_into::() % 5u64 == 0 { + ScheduleListPos::::kill(); + return Default::default(); + } + + for idx in 0..AMOUNT_PER_BLOCK { + println!("iter {}:{}", n, idx); + println!("session_id : {:?}", session_id); + println!("prev : {:?}", prev); + println!("pos : {:?}", pos); + match (prev.clone(), pos.clone()) { (Some(prev_val), Some(pos_val)) => { if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ - ScheduleRewardsTotal::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ - if schedule.last_session < session_id{ + ScheduleListPos::::put(pos_val); + ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ + if schedule.last_session >= session_id{ *val += schedule.amount_per_session; - *pos = Some(next); - *prev = Some(pos_val); + pos = next; + prev = Some(pos_val); }else{ // NOTE: consider removing elements from list RewardsSchedulesList::::mutate(prev_val, |data|{ @@ -236,25 +256,50 @@ pub mod pallet { *prev_next = next; } }); - ScheduleListTail::::put(prev_val); + pos = next; + if ScheduleListHead::::get().unwrap() == pos_val{ + if let Some(next) = next{ + ScheduleListHead::::put(next); + }else{ + ScheduleListHead::::kill(); + ScheduleListTail::::kill(); + ScheduleListPos::::kill(); + } + } } }); + }else{ break; } }, (None, Some(pos_val)) => { + println!("hello 0"); if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ - ScheduleRewardsTotal::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ - if schedule.last_session < session_id{ + println!("hello 1"); + ScheduleListPos::::put(pos_val); + ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ + if schedule.last_session >= session_id{ + println!("hello 2"); *val += schedule.amount_per_session; - *pos = Some(next); - *prev = Some(pos_val); + pos = next; + prev = Some(pos_val); }else{ + println!("hello 3"); // NOTE: consider removing elements from list - ScheduleListHead::::kill(); - ScheduleListTail::::kill(); + if ScheduleListHead::::get().unwrap() == pos_val{ + if let Some(next) = next{ + println!("hello 4"); + ScheduleListHead::::put(next); + }else{ + println!("hello 5"); + ScheduleListHead::::kill(); + ScheduleListTail::::kill(); + ScheduleListPos::::kill(); + } + } + pos = next; } }); }else{ @@ -1396,7 +1441,7 @@ impl Pallet { } }); RewardsSchedulesList::::insert(tail + 1, (schedule, None::)); - ScheduleListHead::::put(tail + 1); + ScheduleListTail::::put(tail + 1); }, _ => {} // invariant assures this will never happen } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index e2a62f5f65..b2c738e15f 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -58,9 +58,11 @@ fn forward_to_block(n: u32) { fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { while System::block_number().saturated_into::() <= n { + ProofOfStake::on_initialize(System::block_number().saturated_into::()); if System::block_number().saturated_into::() % ProofOfStake::rewards_period() == 0 { ProofOfStake::distribute_rewards(rewards); } + ProofOfStake::on_finalize(n as u64); System::set_block_number(System::block_number().saturated_into::() + 1); } } @@ -1390,12 +1392,163 @@ fn rewards_schedule_is_stored() { let rewards_per_session = REWARD_AMOUNT / 5; assert_eq!( - ProofOfStake::schedules().into_inner(), - BTreeMap::from([( - (5u64, LIQUIDITY_TOKEN, REWARD_TOKEN, rewards_per_session, 0), - () - )]) + RewardsSchedulesList::::get(0).unwrap(), + (Schedule{ + last_session: 5u64, + liq_token: LIQUIDITY_TOKEN, + reward_token: REWARD_TOKEN, + amount_per_session: rewards_per_session, + }, None) + ); + assert_eq!( + ScheduleListTail::::get(), + Some(0u64) ); + assert_eq!( + ScheduleListHead::::get(), + Some(0u64) + ); + }); +} + + +#[test] +#[serial] +fn rewards_linked_list_insert_multiple_schedules() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 2 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 1u32.into() + ),); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 2u32.into() + ),); + + + assert_eq!( + RewardsSchedulesList::::get(0).unwrap(), + (Schedule{ + last_session: 1u64, + liq_token: LIQUIDITY_TOKEN, + reward_token: REWARD_TOKEN, + amount_per_session: REWARD_AMOUNT / 1, + }, Some(1)) + ); + + assert_eq!( + RewardsSchedulesList::::get(1).unwrap(), + (Schedule{ + last_session: 2u64, + liq_token: LIQUIDITY_TOKEN, + reward_token: REWARD_TOKEN, + amount_per_session: REWARD_AMOUNT / 2, + }, None) + ); + + assert_eq!( + ScheduleListHead::::get(), + Some(0u64) + ); + + assert_eq!( + ScheduleListTail::::get(), + Some(1u64) + ); + }); +} + + +#[test] +#[serial] +fn rewards_linked_list_removes_outdated_schedule_automatically() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 2 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 1u32.into() + ),); + + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 2u32.into() + ),); + + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListPos::::get(), None); + assert_eq!( ScheduleListTail::::get(), Some(1u64)); + + forward_to_block(2); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(1u64)); + assert_eq!( ScheduleListPos::::get(), Some(1u64)); + + forward_to_block(5); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(1u64)); + assert_eq!( ScheduleListPos::::get(), None,); + + forward_to_block(10); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(1u64)); + assert_eq!( ScheduleListPos::::get(), None,); + + forward_to_block(11); + + assert_eq!( ScheduleListHead::::get(), Some(1u64)); + assert_eq!( ScheduleListTail::::get(), Some(1u64)); + assert_eq!( ScheduleListPos::::get(), Some(1u64),); + + forward_to_block(15); + + assert_eq!( ScheduleListHead::::get(), Some(1u64)); + assert_eq!( ScheduleListTail::::get(), Some(1u64)); + assert_eq!( ScheduleListPos::::get(), None); + + forward_to_block(16); + + assert_eq!( ScheduleListHead::::get(), None); + assert_eq!( ScheduleListTail::::get(), None); + assert_eq!( ScheduleListPos::::get(), None); + + }); } From 09e8b6ee73226bd3cd64ca64e2bc9e19e20b8d97 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 13 Oct 2023 11:39:50 +0000 Subject: [PATCH 038/125] simplified version of list --- pallets/proof-of-stake/src/lib.rs | 105 +++++++++++++----------------- 1 file changed, 46 insertions(+), 59 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 75e25cda3c..119be37ad2 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -189,6 +189,11 @@ pub mod pallet { impl Hooks for Pallet { fn on_initialize(n: T::BlockNumber) -> Weight { + if frame_system::Pallet::::block_number().saturated_into::() % 5u64 == 0 { + ScheduleListPos::::kill(); + return Default::default(); + } + println!("on_initialize {}", n); const AMOUNT_PER_BLOCK: u64 = 5; @@ -229,10 +234,6 @@ pub mod pallet { // NOTE: 3R + 1R let session_id = frame_system::Pallet::::block_number().saturated_into::() / 5u64; - if frame_system::Pallet::::block_number().saturated_into::() % 5u64 == 0 { - ScheduleListPos::::kill(); - return Default::default(); - } for idx in 0..AMOUNT_PER_BLOCK { println!("iter {}:{}", n, idx); @@ -240,68 +241,51 @@ pub mod pallet { println!("prev : {:?}", prev); println!("pos : {:?}", pos); match (prev.clone(), pos.clone()) { - (Some(prev_val), Some(pos_val)) => { + (prev_val, Some(pos_val)) => { if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ - ScheduleListPos::::put(pos_val); - ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ - if schedule.last_session >= session_id{ - *val += schedule.amount_per_session; - pos = next; - prev = Some(pos_val); - }else{ - // NOTE: consider removing elements from list - RewardsSchedulesList::::mutate(prev_val, |data|{ - if let Some((schedule, prev_next)) = data{ - *prev_next = next; - } - }); - pos = next; - if ScheduleListHead::::get().unwrap() == pos_val{ - if let Some(next) = next{ - ScheduleListHead::::put(next); - }else{ - ScheduleListHead::::kill(); - ScheduleListTail::::kill(); - ScheduleListPos::::kill(); - } - } - } - }); - - }else{ - break; - } - }, - (None, Some(pos_val)) => { - println!("hello 0"); - if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ - println!("hello 1"); - ScheduleListPos::::put(pos_val); - ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ - if schedule.last_session >= session_id{ - println!("hello 2"); - *val += schedule.amount_per_session; - pos = next; - prev = Some(pos_val); - }else{ - println!("hello 3"); - // NOTE: consider removing elements from list - if ScheduleListHead::::get().unwrap() == pos_val{ + if schedule.last_session >= session_id{ + ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ + *val += schedule.amount_per_session + }); + pos = next; + prev = Some(pos_val); + }else{ + // NOTE: consider removing elements from list + // RewardsSchedulesList::::mutate(prev_val, |data|{ + // if let Some((schedule, prev_next)) = data{ + // *prev_next = next; + // } + // }); + + match(Self::head(), Self::tail()){ + (Some(head), Some(tail)) if head == pos_val && head != tail=> { + // move head to next if let Some(next) = next{ - println!("hello 4"); ScheduleListHead::::put(next); - }else{ - println!("hello 5"); - ScheduleListHead::::kill(); - ScheduleListTail::::kill(); - ScheduleListPos::::kill(); } - } - pos = next; + }, + (Some(head), Some(tail)) if tail == pos_val && head != tail=> { + if let Some(prev) = prev_val{ + ScheduleListTail::::put(prev); + RewardsSchedulesList::::mutate(prev, |data|{ + if let Some((schedule, next)) = data.as_mut() { + *next = Some(prev) + } + }); + } + }, + (Some(head), Some(tail)) if tail == pos_val && head == tail=> { + ScheduleListTail::::kill(); + ScheduleListHead::::kill(); + ScheduleListPos::::kill(); + }, + _ => {} + } - }); + pos = next; + } }else{ break; } @@ -512,12 +496,15 @@ pub mod pallet { >; #[pallet::storage] + #[pallet::getter(fn pos)] pub type ScheduleListPos = StorageValue<_, ScheduleId, OptionQuery>; #[pallet::storage] + #[pallet::getter(fn head)] pub type ScheduleListHead = StorageValue<_, ScheduleId, OptionQuery>; #[pallet::storage] + #[pallet::getter(fn tail)] pub type ScheduleListTail = StorageValue<_, ScheduleId, OptionQuery>; #[pallet::storage] From 2dacdc54298637dde80b7f48bbc0d0e76e834a56 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 13 Oct 2023 14:40:32 +0000 Subject: [PATCH 039/125] almost works --- pallets/proof-of-stake/src/lib.rs | 26 ++- pallets/proof-of-stake/src/tests.rs | 312 ++++++++++++++++++++++++++++ 2 files changed, 331 insertions(+), 7 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 119be37ad2..86df3e2b7d 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -252,26 +252,24 @@ pub mod pallet { pos = next; prev = Some(pos_val); }else{ - // NOTE: consider removing elements from list - // RewardsSchedulesList::::mutate(prev_val, |data|{ - // if let Some((schedule, prev_next)) = data{ - // *prev_next = next; - // } - // }); match(Self::head(), Self::tail()){ (Some(head), Some(tail)) if head == pos_val && head != tail=> { + //remove first elem + println!("remove first list elem"); // move head to next if let Some(next) = next{ ScheduleListHead::::put(next); } }, (Some(head), Some(tail)) if tail == pos_val && head != tail=> { + println!("remove last list elem"); if let Some(prev) = prev_val{ ScheduleListTail::::put(prev); + ScheduleListPos::::put(prev); RewardsSchedulesList::::mutate(prev, |data|{ if let Some((schedule, next)) = data.as_mut() { - *next = Some(prev) + *next = None } }); } @@ -281,6 +279,20 @@ pub mod pallet { ScheduleListHead::::kill(); ScheduleListPos::::kill(); }, + (Some(head), Some(tail)) => { + println!("remove middle elem {}", pos_val); + if let Some(prev) = prev_val{ + RewardsSchedulesList::::mutate(prev, |data|{ + if let Some((schedule, prev_next)) = data.as_mut() { + *prev_next = next + } + }); + } + if let Some(prev) = prev_val{ + ScheduleListPos::::put(prev); + } + //remove middle elem + }, _ => {} } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index b2c738e15f..2309e46ccc 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1552,6 +1552,318 @@ fn rewards_linked_list_removes_outdated_schedule_automatically() { }); } +// rewards_first_schedule_from_linked_list +// rewards_last_schedule_from_linked_list +// rewards_middle_schedule_from_linked_list +// rewards_multipleall_schedule_from_linked_list + +fn insert_schedule_ending_at_session(n: u32){ + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + n.into(), + ),); + +} + +#[test] +#[serial] +fn rewards_first_schedule_from_linked_list_of_four() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListPos::::get(), None); + assert_eq!( ScheduleListTail::::get(), Some(3u64)); + + forward_to_block(11); + + assert_eq!( ScheduleListHead::::get(), Some(1u64)); + assert_eq!( ScheduleListTail::::get(), Some(3u64)); + assert_eq!( RewardsSchedulesList::::get(1u64).unwrap().1, Some(2u64)); + assert_eq!( RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); + assert_eq!( RewardsSchedulesList::::get(3u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_last_schedule_from_linked_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListPos::::get(), None); + assert_eq!( ScheduleListTail::::get(), Some(3u64)); + + forward_to_block(11); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(2u64)); + assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); + assert_eq!( RewardsSchedulesList::::get(1u64).unwrap().1, Some(2u64)); + assert_eq!( RewardsSchedulesList::::get(2u64).unwrap().1, None); + + + }); +} + +#[test] +#[serial] +fn remove_middle_schedule_from_linked_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListPos::::get(), None); + assert_eq!( ScheduleListTail::::get(), Some(3u64)); + + forward_to_block(11); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(3u64)); + assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(2u64)); + assert_eq!( RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); + assert_eq!( RewardsSchedulesList::::get(3u64).unwrap().1, None); + }); +} + + +#[test] +#[serial] +fn remove_first_few_elems_at_once_from_linked_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListPos::::get(), None); + assert_eq!( ScheduleListTail::::get(), Some(3u64)); + + forward_to_block(11); + + assert_eq!( ScheduleListHead::::get(), Some(2u64)); + assert_eq!( ScheduleListTail::::get(), Some(3u64)); + assert_eq!( RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); + assert_eq!( RewardsSchedulesList::::get(3u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_few_last_elems_at_once_from_linked_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(1); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListPos::::get(), None); + assert_eq!( ScheduleListTail::::get(), Some(3u64)); + + forward_to_block(11); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(1u64)); + assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); + assert_eq!( RewardsSchedulesList::::get(1u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_few_middle_elements_from_linkedd_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + + forward_to_block(11); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(3u64)); + assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(3u64)); + assert_eq!( RewardsSchedulesList::::get(3u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_random_elements_from_linked_list() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 5 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + insert_schedule_ending_at_session(1); + insert_schedule_ending_at_session(2); + + assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); + assert_ok!(RewardsSchedulesList::::get(4).ok_or(())); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(4u64)); + + forward_to_block(11); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(4u64)); + assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(2u64)); + assert_eq!( RewardsSchedulesList::::get(2u64).unwrap().1, Some(4u64)); + assert_eq!( RewardsSchedulesList::::get(4u64).unwrap().1, None); + }); +} + +#[test] +#[serial] +fn remove_random_elements_from_linked_list_over_time() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 7 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + insert_schedule_ending_at_session(3); // 0 + insert_schedule_ending_at_session(2); // 1 + insert_schedule_ending_at_session(1); // 2 + insert_schedule_ending_at_session(2); // 3 + insert_schedule_ending_at_session(2); // 4 + insert_schedule_ending_at_session(1); // 5 + insert_schedule_ending_at_session(3); // 6 + + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(6u64)); + + forward_to_block(14); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(6u64)); + assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); + assert_eq!( RewardsSchedulesList::::get(1u64).unwrap().1, Some(3u64)); + assert_eq!( RewardsSchedulesList::::get(3u64).unwrap().1, Some(4u64)); + assert_eq!( RewardsSchedulesList::::get(4u64).unwrap().1, Some(6u64)); + assert_eq!( RewardsSchedulesList::::get(6u64).unwrap().1, None); + + }); +} + + + + + #[test] #[serial] fn number_of_active_schedules_is_limited() { From 5beb9882e12fbbf025ab5841ab5dfc7d2dada52a Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 13 Oct 2023 16:34:55 +0000 Subject: [PATCH 040/125] linked list working --- pallets/proof-of-stake/src/lib.rs | 118 ++++++++++-------------------- pallets/xyk/src/lib.rs | 12 +-- pallets/xyk/src/tests.rs | 61 +++++++-------- 3 files changed, 73 insertions(+), 118 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 86df3e2b7d..a993815ac6 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -199,29 +199,6 @@ pub mod pallet { // NOTE: 3R - let mut prev = None; - let mut pos = match ( - ScheduleListPos::::get(), - ScheduleListHead::::get(), - ScheduleListTail::::get(), - ){ - (None, None, None) => { - None - }, - (Some(pos), Some(head), Some(tail)) if pos == tail => { - None - }, - (None, Some(head), Some(_tail)) => { - Some(head) - }, - (Some(pos), Some(_head), Some(_tail)) => { - Some(pos + 1) - }, - _ => { - None - }, - }; - println!("ScheduleListPos : {:?}", ScheduleListPos::::get()); println!("ScheduleListHead : {:?}", ScheduleListHead::::get()); println!("ScheduleListTail : {:?}", ScheduleListTail::::get()); @@ -238,96 +215,78 @@ pub mod pallet { for idx in 0..AMOUNT_PER_BLOCK { println!("iter {}:{}", n, idx); println!("session_id : {:?}", session_id); - println!("prev : {:?}", prev); + + let last_valid = ScheduleListPos::::get(); + let pos = match ( last_valid, ScheduleListHead::::get() ){ + (Some(pos), _) => { + if let Some ((schedule, next)) = RewardsSchedulesList::::get(pos) { + next + }else{ + None + } + }, + (None, Some(head)) => { + Some(head) + }, + _ => { None }, + }; + println!("last_valid : {:?}", last_valid); println!("pos : {:?}", pos); - match (prev.clone(), pos.clone()) { - (prev_val, Some(pos_val)) => { - if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ - ScheduleListPos::::put(pos_val); + if let Some(pos_val) = pos { + if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ if schedule.last_session >= session_id{ ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ *val += schedule.amount_per_session }); - pos = next; - prev = Some(pos_val); + ScheduleListPos::::put(pos_val); }else{ - match(Self::head(), Self::tail()){ (Some(head), Some(tail)) if head == pos_val && head != tail=> { - //remove first elem println!("remove first list elem"); - // move head to next if let Some(next) = next{ ScheduleListHead::::put(next); } }, + (Some(head), Some(tail)) if tail == pos_val && head == tail=> { + ScheduleListTail::::kill(); + ScheduleListHead::::kill(); + ScheduleListPos::::kill(); + }, (Some(head), Some(tail)) if tail == pos_val && head != tail=> { println!("remove last list elem"); - if let Some(prev) = prev_val{ - ScheduleListTail::::put(prev); - ScheduleListPos::::put(prev); - RewardsSchedulesList::::mutate(prev, |data|{ + if let Some(last_valid) = last_valid{ + ScheduleListTail::::put(last_valid); + RewardsSchedulesList::::mutate(last_valid, |data|{ if let Some((schedule, next)) = data.as_mut() { *next = None } }); } }, - (Some(head), Some(tail)) if tail == pos_val && head == tail=> { - ScheduleListTail::::kill(); - ScheduleListHead::::kill(); - ScheduleListPos::::kill(); - }, (Some(head), Some(tail)) => { println!("remove middle elem {}", pos_val); - if let Some(prev) = prev_val{ - RewardsSchedulesList::::mutate(prev, |data|{ + if let Some(last_valid) = last_valid{ + RewardsSchedulesList::::mutate(last_valid, |data|{ if let Some((schedule, prev_next)) = data.as_mut() { *prev_next = next } }); } - if let Some(prev) = prev_val{ - ScheduleListPos::::put(prev); - } - //remove middle elem }, _ => {} } - pos = next; } - }else{ - break; - } - }, - (Some(pos), None) => { - break; - }, - (None, None) => { - break; - } - } - } - Default::default() - // if let Some((schedule, next)) = RewardsSchedulesList::::get(pos){ - // ScheduleRewardsTotal::mutate_exists((schedule.liq_token, schedudle.reward_token, session_id), |val|{ - // if schedudle.last_session <= session_id{ - // *val += schedule.amount_per_session; - // pos = next; - // }else{ - // None - // } - // }) - // }else{ - // break; - // - // } - // - } - } + } + } else{ + break; + } + } + Default::default() + } + } #[cfg(feature = "runtime-benchmarks")] pub trait PoSBenchmarkingConfig: pallet_issuance::Config {} @@ -511,6 +470,9 @@ pub mod pallet { #[pallet::getter(fn pos)] pub type ScheduleListPos = StorageValue<_, ScheduleId, OptionQuery>; + #[pallet::storage] + pub type ScheduleListPosPrev = StorageValue<_, ScheduleId, OptionQuery>; + #[pallet::storage] #[pallet::getter(fn head)] pub type ScheduleListHead = StorageValue<_, ScheduleId, OptionQuery>; diff --git a/pallets/xyk/src/lib.rs b/pallets/xyk/src/lib.rs index 4b79ea5018..9bb92742da 100644 --- a/pallets/xyk/src/lib.rs +++ b/pallets/xyk/src/lib.rs @@ -3433,11 +3433,13 @@ impl Valuate for Pallet { ) -> Self::Balance { let native_token_id = Pallet::::native_token_id(); - let (native_reserves, token_reserves) = match Pallet::::get_reserves(native_token_id, non_liquidity_token_id) { - Ok(reserves) => reserves, - Err(_) => return Default::default(), - }; - Pallet::::calculate_sell_price_no_fee(token_reserves, native_reserves, amount).unwrap_or_default() + let (native_reserves, token_reserves) = + match Pallet::::get_reserves(native_token_id, non_liquidity_token_id) { + Ok(reserves) => reserves, + Err(_) => return Default::default(), + }; + Pallet::::calculate_sell_price_no_fee(token_reserves, native_reserves, amount) + .unwrap_or_default() } fn scale_liquidity_by_mga_valuation( diff --git a/pallets/xyk/src/tests.rs b/pallets/xyk/src/tests.rs index 4d224f0cf5..d330d5957c 100644 --- a/pallets/xyk/src/tests.rs +++ b/pallets/xyk/src/tests.rs @@ -2586,44 +2586,35 @@ fn buy_W_maintenance_mode() { #[serial] fn valuate_token_paired_with_mgx() { new_test_ext().execute_with(|| { - System::set_block_number(1); - let native_token_id = XykStorage::create_new_token(&DUMMY_USER_ID, 2_000_000_u128); - assert_eq!(native_token_id, XykStorage::native_token_id()); - - - let first_token = XykStorage::create_new_token(&DUMMY_USER_ID, 1_000_000_u128); - let second_token = XykStorage::create_new_token(&DUMMY_USER_ID, 1_000_000_u128); - let first_token_pool = second_token + 1; - let second_token_pool = second_token + 2; - + System::set_block_number(1); + let native_token_id = XykStorage::create_new_token(&DUMMY_USER_ID, 2_000_000_u128); + assert_eq!(native_token_id, XykStorage::native_token_id()); - XykStorage::create_pool( - RuntimeOrigin::signed(DUMMY_USER_ID), - native_token_id, - 1_000_000_u128, - first_token, - 500_000_u128, - ) - .unwrap(); + let first_token = XykStorage::create_new_token(&DUMMY_USER_ID, 1_000_000_u128); + let second_token = XykStorage::create_new_token(&DUMMY_USER_ID, 1_000_000_u128); + let first_token_pool = second_token + 1; + let second_token_pool = second_token + 2; - XykStorage::create_pool( - RuntimeOrigin::signed(DUMMY_USER_ID), - second_token, - 1_000_000_u128, - native_token_id, - 500_000_u128, - ) - .unwrap(); + XykStorage::create_pool( + RuntimeOrigin::signed(DUMMY_USER_ID), + native_token_id, + 1_000_000_u128, + first_token, + 500_000_u128, + ) + .unwrap(); + XykStorage::create_pool( + RuntimeOrigin::signed(DUMMY_USER_ID), + second_token, + 1_000_000_u128, + native_token_id, + 500_000_u128, + ) + .unwrap(); - assert_eq!( - as Valuate>::valuate_non_liquidity_token(first_token, 100), - 199 - ); + assert_eq!( as Valuate>::valuate_non_liquidity_token(first_token, 100), 199); - assert_eq!( - as Valuate>::valuate_non_liquidity_token(second_token, 100), - 49 - ); - }); + assert_eq!( as Valuate>::valuate_non_liquidity_token(second_token, 100), 49); + }); } From 710526c38b15c2bb4c459cffb78408e4c6ea62d3 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 13 Oct 2023 16:40:53 +0000 Subject: [PATCH 041/125] add scenario for conrner case conditions where all processed schedules are invalid --- pallets/proof-of-stake/src/tests.rs | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 2309e46ccc..1c06fa14dc 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1857,12 +1857,57 @@ fn remove_random_elements_from_linked_list_over_time() { assert_eq!( RewardsSchedulesList::::get(4u64).unwrap().1, Some(6u64)); assert_eq!( RewardsSchedulesList::::get(6u64).unwrap().1, None); + forward_to_block(19); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(6u64)); + assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(6u64)); + assert_eq!( RewardsSchedulesList::::get(6u64).unwrap().1, None); + + }); } +#[test] +#[serial] +fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 10 * REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + insert_schedule_ending_at_session(3); // 0 + insert_schedule_ending_at_session(1); // 1 + insert_schedule_ending_at_session(1); // 1 + insert_schedule_ending_at_session(1); // 1 + insert_schedule_ending_at_session(1); // 2 + insert_schedule_ending_at_session(1); // 3 + insert_schedule_ending_at_session(1); // 4 + insert_schedule_ending_at_session(1); // 5 + insert_schedule_ending_at_session(3); // 6 + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(8u64)); + + forward_to_block(14); + + assert_eq!( ScheduleListHead::::get(), Some(0u64)); + assert_eq!( ScheduleListTail::::get(), Some(8u64)); + assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(8u64)); + assert_eq!( RewardsSchedulesList::::get(8u64).unwrap().1, None); + + forward_to_block(100); + assert_eq!( ScheduleListHead::::get(), None); + assert_eq!( ScheduleListTail::::get(), None); + }); +} #[test] #[serial] From cd4dc078d74086f6e297eb023a09dfa8a7ab5843 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sat, 14 Oct 2023 11:36:53 +0000 Subject: [PATCH 042/125] before session id unification --- pallets/proof-of-stake/src/lib.rs | 27 +++++-- pallets/proof-of-stake/src/reward_info.rs | 7 +- pallets/proof-of-stake/src/tests.rs | 85 +++++++++++++++++++++++ 3 files changed, 110 insertions(+), 9 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index a993815ac6..a58f06aabb 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -236,10 +236,16 @@ pub mod pallet { if let Some(pos_val) = pos { if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ if schedule.last_session >= session_id{ - ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token, session_id), |val|{ - *val += schedule.amount_per_session + ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token), |(pending, idx, cumulative)|{ + if *idx >= session_id { + *pending += schedule.amount_per_session + }else{ + *cumulative += *pending; + *pending = schedule.amount_per_session; + *idx = session_id; + } }); - ScheduleListPos::::put(pos_val); + ScheduleListPos::::put(pos_val); }else{ match(Self::head(), Self::tail()){ (Some(head), Some(tail)) if head == pos_val && head != tail=> { @@ -451,7 +457,12 @@ pub mod pallet { /// How much scheduled rewards per single liquidty_token should be distribute_rewards /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic #[pallet::storage] - pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat ,(TokenId, TokenId, u64), u128, ValueQuery>; + pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat ,(TokenId, TokenId), (u128, u64, u128), ValueQuery>; + + /// How much scheduled rewards per single liquidty_token should be distribute_rewards + /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic + // #[pallet::storage] + // pub type ScheduleRewardsCumulative = StorageMap<_, Twox64Concat ,(TokenId, TokenId, u64), u128, ValueQuery>; /// List of activated schedules sorted by expiry date #[pallet::storage] @@ -496,7 +507,7 @@ pub mod pallet { #[pallet::storage] pub type PrevTotalActivatedLiquidityForSchedules = - StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (u64, u128), ValueQuery>; + StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, u128, ValueQuery>; /// Tracks how much liquidity user activated for particular (liq token, reward token) pair /// StorageNMap was used because it only require single read to know if user deactivated all @@ -781,16 +792,18 @@ impl Pallet { fn total_activated_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ let (idx, amount) = TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward); + println!("total_activated_liquidity idx: {} amount: {}", idx, amount); if idx == (frame_system::Pallet::::block_number().saturated_into::() / 5){ amount }else{ - PrevTotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward).1 + PrevTotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward) } } fn update_total_activated_liqudity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, diff: Balance, change: bool) { // TODO: make configurable let session_id = frame_system::Pallet::::block_number().saturated_into::() / 5; + println!("UPDATE_TOTAL_ACTIVATED_LIQUDITY liq: {} reward:{} amount:{}", liquidity_asset_id, liquidity_assets_reward, diff); if let Ok((idx, amount)) = TotalActivatedLiquidityForSchedules::::try_get(liquidity_asset_id, liquidity_assets_reward){ let new_amount = if change{ amount + diff @@ -799,7 +812,7 @@ impl Pallet { }; if session_id > idx { - PrevTotalActivatedLiquidityForSchedules::::insert(liquidity_asset_id, liquidity_assets_reward, (idx, amount)); + PrevTotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |val| *val += amount); } TotalActivatedLiquidityForSchedules::::insert(liquidity_asset_id, liquidity_assets_reward, (session_id, new_amount)); } diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index f70b201653..0110ba03fe 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -88,8 +88,11 @@ impl RewardsCalculator { // NOTE: take into acout previous rewards (prev + rewards/activated) let total_activated = Pallet::::total_activated_liquidity(asset_id, reward_asset_id); - let total_rewards = Pallet::::total_activated_liquidity(asset_id, reward_asset_id); - let pool_ratio_current = total_rewards/total_activated; + let total_rewards = crate::ScheduleRewardsTotal::::get((asset_id, reward_asset_id)).2; + println!("REWARDS CALCULATOR at {} for {}", current_time, user); + println!("total_activated : {}", total_activated); + println!("total_rewards : {}", total_rewards); + let pool_ratio_current = total_rewards.checked_div(total_activated).unwrap_or_default(); // let pool_map = crate::ScheduleRewardsPerSingleLiquidity::::get(); diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 1c06fa14dc..0feaf42496 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -3237,3 +3237,88 @@ fn unsuccessul_activate_deactivate_calls_charges_fees() { ); }); } + +#[test] +#[serial] +fn mat() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .issue(EVE, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session(1); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(0) + ); + + roll_to_session(2); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(0) + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1000) + ); + // + // roll_to_session(3); + // assert_eq!( + // ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + // Ok(1500) + // ); + // assert_eq!( + // ProofOfStake::calculate_3rdparty_rewards_amount( + // CHARLIE, + // LIQUIDITY_TOKEN, + // REWARD_TOKEN + // ), + // Ok(500) + // ); + }); +} From 545627243758389fe35b5839ffb50de6afad5667 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sat, 14 Oct 2023 12:12:11 +0000 Subject: [PATCH 043/125] progress on schedudle rewards calculation --- pallets/proof-of-stake/src/lib.rs | 75 ++++++++++++++++------- pallets/proof-of-stake/src/reward_info.rs | 2 +- 2 files changed, 53 insertions(+), 24 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index a58f06aabb..f1a36e8cae 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -189,7 +189,7 @@ pub mod pallet { impl Hooks for Pallet { fn on_initialize(n: T::BlockNumber) -> Weight { - if frame_system::Pallet::::block_number().saturated_into::() % 5u64 == 0 { + if Self::session_index() == 0 { ScheduleListPos::::kill(); return Default::default(); } @@ -209,7 +209,7 @@ pub mod pallet { // TODO: make configurable // NOTE: 3R + 1R - let session_id = frame_system::Pallet::::block_number().saturated_into::() / 5u64; + let session_id = Self::session_index() as u64; for idx in 0..AMOUNT_PER_BLOCK { @@ -503,11 +503,11 @@ pub mod pallet { /// Total amount of activated liquidity for each schedule #[pallet::storage] pub type TotalActivatedLiquidityForSchedules = - StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (u64, u128), ValueQuery>; + StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (u128, u64, u128), ValueQuery>; - #[pallet::storage] - pub type PrevTotalActivatedLiquidityForSchedules = - StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, u128, ValueQuery>; + // #[pallet::storage] + // pub type PrevTotalActivatedLiquidityForSchedules = + // StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, u128, ValueQuery>; /// Tracks how much liquidity user activated for particular (liq token, reward token) pair /// StorageNMap was used because it only require single read to know if user deactivated all @@ -791,31 +791,60 @@ pub mod pallet { impl Pallet { fn total_activated_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ - let (idx, amount) = TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward); - println!("total_activated_liquidity idx: {} amount: {}", idx, amount); - if idx == (frame_system::Pallet::::block_number().saturated_into::() / 5){ - amount + let (pending, idx, cumulative) = TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward); + if idx == (Self::session_index() as u64){ + println!("total_activated_liquidity idx: {} amount: {}", idx, cumulative); + cumulative }else{ - PrevTotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward) + println!("total_activated_liquidity idx: {} amount: {}", idx, cumulative + pending); + cumulative + pending } } + fn total_schedule_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ + let (pending, idx, cumulative) = ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Self::session_index() as u64){ + println!("total_activated_liquidity idx: {} amount: {}", idx, cumulative); + cumulative + }else{ + println!("total_activated_liquidity idx: {} amount: {}", idx, cumulative + pending); + cumulative + pending + } + } + + fn update_total_activated_liqudity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, diff: Balance, change: bool) { // TODO: make configurable - let session_id = frame_system::Pallet::::block_number().saturated_into::() / 5; - println!("UPDATE_TOTAL_ACTIVATED_LIQUDITY liq: {} reward:{} amount:{}", liquidity_asset_id, liquidity_assets_reward, diff); - if let Ok((idx, amount)) = TotalActivatedLiquidityForSchedules::::try_get(liquidity_asset_id, liquidity_assets_reward){ - let new_amount = if change{ - amount + diff + let session_id = Self::session_index() as u64; + + TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |(pending, idx, cumulative)|{ + if *idx == session_id { + let new_amount = if change{ + *pending + diff + }else{ + *pending - diff + }; + *pending = new_amount; }else{ - amount - diff - }; - - if session_id > idx { - PrevTotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |val| *val += amount); + // NOTE: handle burn so negative diff + *cumulative += *pending; + *pending = diff; } - TotalActivatedLiquidityForSchedules::::insert(liquidity_asset_id, liquidity_assets_reward, (session_id, new_amount)); - } + }); + + + // println!("UPDATE_TOTAL_ACTIVATED_LIQUDITY liq: {} reward:{} amount:{}", liquidity_asset_id, liquidity_assets_reward, diff); + // if let Ok((idx, amount)) = TotalActivatedLiquidityForSchedules::::try_get(liquidity_asset_id, liquidity_assets_reward){ + // + // if session_id > idx { + // PrevTotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |val| *val += amount); + // TotalActivatedLiquidityForSchedules::::insert(liquidity_asset_id, liquidity_assets_reward, (session_id, 0)); + // }else{ + // TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |(session_id, new_amount)| amount += kkj); + // } + // }else{ + // TotalActivatedLiquidityForSchedules::::insert(liquidity_asset_id, liquidity_assets_reward, (session_id, new_amount)); + // } } fn activate_liquidity_for_native_rewards_impl( diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 0110ba03fe..13725512f9 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -88,7 +88,7 @@ impl RewardsCalculator { // NOTE: take into acout previous rewards (prev + rewards/activated) let total_activated = Pallet::::total_activated_liquidity(asset_id, reward_asset_id); - let total_rewards = crate::ScheduleRewardsTotal::::get((asset_id, reward_asset_id)).2; + let total_rewards = Pallet::::total_schedule_rewards(asset_id, reward_asset_id); println!("REWARDS CALCULATOR at {} for {}", current_time, user); println!("total_activated : {}", total_activated); println!("total_rewards : {}", total_rewards); From 6e6746c5e31d72c9cdbdd2f91230f09735e4b696 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sat, 14 Oct 2023 12:40:04 +0000 Subject: [PATCH 044/125] simple scenario still fails --- pallets/proof-of-stake/src/lib.rs | 12 ++++++---- pallets/proof-of-stake/src/reward_info.rs | 2 +- pallets/proof-of-stake/src/tests.rs | 28 +++++++++++------------ 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index f1a36e8cae..100db25281 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -793,10 +793,10 @@ impl Pallet { fn total_activated_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ let (pending, idx, cumulative) = TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward); if idx == (Self::session_index() as u64){ - println!("total_activated_liquidity idx: {} amount: {}", idx, cumulative); + println!("total_activated_liquidity cumulative idx: {} amount: {}", idx, cumulative); cumulative }else{ - println!("total_activated_liquidity idx: {} amount: {}", idx, cumulative + pending); + println!("total_activated_liquidity cumulative +pending idx: {} amount: {}", idx, cumulative + pending); cumulative + pending } } @@ -804,10 +804,10 @@ impl Pallet { fn total_schedule_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ let (pending, idx, cumulative) = ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); if idx == (Self::session_index() as u64){ - println!("total_activated_liquidity idx: {} amount: {}", idx, cumulative); + println!("total_activated_liquidity cumulative idx: {} amount: {}", idx, cumulative); cumulative }else{ - println!("total_activated_liquidity idx: {} amount: {}", idx, cumulative + pending); + println!("total_activated_liquidity cumulative + pending idx: {} amount: {}", idx, cumulative + pending); cumulative + pending } } @@ -817,6 +817,7 @@ impl Pallet { // TODO: make configurable let session_id = Self::session_index() as u64; + println!("update_total_activated_liqudity before {:?}", TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward)); TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |(pending, idx, cumulative)|{ if *idx == session_id { let new_amount = if change{ @@ -826,11 +827,14 @@ impl Pallet { }; *pending = new_amount; }else{ + println!("update_total_activated_liqudity swithc {}", diff); // NOTE: handle burn so negative diff *cumulative += *pending; *pending = diff; + *idx = session_id; } }); + println!("update_total_activated_liqudity after {:?}", TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward)); // println!("UPDATE_TOTAL_ACTIVATED_LIQUDITY liq: {} reward:{} amount:{}", liquidity_asset_id, liquidity_assets_reward, diff); diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 13725512f9..848430c858 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -92,7 +92,7 @@ impl RewardsCalculator { println!("REWARDS CALCULATOR at {} for {}", current_time, user); println!("total_activated : {}", total_activated); println!("total_rewards : {}", total_rewards); - let pool_ratio_current = total_rewards.checked_div(total_activated).unwrap_or_default(); + let pool_ratio_current = U256::from(total_rewards.checked_div(total_activated).unwrap_or_default()) * U256::from(u128::MAX); // let pool_map = crate::ScheduleRewardsPerSingleLiquidity::::get(); diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 0feaf42496..cd970c5acc 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -3306,19 +3306,19 @@ fn mat() { ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(1000) ); - // - // roll_to_session(3); - // assert_eq!( - // ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), - // Ok(1500) - // ); - // assert_eq!( - // ProofOfStake::calculate_3rdparty_rewards_amount( - // CHARLIE, - // LIQUIDITY_TOKEN, - // REWARD_TOKEN - // ), - // Ok(500) - // ); + + roll_to_session(3); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1500) + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(500) + ); }); } From f7d5964e68bdb3973f96b4c6994378112990df78 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 23 Oct 2023 16:21:00 +0000 Subject: [PATCH 045/125] cumulative calculations --- pallets/proof-of-stake/src/lib.rs | 69 ++++++++++++++++++----- pallets/proof-of-stake/src/reward_info.rs | 18 +++--- pallets/proof-of-stake/src/tests.rs | 5 +- 3 files changed, 67 insertions(+), 25 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 100db25281..2a5dd37f92 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -97,6 +97,7 @@ pub type ScheduleId = u64; #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] pub struct Schedule{ + scheduled_at: u64, last_session: u64, liq_token: TokenId, reward_token: TokenId, @@ -189,7 +190,8 @@ pub mod pallet { impl Hooks for Pallet { fn on_initialize(n: T::BlockNumber) -> Weight { - if Self::session_index() == 0 { + + if frame_system::Pallet::::block_number().saturated_into::() % T::RewardsDistributionPeriod::get() == 0u32 { ScheduleListPos::::kill(); return Default::default(); } @@ -236,15 +238,19 @@ pub mod pallet { if let Some(pos_val) = pos { if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ if schedule.last_session >= session_id{ - ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token), |(pending, idx, cumulative)|{ - if *idx >= session_id { - *pending += schedule.amount_per_session - }else{ - *cumulative += *pending; - *pending = schedule.amount_per_session; - *idx = session_id; - } - }); + + if schedule.scheduled_at < session_id{ + ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token), |(pending, idx, cumulative)|{ + if *idx >= session_id { + *pending += schedule.amount_per_session + }else{ + *cumulative += *pending; + *pending = schedule.amount_per_session; + *idx = session_id; + } + println!("=====> SCHEDULEREWARDSTOTAL : cumulative: {} pending: {}", *cumulative, *pending); + }); + } ScheduleListPos::::put(pos_val); }else{ match(Self::head(), Self::tail()){ @@ -287,6 +293,7 @@ pub mod pallet { } } else{ + println!("###############################################"); break; } } @@ -459,6 +466,9 @@ pub mod pallet { #[pallet::storage] pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat ,(TokenId, TokenId), (u128, u64, u128), ValueQuery>; + #[pallet::storage] + pub type ScheduleRewardsPerLiquidity = StorageMap<_, Twox64Concat ,(TokenId, TokenId), (U256, u64), ValueQuery>; + /// How much scheduled rewards per single liquidty_token should be distribute_rewards /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic // #[pallet::storage] @@ -790,13 +800,44 @@ pub mod pallet { impl Pallet { + fn update_cumulative_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> U256{ + let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Self::session_index() as u64){ + println!("update_cumulative_rewards cumulative idx: {} amount: {}", idx, cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default()); + cumulative + }else{ + let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); + let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)).checked_div(U256::from(total_activated_liquidity)).unwrap_or_default(); + println!("update_cumulative_rewards cumulative + pending idx: {} amount: {}", idx, (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default()); + ScheduleRewardsPerLiquidity::::insert((liquidity_asset_id, liquidity_assets_reward), (cumulative + pending, (Self::session_index() as u64))); + cumulative + pending + } + } + + + fn total_rewards_for_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> U256{ + let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Self::session_index() as u64){ + println!("total_rewards_for_liquidity cumulative idx: {} amount: {}", idx, cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default()); + cumulative + }else{ + let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); + let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)).checked_div(U256::from(total_activated_liquidity)).unwrap_or_default(); + println!("total_rewards_for_liquidity cumulative + pending idx: {} amount: {}", idx, (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default()); + cumulative + pending + } + } + + fn total_activated_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ let (pending, idx, cumulative) = TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward); if idx == (Self::session_index() as u64){ println!("total_activated_liquidity cumulative idx: {} amount: {}", idx, cumulative); cumulative }else{ - println!("total_activated_liquidity cumulative +pending idx: {} amount: {}", idx, cumulative + pending); + println!("total_activated_liquidity cumulative + pending idx: {} amount: {}", idx, cumulative + pending); cumulative + pending } } @@ -804,10 +845,10 @@ impl Pallet { fn total_schedule_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ let (pending, idx, cumulative) = ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); if idx == (Self::session_index() as u64){ - println!("total_activated_liquidity cumulative idx: {} amount: {}", idx, cumulative); + println!("total_schedule_rewards cumulative idx: {} amount: {}", idx, cumulative); cumulative }else{ - println!("total_activated_liquidity cumulative + pending idx: {} amount: {}", idx, cumulative + pending); + println!("total_schedule_rewards cumulative + pending idx: {} amount: {}", idx, cumulative + pending); cumulative + pending } } @@ -1166,6 +1207,7 @@ impl Pallet { ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::update_cumulative_rewards(liquidity_asset_id, liquidity_assets_reward); { let calc = RewardsCalculator::schedule_rewards::( user.clone(), @@ -1429,6 +1471,7 @@ impl Pallet { let head = ScheduleListHead::::get(); let tail = ScheduleListTail::::get(); let schedule = Schedule{ + scheduled_at: Self::session_index() as u64, last_session: schedule_end.saturated_into::(), liq_token: liquidity_token_id, reward_token: token_id, diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 848430c858..ef979c1009 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -87,17 +87,13 @@ impl RewardsCalculator { ); // NOTE: take into acout previous rewards (prev + rewards/activated) - let total_activated = Pallet::::total_activated_liquidity(asset_id, reward_asset_id); - let total_rewards = Pallet::::total_schedule_rewards(asset_id, reward_asset_id); - println!("REWARDS CALCULATOR at {} for {}", current_time, user); - println!("total_activated : {}", total_activated); - println!("total_rewards : {}", total_rewards); - let pool_ratio_current = U256::from(total_rewards.checked_div(total_activated).unwrap_or_default()) * U256::from(u128::MAX); - - // let pool_map = crate::ScheduleRewardsPerSingleLiquidity::::get(); - - // let pool_ratio_current = - // pool_map.get(&(asset_id, reward_asset_id)).cloned().unwrap_or(U256::from(0)); + // let total_activated = Pallet::::total_activated_liquidity(asset_id, reward_asset_id); + // let total_rewards = Pallet::::total_schedule_rewards(asset_id, reward_asset_id); + // println!("REWARDS CALCULATOR at {} for {}", current_time, user); + // println!("total_activated : {}", total_activated); + // println!("total_rewards : {}", total_rewards); + // let pool_ratio_current = U256::from(total_rewards.checked_div(total_activated).unwrap_or_default()) * U256::from(u128::MAX); + let pool_ratio_current = Pallet::::total_rewards_for_liquidity(asset_id, reward_asset_id); let default_rewards = RewardInfo { activated_amount: 0_u128, diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index cd970c5acc..6b2c359eb2 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1394,6 +1394,7 @@ fn rewards_schedule_is_stored() { assert_eq!( RewardsSchedulesList::::get(0).unwrap(), (Schedule{ + scheduled_at: 0u64, last_session: 5u64, liq_token: LIQUIDITY_TOKEN, reward_token: REWARD_TOKEN, @@ -1445,6 +1446,7 @@ fn rewards_linked_list_insert_multiple_schedules() { assert_eq!( RewardsSchedulesList::::get(0).unwrap(), (Schedule{ + scheduled_at: 0u64, last_session: 1u64, liq_token: LIQUIDITY_TOKEN, reward_token: REWARD_TOKEN, @@ -1455,6 +1457,7 @@ fn rewards_linked_list_insert_multiple_schedules() { assert_eq!( RewardsSchedulesList::::get(1).unwrap(), (Schedule{ + scheduled_at: 0u64, last_session: 2u64, liq_token: LIQUIDITY_TOKEN, reward_token: REWARD_TOKEN, @@ -3240,7 +3243,7 @@ fn unsuccessul_activate_deactivate_calls_charges_fees() { #[test] #[serial] -fn mat() { +fn matt() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) From c849265143392c4de91fdef9e1d0c30ead998a53 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 24 Oct 2023 04:46:29 +0000 Subject: [PATCH 046/125] align tests for linked list --- pallets/proof-of-stake/src/lib.rs | 13 +++++++-- pallets/proof-of-stake/src/tests.rs | 44 ++++++++++++++--------------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 2a5dd37f92..84cd51bf13 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -823,14 +823,13 @@ impl Pallet { cumulative }else{ let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); - let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + let (_, total_schedule_rewards) = Self::total_schedule_rewards_parts(liquidity_asset_id, liquidity_assets_reward); let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)).checked_div(U256::from(total_activated_liquidity)).unwrap_or_default(); println!("total_rewards_for_liquidity cumulative + pending idx: {} amount: {}", idx, (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default()); cumulative + pending } } - fn total_activated_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ let (pending, idx, cumulative) = TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward); if idx == (Self::session_index() as u64){ @@ -853,6 +852,16 @@ impl Pallet { } } + fn total_schedule_rewards_parts(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> (Balance, Balance){ + let (pending, idx, cumulative) = ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Self::session_index() as u64){ + println!("total_schedule_rewards_parts at {} (cumulative , pending) idx: ({}, {})", idx, cumulative , pending); + (cumulative, pending) + }else{ + println!("total_schedule_rewards_parts at {} (cumulative , pending) idx: ({}, {})", idx, cumulative , pending); + (cumulative, pending) + } + } fn update_total_activated_liqudity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, diff: Balance, change: bool) { // TODO: make configurable diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 6b2c359eb2..822c996083 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1525,33 +1525,31 @@ fn rewards_linked_list_removes_outdated_schedule_automatically() { assert_eq!( ScheduleListHead::::get(), Some(0u64)); assert_eq!( ScheduleListTail::::get(), Some(1u64)); - assert_eq!( ScheduleListPos::::get(), None,); - - forward_to_block(10); + assert_eq!( ScheduleListPos::::get(), Some(1u64)); + forward_to_block(11); assert_eq!( ScheduleListHead::::get(), Some(0u64)); assert_eq!( ScheduleListTail::::get(), Some(1u64)); - assert_eq!( ScheduleListPos::::get(), None,); - - forward_to_block(11); + assert_eq!( ScheduleListPos::::get(), Some(1u64)); + forward_to_block(21); assert_eq!( ScheduleListHead::::get(), Some(1u64)); assert_eq!( ScheduleListTail::::get(), Some(1u64)); - assert_eq!( ScheduleListPos::::get(), Some(1u64),); - - forward_to_block(15); + assert_eq!( ScheduleListPos::::get(), Some(1u64)); + forward_to_block(25); assert_eq!( ScheduleListHead::::get(), Some(1u64)); assert_eq!( ScheduleListTail::::get(), Some(1u64)); - assert_eq!( ScheduleListPos::::get(), None); + assert_eq!( ScheduleListPos::::get(), Some(1u64)); - forward_to_block(16); + forward_to_block(30); + assert_eq!( ScheduleListHead::::get(), Some(1u64)); + assert_eq!( ScheduleListTail::::get(), Some(1u64)); + forward_to_block(31); assert_eq!( ScheduleListHead::::get(), None); assert_eq!( ScheduleListTail::::get(), None); assert_eq!( ScheduleListPos::::get(), None); - - }); } @@ -1597,7 +1595,7 @@ fn rewards_first_schedule_from_linked_list_of_four() { assert_eq!( ScheduleListPos::::get(), None); assert_eq!( ScheduleListTail::::get(), Some(3u64)); - forward_to_block(11); + forward_to_block(21); assert_eq!( ScheduleListHead::::get(), Some(1u64)); assert_eq!( ScheduleListTail::::get(), Some(3u64)); @@ -1633,7 +1631,7 @@ fn remove_last_schedule_from_linked_list() { assert_eq!( ScheduleListPos::::get(), None); assert_eq!( ScheduleListTail::::get(), Some(3u64)); - forward_to_block(11); + forward_to_block(21); assert_eq!( ScheduleListHead::::get(), Some(0u64)); assert_eq!( ScheduleListTail::::get(), Some(2u64)); @@ -1671,7 +1669,7 @@ fn remove_middle_schedule_from_linked_list() { assert_eq!( ScheduleListPos::::get(), None); assert_eq!( ScheduleListTail::::get(), Some(3u64)); - forward_to_block(11); + forward_to_block(21); assert_eq!( ScheduleListHead::::get(), Some(0u64)); assert_eq!( ScheduleListTail::::get(), Some(3u64)); @@ -1708,7 +1706,7 @@ fn remove_first_few_elems_at_once_from_linked_list() { assert_eq!( ScheduleListPos::::get(), None); assert_eq!( ScheduleListTail::::get(), Some(3u64)); - forward_to_block(11); + forward_to_block(21); assert_eq!( ScheduleListHead::::get(), Some(2u64)); assert_eq!( ScheduleListTail::::get(), Some(3u64)); @@ -1743,7 +1741,7 @@ fn remove_few_last_elems_at_once_from_linked_list() { assert_eq!( ScheduleListPos::::get(), None); assert_eq!( ScheduleListTail::::get(), Some(3u64)); - forward_to_block(11); + forward_to_block(21); assert_eq!( ScheduleListHead::::get(), Some(0u64)); assert_eq!( ScheduleListTail::::get(), Some(1u64)); @@ -1778,7 +1776,7 @@ fn remove_few_middle_elements_from_linkedd_list() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(3u64)); - forward_to_block(11); + forward_to_block(21); assert_eq!( ScheduleListHead::::get(), Some(0u64)); assert_eq!( ScheduleListTail::::get(), Some(3u64)); @@ -1815,7 +1813,7 @@ fn remove_random_elements_from_linked_list() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(4u64)); - forward_to_block(11); + forward_to_block(21); assert_eq!( ScheduleListHead::::get(), Some(0u64)); assert_eq!( ScheduleListTail::::get(), Some(4u64)); @@ -1850,7 +1848,7 @@ fn remove_random_elements_from_linked_list_over_time() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(6u64)); - forward_to_block(14); + forward_to_block(24); assert_eq!( ScheduleListHead::::get(), Some(0u64)); assert_eq!( ScheduleListTail::::get(), Some(6u64)); @@ -1860,7 +1858,7 @@ fn remove_random_elements_from_linked_list_over_time() { assert_eq!( RewardsSchedulesList::::get(4u64).unwrap().1, Some(6u64)); assert_eq!( RewardsSchedulesList::::get(6u64).unwrap().1, None); - forward_to_block(19); + forward_to_block(40); assert_eq!( ScheduleListHead::::get(), Some(0u64)); assert_eq!( ScheduleListTail::::get(), Some(6u64)); @@ -1899,7 +1897,7 @@ fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(8u64)); - forward_to_block(14); + forward_to_block(24); assert_eq!( ScheduleListHead::::get(), Some(0u64)); assert_eq!( ScheduleListTail::::get(), Some(8u64)); From a18d08783394eb8eed9974fa87d241bc2f4aa079 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 24 Oct 2023 15:49:31 +0000 Subject: [PATCH 047/125] almost working --- pallets/proof-of-stake/src/lib.rs | 53 ++-- pallets/proof-of-stake/src/reward_info.rs | 4 + pallets/proof-of-stake/src/tests.rs | 307 ++++++++++++++++++---- 3 files changed, 289 insertions(+), 75 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 84cd51bf13..542d68e503 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -190,33 +190,34 @@ pub mod pallet { impl Hooks for Pallet { fn on_initialize(n: T::BlockNumber) -> Weight { + let session_id = Self::session_index() as u64; + + + println!("=================> ON_INITIALIZE {} : {}", n, session_id); if frame_system::Pallet::::block_number().saturated_into::() % T::RewardsDistributionPeriod::get() == 0u32 { ScheduleListPos::::kill(); return Default::default(); } - println!("on_initialize {}", n); + // println!("on_initialize {}", n); const AMOUNT_PER_BLOCK: u64 = 5; - // NOTE: 3R - println!("ScheduleListPos : {:?}", ScheduleListPos::::get()); - println!("ScheduleListHead : {:?}", ScheduleListHead::::get()); - println!("ScheduleListTail : {:?}", ScheduleListTail::::get()); + // // NOTE: 3R + // println!("ScheduleListPos : {:?}", ScheduleListPos::::get()); + // println!("ScheduleListHead : {:?}", ScheduleListHead::::get()); + // println!("ScheduleListTail : {:?}", ScheduleListTail::::get()); // 1R 1W 15RW //NOTE: 5 transfers => 15R 15W - // TODO: make configurable // NOTE: 3R + 1R - let session_id = Self::session_index() as u64; - - + // TODO: make configurable for idx in 0..AMOUNT_PER_BLOCK { - println!("iter {}:{}", n, idx); - println!("session_id : {:?}", session_id); + // println!("iter {}:{}", n, idx); + // println!("session_id : {:?}", session_id); let last_valid = ScheduleListPos::::get(); let pos = match ( last_valid, ScheduleListHead::::get() ){ @@ -232,8 +233,8 @@ pub mod pallet { }, _ => { None }, }; - println!("last_valid : {:?}", last_valid); - println!("pos : {:?}", pos); + // println!("last_valid : {:?}", last_valid); + // println!("pos : {:?}", pos); if let Some(pos_val) = pos { if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ @@ -248,7 +249,7 @@ pub mod pallet { *pending = schedule.amount_per_session; *idx = session_id; } - println!("=====> SCHEDULEREWARDSTOTAL : cumulative: {} pending: {}", *cumulative, *pending); + println!("=====> SCHEDULEREWARDSTOTAL : ({}:{}) cumulative: {} pending: {}", schedule.liq_token, schedule.reward_token ,*cumulative, *pending); }); } ScheduleListPos::::put(pos_val); @@ -293,7 +294,7 @@ pub mod pallet { } } else{ - println!("###############################################"); + // println!("###############################################"); break; } } @@ -735,6 +736,7 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; + Self::update_cumulative_rewards(liquidity_token_id, reward_token); Self::claim_schedule_rewards_all_impl(sender, liquidity_token_id, reward_token)?; Ok(()) } @@ -800,18 +802,23 @@ pub mod pallet { impl Pallet { - fn update_cumulative_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> U256{ + fn update_cumulative_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) { let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); if idx == (Self::session_index() as u64){ println!("update_cumulative_rewards cumulative idx: {} amount: {}", idx, cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default()); - cumulative }else{ let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); + // let (_, total_schedule_rewards) = Self::total_schedule_rewards_parts(liquidity_asset_id, liquidity_assets_reward); let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); - let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)).checked_div(U256::from(total_activated_liquidity)).unwrap_or_default(); - println!("update_cumulative_rewards cumulative + pending idx: {} amount: {}", idx, (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default()); - ScheduleRewardsPerLiquidity::::insert((liquidity_asset_id, liquidity_assets_reward), (cumulative + pending, (Self::session_index() as u64))); - cumulative + pending + if total_activated_liquidity > 0 { + ScheduleRewardsTotal::::mutate((liquidity_asset_id, liquidity_assets_reward), |(cumulative, _, _)|{ + *cumulative = 0; + }); + let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)).checked_div(U256::from(total_activated_liquidity)).unwrap_or_default(); + println!("update_cumulative_rewards cumulative + pending idx: {} RAW amount: {}", idx, cumulative + pending); + println!("update_cumulative_rewards cumulative + pending idx: {} amount: {}", idx, (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default()); + ScheduleRewardsPerLiquidity::::insert((liquidity_asset_id, liquidity_assets_reward), (cumulative + pending, (Self::session_index() as u64))); + } } } @@ -819,11 +826,13 @@ impl Pallet { fn total_rewards_for_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> U256{ let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); if idx == (Self::session_index() as u64){ + println!("total_rewards_for_liquidity cumulative idx: {} RAW amount: {}", idx, cumulative); println!("total_rewards_for_liquidity cumulative idx: {} amount: {}", idx, cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default()); cumulative }else{ let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); - let (_, total_schedule_rewards) = Self::total_schedule_rewards_parts(liquidity_asset_id, liquidity_assets_reward); + // let (_, total_schedule_rewards) = Self::total_schedule_rewards_parts(liquidity_asset_id, liquidity_assets_reward); + let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)).checked_div(U256::from(total_activated_liquidity)).unwrap_or_default(); println!("total_rewards_for_liquidity cumulative + pending idx: {} amount: {}", idx, (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default()); cumulative + pending diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index ef979c1009..7e016ba7c6 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -94,6 +94,7 @@ impl RewardsCalculator { // println!("total_rewards : {}", total_rewards); // let pool_ratio_current = U256::from(total_rewards.checked_div(total_activated).unwrap_or_default()) * U256::from(u128::MAX); let pool_ratio_current = Pallet::::total_rewards_for_liquidity(asset_id, reward_asset_id); + println!("SCHEDULE REWARDS RATIO: {}", pool_ratio_current); let default_rewards = RewardInfo { activated_amount: 0_u128, @@ -195,6 +196,7 @@ impl CurveRewards for ConstCurveRewards { let rewards_base: U256 = U256::from(user_info.activated_amount) .checked_mul(pool_rewards_ratio_new)? .checked_div(U256::from(u128::MAX))?; // always fit into u128 + println!("REWARDS : {}", rewards_base); rewards_base.try_into().ok() } @@ -288,6 +290,7 @@ impl RewardsCalculator { pub fn claim_rewards(self) -> sp_std::result::Result<(RewardInfo, Balance), RewardsCalcError> { let current_rewards = self.calculate_rewards_impl()?; + println!("TOTAL AVAILABLE: {:?}", current_rewards); let total_available_rewards = current_rewards .checked_add(self.rewards_info.rewards_not_yet_claimed) .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) @@ -301,6 +304,7 @@ impl RewardsCalculator { } pub fn calculate_rewards(self) -> sp_std::result::Result { + println!("calculate_rewards !!!!!"); self.calculate_rewards_impl() } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 822c996083..5b42307a7d 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1911,6 +1911,7 @@ fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { } #[test] +#[ignore] #[serial] fn number_of_active_schedules_is_limited() { ExtBuilder::new().issue(ALICE, REWARD_TOKEN, MILLION).build().execute_with(|| { @@ -1968,6 +1969,15 @@ fn duplicated_schedules_works() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); + assert_eq!( + ScheduleListHead::::get(), + None + ); + assert_eq!( + ScheduleListTail::::get(), + None + ); + assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -1976,7 +1986,14 @@ fn duplicated_schedules_works() { 5u32.into() )); - assert_eq!(1, ProofOfStake::schedules().len()); + assert_eq!( + ScheduleListHead::::get(), + Some(0u64) + ); + assert_eq!( + ScheduleListTail::::get(), + Some(0u64) + ); assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1985,7 +2002,15 @@ fn duplicated_schedules_works() { REWARD_AMOUNT / 2, 5u32.into() )); - assert_eq!(2, ProofOfStake::schedules().len()); + + assert_eq!( + ScheduleListHead::::get(), + Some(0u64) + ); + assert_eq!( + ScheduleListTail::::get(), + Some(1u64) + ); }); } @@ -2123,6 +2148,7 @@ fn user_can_claim_3rdparty_rewards() { ); roll_to_session(2); + println!("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, @@ -2145,6 +2171,7 @@ fn user_can_claim_3rdparty_rewards() { ); roll_to_session(3); + println!("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(1500) @@ -2190,56 +2217,29 @@ fn overlapping_3rdparty_rewards_works() { .unwrap(); roll_to_session(1); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - first_reward_token, - None, - ) - .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_reward_token, None,) .unwrap(); roll_to_session(5); let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - pair, - second_reward_token_id, - 100_000, - 15u32.into(), - ) - .unwrap(); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - second_reward_token_id, - None, - ) - .unwrap(); + ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), pair, second_reward_token_id, 100_000, 15u32.into(),) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_reward_token_id, None,) .unwrap(); - roll_to_session(6); + roll_to_session(7); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_amount( - BOB, - LIQUIDITY_TOKEN, - second_reward_token_id - ), + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, second_reward_token_id), Ok(10000) ); + println!("############################## ##############################"); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_amount( - BOB, - LIQUIDITY_TOKEN, - first_reward_token - ), - Ok(5000) + ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, first_reward_token), + Ok(6000) ); }); } + #[test] #[serial] fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { @@ -3029,6 +3029,8 @@ fn can_claim_schedule_rewards() { 10u32.into(), ) .unwrap(); + + println!(">>>>>>>>>>>>>>>>>>>>>> ACTIVATE"); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -3037,6 +3039,7 @@ fn can_claim_schedule_rewards() { None, ) .unwrap(); + println!(">>>>>>>>>>>>>>>>>>>>>> ACTIVATE"); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -3046,27 +3049,26 @@ fn can_claim_schedule_rewards() { ) .unwrap(); - roll_to_session(1); + forward_to_block(20); assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 0,); assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 0,); - ProofOfStake::claim_3rdparty_rewards( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - FIRST_REWARD_TOKEN, - ) - .unwrap(); + assert_eq!(ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN,) .unwrap(), 1000); + assert_eq!(ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN,) .unwrap(), 1000); - ProofOfStake::claim_3rdparty_rewards( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - SECOND_REWARD_TOKEN, - ) - .unwrap(); + ProofOfStake::claim_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN,) .unwrap(); + + assert_eq!(ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN,) .unwrap(), 0); + assert_eq!(ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN,) .unwrap(), 1000); + + ProofOfStake::claim_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN,) .unwrap(); - assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 1000,); - assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 1000,); + assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN,) .unwrap(), 0); + assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN,) .unwrap(), 0); + + assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 1000); + assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 1000); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( @@ -3157,6 +3159,7 @@ use frame_support::dispatch::{GetDispatchInfo, Pays}; use sp_runtime::{traits::Dispatchable, Permill}; #[test] +#[ignore] #[serial] fn activate_deactivate_calls_are_free_of_charge() { ExtBuilder::new() @@ -3239,6 +3242,67 @@ fn unsuccessul_activate_deactivate_calls_charges_fees() { }); } + +#[test] +#[serial] +fn claim_rewards_from_multiple_sessions_at_once() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .issue(EVE, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); + TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session(1); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(0) + ); + + roll_to_session(2); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1000) + ); + + roll_to_session(5); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(4000) + ); + }); +} + #[test] #[serial] fn matt() { @@ -3323,3 +3387,140 @@ fn matt() { ); }); } + +#[test] +#[serial] +fn test_all_scheduled_rewards_are_distributed_when_activated_instantly() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session(12); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(REWARD_AMOUNT) + ); + }); +} + +#[test] +#[serial] +fn test_all_scheduled_rewards_are_distributed_when_activated_after_few_sessions() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + + roll_to_session(7); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session(15); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(REWARD_AMOUNT) + ); + }); +} + +#[test] +#[serial] +fn test_all_scheduled_rewards_are_distributed_when_activated_schedule_is_finished() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + + + roll_to_session(15); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session(16); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(REWARD_AMOUNT) + ); + }); +} From 7e209c8c9e211d8dfd1aa071319f042ba136d4f4 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 24 Oct 2023 16:30:12 +0000 Subject: [PATCH 048/125] missing I256 --- Cargo.lock | 1 + pallets/proof-of-stake/Cargo.toml | 1 + pallets/proof-of-stake/src/lib.rs | 7 ++- pallets/proof-of-stake/src/tests.rs | 74 +++++++++++++++++++++++++---- 4 files changed, 73 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1102437ef3..1705c86419 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6820,6 +6820,7 @@ dependencies = [ "pallet-vesting-mangata", "pallet-xyk", "parity-scale-codec", + "primitive-types", "rustc-hex", "scale-info", "serde", diff --git a/pallets/proof-of-stake/Cargo.toml b/pallets/proof-of-stake/Cargo.toml index c6aedfa0ad..9c23e8e6f6 100644 --- a/pallets/proof-of-stake/Cargo.toml +++ b/pallets/proof-of-stake/Cargo.toml @@ -29,6 +29,7 @@ pallet-bootstrap = { default-features = false, path = "../bootstrap" } sp-arithmetic = { default-features = false, version = '6.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } libm = { default-features = false, git = "https://github.com/rust-lang/libm", rev="2f3fc968f43d345f9b449938d050a9ea46a04c83"} orml-tokens = { default-features = false, version = '0.4.1-dev' , git = "https://github.com/mangata-finance/open-runtime-module-library", branch = "mangata-dev" } +primitive-types = "0.12.0" pallet-vesting-mangata = { git = "https://github.com/mangata-finance/substrate", default-features = false, branch = "mangata-dev" } mangata-support = { default-features = false , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 542d68e503..23bd5b30c1 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -889,7 +889,11 @@ impl Pallet { println!("update_total_activated_liqudity swithc {}", diff); // NOTE: handle burn so negative diff *cumulative += *pending; - *pending = diff; + if change { + *pending = diff; + }else{ + *pending = -diff; + } *idx = session_id; } }); @@ -1321,6 +1325,7 @@ impl Pallet { reward_token: TokenId, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::update_cumulative_rewards(liquidity_asset_id, reward_token); let calc = RewardsCalculator::schedule_rewards::( user.clone(), diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 5b42307a7d..51e3d5b706 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -2366,11 +2366,7 @@ fn deactivate_3rdparty_rewards() { ); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_amount( - CHARLIE, - LIQUIDITY_TOKEN, - REWARD_TOKEN - ), + ProofOfStake::calculate_3rdparty_rewards_amount( CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(500) ); ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( @@ -2441,7 +2437,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); - roll_to_session(1); + roll_to_session(2); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![(FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 1 * 1000u128),] @@ -2463,7 +2459,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); - roll_to_session(2); + roll_to_session(3); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![ @@ -2488,7 +2484,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); - roll_to_session(3); + roll_to_session(4); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![ @@ -2514,7 +2510,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); - roll_to_session(4); + roll_to_session(5); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![ @@ -3524,3 +3520,63 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_schedule_is_finishe ); }); } + + +#[test] +#[serial] +fn test_multiple_activations_in_same_block() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + let amount = 10_000u128; + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + + + roll_to_session(1); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + + roll_to_session(2); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(REWARD_AMOUNT/10/2) + ); + }); +} From f09582b47d6425b7db12c5b070fe7573750ecaaf Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 25 Oct 2023 07:24:59 +0000 Subject: [PATCH 049/125] all tests passig --- pallets/proof-of-stake/src/lib.rs | 50 ++++++++----------- pallets/proof-of-stake/src/reward_info.rs | 2 - pallets/proof-of-stake/src/tests.rs | 61 +++++++++++------------ 3 files changed, 50 insertions(+), 63 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 23bd5b30c1..eac9a273e9 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -240,6 +240,7 @@ pub mod pallet { if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ if schedule.last_session >= session_id{ + println!("=====> SCHEDULEREWARDSTOTAL BEFORE : ({}:{}) : {:?}", schedule.liq_token, schedule.reward_token, schedule); if schedule.scheduled_at < session_id{ ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token), |(pending, idx, cumulative)|{ if *idx >= session_id { @@ -252,6 +253,7 @@ pub mod pallet { println!("=====> SCHEDULEREWARDSTOTAL : ({}:{}) cumulative: {} pending: {}", schedule.liq_token, schedule.reward_token ,*cumulative, *pending); }); } + println!("=====> SCHEDULEREWARDSTOTAL AFTER : ({}:{}) : {:?}", schedule.liq_token, schedule.reward_token, schedule); ScheduleListPos::::put(pos_val); }else{ match(Self::head(), Self::tail()){ @@ -514,7 +516,7 @@ pub mod pallet { /// Total amount of activated liquidity for each schedule #[pallet::storage] pub type TotalActivatedLiquidityForSchedules = - StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (u128, u64, u128), ValueQuery>; + StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (u128, u128, u64, u128), ValueQuery>; // #[pallet::storage] // pub type PrevTotalActivatedLiquidityForSchedules = @@ -808,7 +810,6 @@ impl Pallet { println!("update_cumulative_rewards cumulative idx: {} amount: {}", idx, cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default()); }else{ let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); - // let (_, total_schedule_rewards) = Self::total_schedule_rewards_parts(liquidity_asset_id, liquidity_assets_reward); let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); if total_activated_liquidity > 0 { ScheduleRewardsTotal::::mutate((liquidity_asset_id, liquidity_assets_reward), |(cumulative, _, _)|{ @@ -831,7 +832,6 @@ impl Pallet { cumulative }else{ let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); - // let (_, total_schedule_rewards) = Self::total_schedule_rewards_parts(liquidity_asset_id, liquidity_assets_reward); let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)).checked_div(U256::from(total_activated_liquidity)).unwrap_or_default(); println!("total_rewards_for_liquidity cumulative + pending idx: {} amount: {}", idx, (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default()); @@ -840,13 +840,13 @@ impl Pallet { } fn total_activated_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ - let (pending, idx, cumulative) = TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward); + let (pending_negative, pending_positive, idx, cumulative) = TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward); if idx == (Self::session_index() as u64){ println!("total_activated_liquidity cumulative idx: {} amount: {}", idx, cumulative); cumulative }else{ - println!("total_activated_liquidity cumulative + pending idx: {} amount: {}", idx, cumulative + pending); - cumulative + pending + println!("total_activated_liquidity cumulative + pending idx: {} amount: {}", idx, cumulative + pending_positive - pending_negative); + cumulative + pending_positive - pending_negative } } @@ -861,43 +861,33 @@ impl Pallet { } } - fn total_schedule_rewards_parts(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> (Balance, Balance){ - let (pending, idx, cumulative) = ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Self::session_index() as u64){ - println!("total_schedule_rewards_parts at {} (cumulative , pending) idx: ({}, {})", idx, cumulative , pending); - (cumulative, pending) - }else{ - println!("total_schedule_rewards_parts at {} (cumulative , pending) idx: ({}, {})", idx, cumulative , pending); - (cumulative, pending) - } - } - fn update_total_activated_liqudity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, diff: Balance, change: bool) { // TODO: make configurable let session_id = Self::session_index() as u64; - println!("update_total_activated_liqudity before {:?}", TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward)); - TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |(pending, idx, cumulative)|{ + println!("update_total_activated_liqudity BEFORE {:?}", TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward)); + TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |(pending_negative, pending_positive, idx, cumulative)|{ if *idx == session_id { - let new_amount = if change{ - *pending + diff + if change{ + *pending_positive += diff; }else{ - *pending - diff + *pending_negative += diff; }; - *pending = new_amount; }else{ - println!("update_total_activated_liqudity swithc {}", diff); + println!("update_total_activated_liqudity SWITCH {}", diff); // NOTE: handle burn so negative diff - *cumulative += *pending; - if change { - *pending = diff; + *cumulative = *cumulative + *pending_positive - *pending_negative; + if change{ + *pending_positive = diff; + *pending_negative = 0u128; }else{ - *pending = -diff; - } + *pending_positive = 0u128; + *pending_negative = diff; + }; *idx = session_id; } }); - println!("update_total_activated_liqudity after {:?}", TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward)); + println!("update_total_activated_liqudity AFTER {:?}", TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward)); // println!("UPDATE_TOTAL_ACTIVATED_LIQUDITY liq: {} reward:{} amount:{}", liquidity_asset_id, liquidity_assets_reward, diff); diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 7e016ba7c6..22708df840 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -290,7 +290,6 @@ impl RewardsCalculator { pub fn claim_rewards(self) -> sp_std::result::Result<(RewardInfo, Balance), RewardsCalcError> { let current_rewards = self.calculate_rewards_impl()?; - println!("TOTAL AVAILABLE: {:?}", current_rewards); let total_available_rewards = current_rewards .checked_add(self.rewards_info.rewards_not_yet_claimed) .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) @@ -304,7 +303,6 @@ impl RewardsCalculator { } pub fn calculate_rewards(self) -> sp_std::result::Result { - println!("calculate_rewards !!!!!"); self.calculate_rewards_impl() } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 51e3d5b706..01c237ce11 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -2293,7 +2293,7 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { ) .unwrap(); - roll_to_session(6); + roll_to_session(7); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( @@ -2310,7 +2310,7 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN ), - Ok(5000) + Ok(6000) ); }); } @@ -2447,7 +2447,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() FIRST_REWARDED_PAIR, SECOND_REWARD_TOKEN, 2 * REWARD_AMOUNT, - 11u32.into(), + 12u32.into(), ) .unwrap(); ProofOfStake::activate_liquidity_for_3rdparty_rewards( @@ -2464,6 +2464,16 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0 * 2000u128), + ] + ); + + roll_to_session(4); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + vec![ + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 3 * 1000u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), ] ); @@ -2472,7 +2482,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() SECOND_REWARDED_PAIR, FIRST_REWARD_TOKEN, REWARD_AMOUNT, - 12u32.into(), + 14u32.into(), ) .unwrap(); ProofOfStake::activate_liquidity_for_3rdparty_rewards( @@ -2484,13 +2494,13 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); - roll_to_session(4); + roll_to_session(5); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![ - (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 3 * 1000u128), + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 4 * 1000u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 2 * 2000u128), - (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 1 * 1000u128), + (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0 * 1000u128), ] ); ProofOfStake::reward_pool( @@ -2498,7 +2508,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() SECOND_REWARDED_PAIR, SECOND_REWARD_TOKEN, 2 * REWARD_AMOUNT, - 13u32.into(), + 15u32.into(), ) .unwrap(); ProofOfStake::activate_liquidity_for_3rdparty_rewards( @@ -2510,12 +2520,12 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); - roll_to_session(5); + roll_to_session(7); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![ - (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 4 * 1000u128), - (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 3 * 2000u128), + (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 6 * 1000u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 4 * 2000u128), (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), ] @@ -2532,16 +2542,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), - (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 3 * 2000u128), - (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), - (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), - ] - ); - assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), - vec![ - (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), - (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 3 * 2000u128), + (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 4 * 2000u128), (SECOND_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), (SECOND_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), ] @@ -2596,6 +2597,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ] ); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), FIRST_LIQUIDITY_TOKEN, @@ -2662,14 +2664,6 @@ fn liquidity_minting_liquidity_can_be_resused() { 10u32.into(), ) .unwrap(); - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - SECOND_REWARD_TOKEN, - 2 * REWARD_AMOUNT, - 10u32.into(), - ) - .unwrap(); ProofOfStake::activate_liquidity_for_native_rewards( RuntimeOrigin::signed(BOB), @@ -2687,9 +2681,8 @@ fn liquidity_minting_liquidity_can_be_resused() { ) .unwrap(); - roll_to_session(1); + roll_to_session(2); - assert_eq!(ProofOfStake::calculate_rewards_amount(BOB, LIQUIDITY_TOKEN), Ok(200)); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( BOB, @@ -3580,3 +3573,9 @@ fn test_multiple_activations_in_same_block() { ); }); } + + + +// how many blocks after activations rewards are avialabe +// deactivation in same & different blocks +// activation time does not matter From 5d95d4cc2d11bbe96d8248201e5b13fbf7b5fd17 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 25 Oct 2023 07:48:31 +0000 Subject: [PATCH 050/125] rewards_are_available_in_next_session_after_rewards_are_provided test addedd --- pallets/proof-of-stake/src/tests.rs | 59 ++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 01c237ce11..1f889009ab 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -3294,7 +3294,7 @@ fn claim_rewards_from_multiple_sessions_at_once() { #[test] #[serial] -fn matt() { +fn multi_user_rewards_distributeion_scenario() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) @@ -3575,7 +3575,62 @@ fn test_multiple_activations_in_same_block() { } +#[test] +#[serial] +fn rewards_are_available_in_next_session_after_rewards_are_provided() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 10*3*REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .issue(EVE, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + + ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, REWARD_TOKEN, 10 * 3 * REWARD_AMOUNT, 10u32.into(),) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + + + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + + roll_to_session(1); + + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + + roll_to_session(2); + + assert_eq!(15_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(15_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(EVE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + assert_eq!(15_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(15_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + + roll_to_session(3); + + assert_eq!(15_000u128 + 10_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(15_000u128 + 10_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(10_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + }); +} + + + -// how many blocks after activations rewards are avialabe +// multiple activates in same & different blocks // deactivation in same & different blocks // activation time does not matter From 67805d10f785cfaf3cd7945faefa5044980fd841 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 25 Oct 2023 11:08:27 +0000 Subject: [PATCH 051/125] add test multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedule --- pallets/proof-of-stake/src/tests.rs | 75 +++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 3 deletions(-) diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 1f889009ab..cca1a3b826 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -3628,9 +3628,78 @@ fn rewards_are_available_in_next_session_after_rewards_are_provided() { }); } +#[test] +#[serial] +fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedule() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 10*3*REWARD_AMOUNT) + .issue(ALICE, LIQUIDITY_TOKEN, 100) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .issue(EVE, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + + /// 1000 rewards per session + ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, REWARD_TOKEN, REWARD_AMOUNT, 10u32.into(),) .unwrap(); + + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(ALICE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + + + roll_to_session(2); + + assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(ALICE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 50, REWARD_TOKEN, None,) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(EVE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(ALICE), LIQUIDITY_TOKEN, 50, REWARD_TOKEN,) .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, REWARD_TOKEN,) .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(EVE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN,) .unwrap(); + + assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(ALICE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + + roll_to_session(3); + + assert_eq!(1000u128, ProofOfStake::calculate_3rdparty_rewards_amount(ALICE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(ALICE), LIQUIDITY_TOKEN, 50, REWARD_TOKEN,) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(ALICE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 50, REWARD_TOKEN, None,) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(EVE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + + assert_eq!(1000u128, ProofOfStake::calculate_3rdparty_rewards_amount(ALICE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + + + roll_to_session(4); + + assert_eq!(1249u128, ProofOfStake::calculate_3rdparty_rewards_amount(ALICE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(749u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(749u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!(249u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + }); +} -// multiple activates in same & different blocks -// deactivation in same & different blocks -// activation time does not matter From 605ac828256c8e42b74cac11708645cbfed12cd2 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 25 Oct 2023 11:09:07 +0000 Subject: [PATCH 052/125] fix formatting --- pallets/proof-of-stake/src/lib.rs | 486 +++++++---- pallets/proof-of-stake/src/reward_info.rs | 3 +- pallets/proof-of-stake/src/tests.rs | 979 +++++++++++++++------- 3 files changed, 979 insertions(+), 489 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index eac9a273e9..bbd89cc196 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -96,7 +96,7 @@ use frame_support::pallet_prelude::*; pub type ScheduleId = u64; #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub struct Schedule{ +pub struct Schedule { scheduled_at: u64, last_session: u64, liq_token: TokenId, @@ -106,7 +106,7 @@ pub struct Schedule{ use frame_benchmarking::Zero; use frame_support::{ - dispatch::{DispatchError, DispatchErrorWithPostInfo, PostDispatchInfo, DispatchResult}, + dispatch::{DispatchError, DispatchErrorWithPostInfo, DispatchResult, PostDispatchInfo}, ensure, storage::bounded_btree_map::BoundedBTreeMap, traits::Nothing, @@ -189,21 +189,21 @@ pub mod pallet { #[pallet::hooks] impl Hooks for Pallet { fn on_initialize(n: T::BlockNumber) -> Weight { - let session_id = Self::session_index() as u64; - println!("=================> ON_INITIALIZE {} : {}", n, session_id); - if frame_system::Pallet::::block_number().saturated_into::() % T::RewardsDistributionPeriod::get() == 0u32 { + if frame_system::Pallet::::block_number().saturated_into::() % + T::RewardsDistributionPeriod::get() == + 0u32 + { ScheduleListPos::::kill(); - return Default::default(); + return Default::default() } // println!("on_initialize {}", n); const AMOUNT_PER_BLOCK: u64 = 5; - // // NOTE: 3R // println!("ScheduleListPos : {:?}", ScheduleListPos::::get()); // println!("ScheduleListHead : {:?}", ScheduleListHead::::get()); @@ -219,90 +219,94 @@ pub mod pallet { // println!("iter {}:{}", n, idx); // println!("session_id : {:?}", session_id); - let last_valid = ScheduleListPos::::get(); - let pos = match ( last_valid, ScheduleListHead::::get() ){ - (Some(pos), _) => { - if let Some ((schedule, next)) = RewardsSchedulesList::::get(pos) { - next - }else{ - None - } - }, - (None, Some(head)) => { - Some(head) - }, - _ => { None }, - }; + let last_valid = ScheduleListPos::::get(); + let pos = match (last_valid, ScheduleListHead::::get()) { + (Some(pos), _) => { + if let Some((schedule, next)) = RewardsSchedulesList::::get(pos) { + next + } else { + None + } + }, + (None, Some(head)) => Some(head), + _ => None, + }; // println!("last_valid : {:?}", last_valid); // println!("pos : {:?}", pos); - if let Some(pos_val) = pos { - if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val){ - if schedule.last_session >= session_id{ - - println!("=====> SCHEDULEREWARDSTOTAL BEFORE : ({}:{}) : {:?}", schedule.liq_token, schedule.reward_token, schedule); - if schedule.scheduled_at < session_id{ - ScheduleRewardsTotal::::mutate((schedule.liq_token, schedule.reward_token), |(pending, idx, cumulative)|{ + if let Some(pos_val) = pos { + if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val) { + if schedule.last_session >= session_id { + println!( + "=====> SCHEDULEREWARDSTOTAL BEFORE : ({}:{}) : {:?}", + schedule.liq_token, schedule.reward_token, schedule + ); + if schedule.scheduled_at < session_id { + ScheduleRewardsTotal::::mutate( + (schedule.liq_token, schedule.reward_token), + |(pending, idx, cumulative)| { if *idx >= session_id { *pending += schedule.amount_per_session - }else{ + } else { *cumulative += *pending; *pending = schedule.amount_per_session; *idx = session_id; } println!("=====> SCHEDULEREWARDSTOTAL : ({}:{}) cumulative: {} pending: {}", schedule.liq_token, schedule.reward_token ,*cumulative, *pending); - }); - } - println!("=====> SCHEDULEREWARDSTOTAL AFTER : ({}:{}) : {:?}", schedule.liq_token, schedule.reward_token, schedule); - ScheduleListPos::::put(pos_val); - }else{ - match(Self::head(), Self::tail()){ - (Some(head), Some(tail)) if head == pos_val && head != tail=> { - println!("remove first list elem"); - if let Some(next) = next{ - ScheduleListHead::::put(next); - } - }, - (Some(head), Some(tail)) if tail == pos_val && head == tail=> { - ScheduleListTail::::kill(); - ScheduleListHead::::kill(); - ScheduleListPos::::kill(); }, - (Some(head), Some(tail)) if tail == pos_val && head != tail=> { - println!("remove last list elem"); - if let Some(last_valid) = last_valid{ - ScheduleListTail::::put(last_valid); - RewardsSchedulesList::::mutate(last_valid, |data|{ - if let Some((schedule, next)) = data.as_mut() { - *next = None - } - }); - } - }, - (Some(head), Some(tail)) => { - println!("remove middle elem {}", pos_val); - if let Some(last_valid) = last_valid{ - RewardsSchedulesList::::mutate(last_valid, |data|{ - if let Some((schedule, prev_next)) = data.as_mut() { - *prev_next = next - } - }); - } - }, - _ => {} - - } + ); + } + println!( + "=====> SCHEDULEREWARDSTOTAL AFTER : ({}:{}) : {:?}", + schedule.liq_token, schedule.reward_token, schedule + ); + ScheduleListPos::::put(pos_val); + } else { + match (Self::head(), Self::tail()) { + (Some(head), Some(tail)) if head == pos_val && head != tail => { + println!("remove first list elem"); + if let Some(next) = next { + ScheduleListHead::::put(next); + } + }, + (Some(head), Some(tail)) if tail == pos_val && head == tail => { + ScheduleListTail::::kill(); + ScheduleListHead::::kill(); + ScheduleListPos::::kill(); + }, + (Some(head), Some(tail)) if tail == pos_val && head != tail => { + println!("remove last list elem"); + if let Some(last_valid) = last_valid { + ScheduleListTail::::put(last_valid); + RewardsSchedulesList::::mutate(last_valid, |data| { + if let Some((schedule, next)) = data.as_mut() { + *next = None + } + }); + } + }, + (Some(head), Some(tail)) => { + println!("remove middle elem {}", pos_val); + if let Some(last_valid) = last_valid { + RewardsSchedulesList::::mutate(last_valid, |data| { + if let Some((schedule, prev_next)) = data.as_mut() { + *prev_next = next + } + }); + } + }, + _ => {}, } - } - } else{ + } + } else { // println!("###############################################"); - break; - } - } - Default::default() - } - } + break + } + } + Default::default() + } + } #[cfg(feature = "runtime-benchmarks")] pub trait PoSBenchmarkingConfig: pallet_issuance::Config {} @@ -467,10 +471,12 @@ pub mod pallet { /// How much scheduled rewards per single liquidty_token should be distribute_rewards /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic #[pallet::storage] - pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat ,(TokenId, TokenId), (u128, u64, u128), ValueQuery>; + pub type ScheduleRewardsTotal = + StorageMap<_, Twox64Concat, (TokenId, TokenId), (u128, u64, u128), ValueQuery>; #[pallet::storage] - pub type ScheduleRewardsPerLiquidity = StorageMap<_, Twox64Concat ,(TokenId, TokenId), (U256, u64), ValueQuery>; + pub type ScheduleRewardsPerLiquidity = + StorageMap<_, Twox64Concat, (TokenId, TokenId), (U256, u64), ValueQuery>; /// How much scheduled rewards per single liquidty_token should be distribute_rewards /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic @@ -506,7 +512,8 @@ pub mod pallet { pub type ScheduleListTail = StorageValue<_, ScheduleId, OptionQuery>; #[pallet::storage] - pub type RewardsSchedulesList = StorageMap<_, Twox64Concat, ScheduleId, (Schedule, Option), OptionQuery>; + pub type RewardsSchedulesList = + StorageMap<_, Twox64Concat, ScheduleId, (Schedule, Option), OptionQuery>; /// Maps liquidity token to list of tokens that it ever was rewarded with #[pallet::storage] @@ -515,8 +522,15 @@ pub mod pallet { /// Total amount of activated liquidity for each schedule #[pallet::storage] - pub type TotalActivatedLiquidityForSchedules = - StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (u128, u128, u64, u128), ValueQuery>; + pub type TotalActivatedLiquidityForSchedules = StorageDoubleMap< + _, + Twox64Concat, + TokenId, + Twox64Concat, + TokenId, + (u128, u128, u64, u128), + ValueQuery, + >; // #[pallet::storage] // pub type PrevTotalActivatedLiquidityForSchedules = @@ -683,7 +697,9 @@ pub mod pallet { ) .map_err(|err| DispatchErrorWithPostInfo { post_info: PostDispatchInfo { - actual_weight: Some(<::WeightInfo>::activate_liquidity_for_3rdparty_rewards()), + actual_weight: Some( + <::WeightInfo>::activate_liquidity_for_3rdparty_rewards(), + ), pays_fee: Pays::Yes, }, error: err, @@ -716,7 +732,9 @@ pub mod pallet { ) .map_err(|err| DispatchErrorWithPostInfo { post_info: PostDispatchInfo { - actual_weight: Some(<::WeightInfo>::activate_liquidity_for_3rdparty_rewards()), + actual_weight: Some( + <::WeightInfo>::activate_liquidity_for_3rdparty_rewards(), + ), pays_fee: Pays::Yes, }, error: err, @@ -803,92 +821,171 @@ pub mod pallet { } impl Pallet { - fn update_cumulative_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) { - let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Self::session_index() as u64){ - println!("update_cumulative_rewards cumulative idx: {} amount: {}", idx, cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default()); - }else{ - let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); - let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + let (cumulative, idx) = + ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Self::session_index() as u64) { + println!( + "update_cumulative_rewards cumulative idx: {} amount: {}", + idx, + cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default() + ); + } else { + let total_activated_liquidity = + Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); + let total_schedule_rewards = + Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); if total_activated_liquidity > 0 { - ScheduleRewardsTotal::::mutate((liquidity_asset_id, liquidity_assets_reward), |(cumulative, _, _)|{ - *cumulative = 0; - }); - let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)).checked_div(U256::from(total_activated_liquidity)).unwrap_or_default(); - println!("update_cumulative_rewards cumulative + pending idx: {} RAW amount: {}", idx, cumulative + pending); - println!("update_cumulative_rewards cumulative + pending idx: {} amount: {}", idx, (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default()); - ScheduleRewardsPerLiquidity::::insert((liquidity_asset_id, liquidity_assets_reward), (cumulative + pending, (Self::session_index() as u64))); + ScheduleRewardsTotal::::mutate( + (liquidity_asset_id, liquidity_assets_reward), + |(cumulative, _, _)| { + *cumulative = 0; + }, + ); + let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) + .checked_div(U256::from(total_activated_liquidity)) + .unwrap_or_default(); + println!( + "update_cumulative_rewards cumulative + pending idx: {} RAW amount: {}", + idx, + cumulative + pending + ); + println!( + "update_cumulative_rewards cumulative + pending idx: {} amount: {}", + idx, + (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default() + ); + ScheduleRewardsPerLiquidity::::insert( + (liquidity_asset_id, liquidity_assets_reward), + (cumulative + pending, (Self::session_index() as u64)), + ); } } } - - fn total_rewards_for_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> U256{ - let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Self::session_index() as u64){ - println!("total_rewards_for_liquidity cumulative idx: {} RAW amount: {}", idx, cumulative); - println!("total_rewards_for_liquidity cumulative idx: {} amount: {}", idx, cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default()); + fn total_rewards_for_liquidity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> U256 { + let (cumulative, idx) = + ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Self::session_index() as u64) { + println!( + "total_rewards_for_liquidity cumulative idx: {} RAW amount: {}", + idx, cumulative + ); + println!( + "total_rewards_for_liquidity cumulative idx: {} amount: {}", + idx, + cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default() + ); cumulative - }else{ - let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); - let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); - let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)).checked_div(U256::from(total_activated_liquidity)).unwrap_or_default(); - println!("total_rewards_for_liquidity cumulative + pending idx: {} amount: {}", idx, (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default()); + } else { + let total_activated_liquidity = + Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); + let total_schedule_rewards = + Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) + .checked_div(U256::from(total_activated_liquidity)) + .unwrap_or_default(); + println!( + "total_rewards_for_liquidity cumulative + pending idx: {} amount: {}", + idx, + (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default() + ); cumulative + pending } } - fn total_activated_liquidity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ - let (pending_negative, pending_positive, idx, cumulative) = TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward); - if idx == (Self::session_index() as u64){ + fn total_activated_liquidity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> Balance { + let (pending_negative, pending_positive, idx, cumulative) = + TotalActivatedLiquidityForSchedules::::get( + liquidity_asset_id, + liquidity_assets_reward, + ); + if idx == (Self::session_index() as u64) { println!("total_activated_liquidity cumulative idx: {} amount: {}", idx, cumulative); cumulative - }else{ - println!("total_activated_liquidity cumulative + pending idx: {} amount: {}", idx, cumulative + pending_positive - pending_negative); + } else { + println!( + "total_activated_liquidity cumulative + pending idx: {} amount: {}", + idx, + cumulative + pending_positive - pending_negative + ); cumulative + pending_positive - pending_negative } } - fn total_schedule_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) -> Balance{ - let (pending, idx, cumulative) = ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Self::session_index() as u64){ + fn total_schedule_rewards( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> Balance { + let (pending, idx, cumulative) = + ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Self::session_index() as u64) { println!("total_schedule_rewards cumulative idx: {} amount: {}", idx, cumulative); cumulative - }else{ - println!("total_schedule_rewards cumulative + pending idx: {} amount: {}", idx, cumulative + pending); + } else { + println!( + "total_schedule_rewards cumulative + pending idx: {} amount: {}", + idx, + cumulative + pending + ); cumulative + pending } } - fn update_total_activated_liqudity(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, diff: Balance, change: bool) { + fn update_total_activated_liqudity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + diff: Balance, + change: bool, + ) { // TODO: make configurable let session_id = Self::session_index() as u64; - println!("update_total_activated_liqudity BEFORE {:?}", TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward)); - TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |(pending_negative, pending_positive, idx, cumulative)|{ - if *idx == session_id { - if change{ - *pending_positive += diff; - }else{ - *pending_negative += diff; - }; - }else{ - println!("update_total_activated_liqudity SWITCH {}", diff); - // NOTE: handle burn so negative diff - *cumulative = *cumulative + *pending_positive - *pending_negative; - if change{ - *pending_positive = diff; - *pending_negative = 0u128; - }else{ - *pending_positive = 0u128; - *pending_negative = diff; - }; - *idx = session_id; - } - }); - println!("update_total_activated_liqudity AFTER {:?}", TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward)); - + println!( + "update_total_activated_liqudity BEFORE {:?}", + TotalActivatedLiquidityForSchedules::::get( + liquidity_asset_id, + liquidity_assets_reward + ) + ); + TotalActivatedLiquidityForSchedules::::mutate( + liquidity_asset_id, + liquidity_assets_reward, + |(pending_negative, pending_positive, idx, cumulative)| { + if *idx == session_id { + if change { + *pending_positive += diff; + } else { + *pending_negative += diff; + }; + } else { + println!("update_total_activated_liqudity SWITCH {}", diff); + // NOTE: handle burn so negative diff + *cumulative = *cumulative + *pending_positive - *pending_negative; + if change { + *pending_positive = diff; + *pending_negative = 0u128; + } else { + *pending_positive = 0u128; + *pending_negative = diff; + }; + *idx = session_id; + } + }, + ); + println!( + "update_total_activated_liqudity AFTER {:?}", + TotalActivatedLiquidityForSchedules::::get( + liquidity_asset_id, + liquidity_assets_reward + ) + ); // println!("UPDATE_TOTAL_ACTIVATED_LIQUDITY liq: {} reward:{} amount:{}", liquidity_asset_id, liquidity_assets_reward, diff); // if let Ok((idx, amount)) = TotalActivatedLiquidityForSchedules::::try_get(liquidity_asset_id, liquidity_assets_reward){ @@ -963,7 +1060,6 @@ impl Pallet { liquidity_asset_id: TokenId, amount: Balance, ) -> DispatchResult { - ensure!( ActivatedNativeRewardsLiq::::get(user.clone(), liquidity_asset_id) == 0, Error::::LiquidityLockedIn3rdpartyRewards @@ -1036,11 +1132,9 @@ impl Pallet { already_activated_amount + amount <= available_amount, Error::::NotEnoughAssets ); - ActivatedNativeRewardsLiq::::mutate( - user.clone(), - liquidity_asset_id, - |val| *val += amount, - ); + ActivatedNativeRewardsLiq::::mutate(user.clone(), liquidity_asset_id, |val| { + *val += amount + }); }, } @@ -1251,7 +1345,12 @@ impl Pallet { }, )?; - Self::update_total_activated_liqudity(liquidity_asset_id, liquidity_assets_reward, liquidity_assets_added, true); + Self::update_total_activated_liqudity( + liquidity_asset_id, + liquidity_assets_reward, + liquidity_assets_added, + true, + ); // TotalActivatedLiquidityForSchedules::::mutate( // liquidity_asset_id, @@ -1333,8 +1432,12 @@ impl Pallet { rewards_info, ); - - Self::update_total_activated_liqudity(liquidity_asset_id, reward_token, liquidity_assets_burned, false); + Self::update_total_activated_liqudity( + liquidity_asset_id, + reward_token, + liquidity_assets_burned, + false, + ); // TotalActivatedLiquidityForSchedules::::try_mutate( // liquidity_asset_id, // reward_token, @@ -1384,16 +1487,12 @@ impl Pallet { amount, ); - let amount = ActivatedNativeRewardsLiq::::mutate( - user.clone(), - liquidity_asset_id, - |val| { + let amount = + ActivatedNativeRewardsLiq::::mutate(user.clone(), liquidity_asset_id, |val| { let prev = *val; *val = 0; prev - }, - ); - + }); } Ok(()) @@ -1437,16 +1536,14 @@ impl Pallet { Ok(total_available_rewards) } - pub (crate) fn reward_pool_impl( + pub(crate) fn reward_pool_impl( sender: T::AccountId, pool: (TokenId, TokenId), token_id: TokenId, amount: Balance, schedule_end: T::BlockNumber, ) -> DispatchResult { - - let liquidity_token_id = - ::ValuationApi::get_liquidity_asset(pool.0, pool.1) + let liquidity_token_id = ::ValuationApi::get_liquidity_asset(pool.0, pool.1) .map_err(|_| Error::::PoolDoesNotExist)?; let current_session = Self::session_index(); @@ -1462,10 +1559,14 @@ impl Pallet { .ok_or(Error::::MathOverflow)?; ensure!( - ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= T::Min3rdPartyRewards::get() || - ((token_id == Into::::into(Self::native_token_id())) && amount_per_session >= T::Min3rdPartyRewards::get()) || - ::ValuationApi::valuate_non_liquidity_token(token_id, amount_per_session) >= T::Min3rdPartyRewards::get() - , + ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= + T::Min3rdPartyRewards::get() || + ((token_id == Into::::into(Self::native_token_id())) && + amount_per_session >= T::Min3rdPartyRewards::get()) || + ::ValuationApi::valuate_non_liquidity_token( + token_id, + amount_per_session + ) >= T::Min3rdPartyRewards::get(), Error::::TooLittleRewards ); @@ -1483,30 +1584,31 @@ impl Pallet { let head = ScheduleListHead::::get(); let tail = ScheduleListTail::::get(); - let schedule = Schedule{ + let schedule = Schedule { scheduled_at: Self::session_index() as u64, last_session: schedule_end.saturated_into::(), liq_token: liquidity_token_id, reward_token: token_id, - amount_per_session: amount_per_session + amount_per_session, }; - match (head, tail){ - (None, None) => { // first schedule + match (head, tail) { + (None, None) => { + // first schedule RewardsSchedulesList::::insert(0, (schedule, None::)); ScheduleListHead::::put(0); ScheduleListTail::::put(0); }, (Some(_head), Some(tail)) => { RewardsSchedulesList::::mutate(tail, |info| { - if let Some((_schedule, next)) = info.as_mut(){ + if let Some((_schedule, next)) = info.as_mut() { *next = Some(tail + 1u64) } }); RewardsSchedulesList::::insert(tail + 1, (schedule, None::)); ScheduleListTail::::put(tail + 1); }, - _ => {} // invariant assures this will never happen + _ => {}, // invariant assures this will never happen } Ok(()) @@ -1519,15 +1621,41 @@ impl ProofOfStakeRewardsApi for Pallet { type CurrencyId = TokenId; #[cfg(feature = "runtime-benchmarks")] - fn enable_3rdparty_rewards(account: T::AccountId, pool: (Self::CurrencyId,Self::CurrencyId), reward_token_id: Self::CurrencyId, last_session: u32, amount: Self::Balance){ - let liquidity_token_id = ::ValuationApi::get_liquidity_asset(pool.0, pool.1).expect("pool exist"); + fn enable_3rdparty_rewards( + account: T::AccountId, + pool: (Self::CurrencyId, Self::CurrencyId), + reward_token_id: Self::CurrencyId, + last_session: u32, + amount: Self::Balance, + ) { + let liquidity_token_id = + ::ValuationApi::get_liquidity_asset(pool.0, pool.1).expect("pool exist"); log!(info, "XXXX {}", liquidity_token_id); - Pallet::::reward_pool_impl(account.clone(), pool, reward_token_id, amount, last_session.into()).expect("call should pass"); + Pallet::::reward_pool_impl( + account.clone(), + pool, + reward_token_id, + amount, + last_session.into(), + ) + .expect("call should pass"); } #[cfg(feature = "runtime-benchmarks")] - fn activate_liquidity_for_3rdparty_rewards(account: T::AccountId, liquidity_token: Self::CurrencyId, amount: Self::Balance, reward_token_id: Self::CurrencyId){ - Pallet::::activate_liquidity_for_3rdparty_rewards_impl(account, liquidity_token, amount, ThirdPartyActivationKind::ActivateKind(None), reward_token_id).expect("call should pass") + fn activate_liquidity_for_3rdparty_rewards( + account: T::AccountId, + liquidity_token: Self::CurrencyId, + amount: Self::Balance, + reward_token_id: Self::CurrencyId, + ) { + Pallet::::activate_liquidity_for_3rdparty_rewards_impl( + account, + liquidity_token, + amount, + ThirdPartyActivationKind::ActivateKind(None), + reward_token_id, + ) + .expect("call should pass") } fn enable(liquidity_token_id: TokenId, weight: u8) { diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 22708df840..ece914f5a3 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -93,7 +93,8 @@ impl RewardsCalculator { // println!("total_activated : {}", total_activated); // println!("total_rewards : {}", total_rewards); // let pool_ratio_current = U256::from(total_rewards.checked_div(total_activated).unwrap_or_default()) * U256::from(u128::MAX); - let pool_ratio_current = Pallet::::total_rewards_for_liquidity(asset_id, reward_asset_id); + let pool_ratio_current = + Pallet::::total_rewards_for_liquidity(asset_id, reward_asset_id); println!("SCHEDULE REWARDS RATIO: {}", pool_ratio_current); let default_rewards = RewardInfo { diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index cca1a3b826..1000a312ae 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -4,7 +4,7 @@ use super::*; use crate::mock::*; -use frame_support::{assert_err, assert_err_ignore_postinfo,assert_ok}; +use frame_support::{assert_err, assert_err_ignore_postinfo, assert_ok}; use mockall::predicate::eq; use serial_test::serial; @@ -1393,26 +1393,22 @@ fn rewards_schedule_is_stored() { let rewards_per_session = REWARD_AMOUNT / 5; assert_eq!( RewardsSchedulesList::::get(0).unwrap(), - (Schedule{ - scheduled_at: 0u64, - last_session: 5u64, - liq_token: LIQUIDITY_TOKEN, - reward_token: REWARD_TOKEN, - amount_per_session: rewards_per_session, - }, None) - ); - assert_eq!( - ScheduleListTail::::get(), - Some(0u64) - ); - assert_eq!( - ScheduleListHead::::get(), - Some(0u64) + ( + Schedule { + scheduled_at: 0u64, + last_session: 5u64, + liq_token: LIQUIDITY_TOKEN, + reward_token: REWARD_TOKEN, + amount_per_session: rewards_per_session, + }, + None + ) ); + assert_eq!(ScheduleListTail::::get(), Some(0u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); }); } - #[test] #[serial] fn rewards_linked_list_insert_multiple_schedules() { @@ -1442,42 +1438,40 @@ fn rewards_linked_list_insert_multiple_schedules() { 2u32.into() ),); - assert_eq!( RewardsSchedulesList::::get(0).unwrap(), - (Schedule{ - scheduled_at: 0u64, - last_session: 1u64, - liq_token: LIQUIDITY_TOKEN, - reward_token: REWARD_TOKEN, - amount_per_session: REWARD_AMOUNT / 1, - }, Some(1)) + ( + Schedule { + scheduled_at: 0u64, + last_session: 1u64, + liq_token: LIQUIDITY_TOKEN, + reward_token: REWARD_TOKEN, + amount_per_session: REWARD_AMOUNT / 1, + }, + Some(1) + ) ); assert_eq!( RewardsSchedulesList::::get(1).unwrap(), - (Schedule{ - scheduled_at: 0u64, - last_session: 2u64, - liq_token: LIQUIDITY_TOKEN, - reward_token: REWARD_TOKEN, - amount_per_session: REWARD_AMOUNT / 2, - }, None) + ( + Schedule { + scheduled_at: 0u64, + last_session: 2u64, + liq_token: LIQUIDITY_TOKEN, + reward_token: REWARD_TOKEN, + amount_per_session: REWARD_AMOUNT / 2, + }, + None + ) ); - assert_eq!( - ScheduleListHead::::get(), - Some(0u64) - ); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!( - ScheduleListTail::::get(), - Some(1u64) - ); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); }); } - #[test] #[serial] fn rewards_linked_list_removes_outdated_schedule_automatically() { @@ -1507,49 +1501,48 @@ fn rewards_linked_list_removes_outdated_schedule_automatically() { 2u32.into() ),); - assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListPos::::get(), None); - assert_eq!( ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); forward_to_block(2); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(1u64)); - assert_eq!( ScheduleListPos::::get(), Some(1u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListPos::::get(), Some(1u64)); forward_to_block(5); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(1u64)); - assert_eq!( ScheduleListPos::::get(), Some(1u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListPos::::get(), Some(1u64)); forward_to_block(11); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(1u64)); - assert_eq!( ScheduleListPos::::get(), Some(1u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListPos::::get(), Some(1u64)); forward_to_block(21); - assert_eq!( ScheduleListHead::::get(), Some(1u64)); - assert_eq!( ScheduleListTail::::get(), Some(1u64)); - assert_eq!( ScheduleListPos::::get(), Some(1u64)); + assert_eq!(ScheduleListHead::::get(), Some(1u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListPos::::get(), Some(1u64)); forward_to_block(25); - assert_eq!( ScheduleListHead::::get(), Some(1u64)); - assert_eq!( ScheduleListTail::::get(), Some(1u64)); - assert_eq!( ScheduleListPos::::get(), Some(1u64)); + assert_eq!(ScheduleListHead::::get(), Some(1u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListPos::::get(), Some(1u64)); forward_to_block(30); - assert_eq!( ScheduleListHead::::get(), Some(1u64)); - assert_eq!( ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ScheduleListHead::::get(), Some(1u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); forward_to_block(31); - assert_eq!( ScheduleListHead::::get(), None); - assert_eq!( ScheduleListTail::::get(), None); - assert_eq!( ScheduleListPos::::get(), None); + assert_eq!(ScheduleListHead::::get(), None); + assert_eq!(ScheduleListTail::::get(), None); + assert_eq!(ScheduleListPos::::get(), None); }); } @@ -1558,7 +1551,7 @@ fn rewards_linked_list_removes_outdated_schedule_automatically() { // rewards_middle_schedule_from_linked_list // rewards_multipleall_schedule_from_linked_list -fn insert_schedule_ending_at_session(n: u32){ +fn insert_schedule_ending_at_session(n: u32) { assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -1566,7 +1559,6 @@ fn insert_schedule_ending_at_session(n: u32){ REWARD_AMOUNT, n.into(), ),); - } #[test] @@ -1591,17 +1583,17 @@ fn rewards_first_schedule_from_linked_list_of_four() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListPos::::get(), None); - assert_eq!( ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); forward_to_block(21); - assert_eq!( ScheduleListHead::::get(), Some(1u64)); - assert_eq!( ScheduleListTail::::get(), Some(3u64)); - assert_eq!( RewardsSchedulesList::::get(1u64).unwrap().1, Some(2u64)); - assert_eq!( RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); - assert_eq!( RewardsSchedulesList::::get(3u64).unwrap().1, None); + assert_eq!(ScheduleListHead::::get(), Some(1u64)); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, Some(2u64)); + assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); }); } @@ -1627,19 +1619,17 @@ fn remove_last_schedule_from_linked_list() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListPos::::get(), None); - assert_eq!( ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); forward_to_block(21); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(2u64)); - assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); - assert_eq!( RewardsSchedulesList::::get(1u64).unwrap().1, Some(2u64)); - assert_eq!( RewardsSchedulesList::::get(2u64).unwrap().1, None); - - + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(2u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); + assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, Some(2u64)); + assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, None); }); } @@ -1665,21 +1655,20 @@ fn remove_middle_schedule_from_linked_list() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListPos::::get(), None); - assert_eq!( ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); forward_to_block(21); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(3u64)); - assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(2u64)); - assert_eq!( RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); - assert_eq!( RewardsSchedulesList::::get(3u64).unwrap().1, None); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(2u64)); + assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); }); } - #[test] #[serial] fn remove_first_few_elems_at_once_from_linked_list() { @@ -1702,16 +1691,16 @@ fn remove_first_few_elems_at_once_from_linked_list() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListPos::::get(), None); - assert_eq!( ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); forward_to_block(21); - assert_eq!( ScheduleListHead::::get(), Some(2u64)); - assert_eq!( ScheduleListTail::::get(), Some(3u64)); - assert_eq!( RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); - assert_eq!( RewardsSchedulesList::::get(3u64).unwrap().1, None); + assert_eq!(ScheduleListHead::::get(), Some(2u64)); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); }); } @@ -1737,16 +1726,16 @@ fn remove_few_last_elems_at_once_from_linked_list() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListPos::::get(), None); - assert_eq!( ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); forward_to_block(21); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(1u64)); - assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); - assert_eq!( RewardsSchedulesList::::get(1u64).unwrap().1, None); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); + assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, None); }); } @@ -1778,10 +1767,10 @@ fn remove_few_middle_elements_from_linkedd_list() { forward_to_block(21); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(3u64)); - assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(3u64)); - assert_eq!( RewardsSchedulesList::::get(3u64).unwrap().1, None); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); }); } @@ -1815,11 +1804,11 @@ fn remove_random_elements_from_linked_list() { forward_to_block(21); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(4u64)); - assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(2u64)); - assert_eq!( RewardsSchedulesList::::get(2u64).unwrap().1, Some(4u64)); - assert_eq!( RewardsSchedulesList::::get(4u64).unwrap().1, None); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(4u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(2u64)); + assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(4u64)); + assert_eq!(RewardsSchedulesList::::get(4u64).unwrap().1, None); }); } @@ -1850,26 +1839,23 @@ fn remove_random_elements_from_linked_list_over_time() { forward_to_block(24); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(6u64)); - assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); - assert_eq!( RewardsSchedulesList::::get(1u64).unwrap().1, Some(3u64)); - assert_eq!( RewardsSchedulesList::::get(3u64).unwrap().1, Some(4u64)); - assert_eq!( RewardsSchedulesList::::get(4u64).unwrap().1, Some(6u64)); - assert_eq!( RewardsSchedulesList::::get(6u64).unwrap().1, None); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(6u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); + assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, Some(3u64)); + assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, Some(4u64)); + assert_eq!(RewardsSchedulesList::::get(4u64).unwrap().1, Some(6u64)); + assert_eq!(RewardsSchedulesList::::get(6u64).unwrap().1, None); forward_to_block(40); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(6u64)); - assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(6u64)); - assert_eq!( RewardsSchedulesList::::get(6u64).unwrap().1, None); - - + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(6u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(6u64)); + assert_eq!(RewardsSchedulesList::::get(6u64).unwrap().1, None); }); } - #[test] #[serial] fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { @@ -1899,14 +1885,14 @@ fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { forward_to_block(24); - assert_eq!( ScheduleListHead::::get(), Some(0u64)); - assert_eq!( ScheduleListTail::::get(), Some(8u64)); - assert_eq!( RewardsSchedulesList::::get(0u64).unwrap().1, Some(8u64)); - assert_eq!( RewardsSchedulesList::::get(8u64).unwrap().1, None); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(8u64)); + assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(8u64)); + assert_eq!(RewardsSchedulesList::::get(8u64).unwrap().1, None); forward_to_block(100); - assert_eq!( ScheduleListHead::::get(), None); - assert_eq!( ScheduleListTail::::get(), None); + assert_eq!(ScheduleListHead::::get(), None); + assert_eq!(ScheduleListTail::::get(), None); }); } @@ -1969,14 +1955,8 @@ fn duplicated_schedules_works() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); - assert_eq!( - ScheduleListHead::::get(), - None - ); - assert_eq!( - ScheduleListTail::::get(), - None - ); + assert_eq!(ScheduleListHead::::get(), None); + assert_eq!(ScheduleListTail::::get(), None); assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1986,14 +1966,8 @@ fn duplicated_schedules_works() { 5u32.into() )); - assert_eq!( - ScheduleListHead::::get(), - Some(0u64) - ); - assert_eq!( - ScheduleListTail::::get(), - Some(0u64) - ); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(0u64)); assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -2003,14 +1977,8 @@ fn duplicated_schedules_works() { 5u32.into() )); - assert_eq!( - ScheduleListHead::::get(), - Some(0u64) - ); - assert_eq!( - ScheduleListTail::::get(), - Some(1u64) - ); + assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ScheduleListTail::::get(), Some(1u64)); }); } @@ -2027,7 +1995,8 @@ fn reject_schedule_with_too_little_rewards_per_session() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(1u128); - let valuate_non_liquidity_token_mock = MockValuationApi::valuate_non_liquidity_token_context(); + let valuate_non_liquidity_token_mock = + MockValuationApi::valuate_non_liquidity_token_context(); valuate_non_liquidity_token_mock.expect().return_const(0u128); roll_to_session(4); @@ -2085,7 +2054,8 @@ fn accept_schedule_valuated_in_token_paired_with_native_token() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(0u128); - let valuate_non_liquidity_token_mock = MockValuationApi::valuate_non_liquidity_token_context(); + let valuate_non_liquidity_token_mock = + MockValuationApi::valuate_non_liquidity_token_context(); valuate_non_liquidity_token_mock.expect().return_const(10u128); roll_to_session(4); @@ -2100,7 +2070,6 @@ fn accept_schedule_valuated_in_token_paired_with_native_token() { }); } - #[test] #[serial] fn user_can_claim_3rdparty_rewards() { @@ -2217,29 +2186,57 @@ fn overlapping_3rdparty_rewards_works() { .unwrap(); roll_to_session(1); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, first_reward_token, None,) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + first_reward_token, + None, + ) + .unwrap(); roll_to_session(5); let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), pair, second_reward_token_id, 100_000, 15u32.into(),) .unwrap(); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, second_reward_token_id, None,) .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + pair, + second_reward_token_id, + 100_000, + 15u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + second_reward_token_id, + None, + ) + .unwrap(); roll_to_session(7); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, second_reward_token_id), + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + second_reward_token_id + ), Ok(10000) ); println!("############################## ##############################"); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, first_reward_token), + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + first_reward_token + ), Ok(6000) ); }); } - #[test] #[serial] fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { @@ -2366,7 +2363,11 @@ fn deactivate_3rdparty_rewards() { ); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_amount( CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN), + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), Ok(500) ); ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( @@ -2395,7 +2396,6 @@ fn deactivate_3rdparty_rewards() { }); } - #[test] #[serial] fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() { @@ -2597,7 +2597,6 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ] ); - ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), FIRST_LIQUIDITY_TOKEN, @@ -2723,7 +2722,8 @@ fn fail_to_transfer_tokens_that_has_been_partially_deactivated() { FIRST_REWARD_TOKEN, REWARD_AMOUNT, 10u32.into(), - ).unwrap(); + ) + .unwrap(); ProofOfStake::activate_liquidity_for_native_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -2774,16 +2774,13 @@ fn fail_to_transfer_tokens_that_has_been_partially_deactivated() { ) .unwrap(); - assert_ok!( - TokensOf::::transfer( - LIQUIDITY_TOKEN, - &BOB, - &CHARLIE, - 100, - ExistenceRequirement::AllowDeath - ) - ); - + assert_ok!(TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + )); }); } @@ -3043,18 +3040,76 @@ fn can_claim_schedule_rewards() { assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 0,); assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 0,); - assert_eq!(ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN,) .unwrap(), 1000); - assert_eq!(ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN,) .unwrap(), 1000); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(), + 1000 + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(), + 1000 + ); - ProofOfStake::claim_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN,) .unwrap(); + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(); - assert_eq!(ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN,) .unwrap(), 0); - assert_eq!(ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN,) .unwrap(), 1000); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(), + 0 + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(), + 1000 + ); - ProofOfStake::claim_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN,) .unwrap(); + ProofOfStake::claim_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(); - assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN,) .unwrap(), 0); - assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( BOB, LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN,) .unwrap(), 0); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + FIRST_REWARD_TOKEN, + ) + .unwrap(), + 0 + ); + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + BOB, + LIQUIDITY_TOKEN, + SECOND_REWARD_TOKEN, + ) + .unwrap(), + 0 + ); assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 1000); assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 1000); @@ -3151,39 +3206,28 @@ use sp_runtime::{traits::Dispatchable, Permill}; #[ignore] #[serial] fn activate_deactivate_calls_are_free_of_charge() { - ExtBuilder::new() - .build() - .execute_with(|| { - System::set_block_number(1); - - let activate_call = mock::RuntimeCall::ProofOfStake( - Call::activate_liquidity_for_3rdparty_rewards{ - liquidity_token_id: LIQUIDITY_TOKEN, - amount: 100, - reward_token: REWARD_TOKEN, - use_balance_from: None, - } - ); + ExtBuilder::new().build().execute_with(|| { + System::set_block_number(1); - let deactivate_call = mock::RuntimeCall::ProofOfStake( - Call::deactivate_liquidity_for_3rdparty_rewards{ - liquidity_token_id: LIQUIDITY_TOKEN, - amount: 100, - reward_token: REWARD_TOKEN, - } - ); + let activate_call = + mock::RuntimeCall::ProofOfStake(Call::activate_liquidity_for_3rdparty_rewards { + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + use_balance_from: None, + }); - assert_eq!( - activate_call.get_dispatch_info().pays_fee, - Pays::No - ); + let deactivate_call = + mock::RuntimeCall::ProofOfStake(Call::deactivate_liquidity_for_3rdparty_rewards { + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + }); - assert_eq!( - deactivate_call.get_dispatch_info().pays_fee, - Pays::No - ); + assert_eq!(activate_call.get_dispatch_info().pays_fee, Pays::No); - }); + assert_eq!(deactivate_call.get_dispatch_info().pays_fee, Pays::No); + }); } #[test] @@ -3201,37 +3245,41 @@ fn unsuccessul_activate_deactivate_calls_charges_fees() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); - let activate_call = mock::RuntimeCall::ProofOfStake( - Call::activate_liquidity_for_3rdparty_rewards{ + let activate_call = + mock::RuntimeCall::ProofOfStake(Call::activate_liquidity_for_3rdparty_rewards { liquidity_token_id: LIQUIDITY_TOKEN, amount: 100, reward_token: REWARD_TOKEN, use_balance_from: None, - } - ); + }); - let deactivate_call = mock::RuntimeCall::ProofOfStake( - Call::deactivate_liquidity_for_3rdparty_rewards{ + let deactivate_call = + mock::RuntimeCall::ProofOfStake(Call::deactivate_liquidity_for_3rdparty_rewards { liquidity_token_id: LIQUIDITY_TOKEN, amount: 100, reward_token: REWARD_TOKEN, - } - ); - + }); assert_eq!( - activate_call.dispatch(RuntimeOrigin::signed(BOB)).unwrap_err().post_info.pays_fee, + activate_call + .dispatch(RuntimeOrigin::signed(BOB)) + .unwrap_err() + .post_info + .pays_fee, Pays::Yes ); assert_eq!( - deactivate_call.dispatch(RuntimeOrigin::signed(BOB)).unwrap_err().post_info.pays_fee, + deactivate_call + .dispatch(RuntimeOrigin::signed(BOB)) + .unwrap_err() + .post_info + .pays_fee, Pays::Yes ); }); } - #[test] #[serial] fn claim_rewards_from_multiple_sessions_at_once() { @@ -3446,7 +3494,6 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_after_few_sessions( ) .unwrap(); - roll_to_session(7); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), @@ -3492,8 +3539,6 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_schedule_is_finishe ) .unwrap(); - - roll_to_session(15); ProofOfStake::activate_liquidity_for_3rdparty_rewards( @@ -3514,7 +3559,6 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_schedule_is_finishe }); } - #[test] #[serial] fn test_multiple_activations_in_same_block() { @@ -3542,8 +3586,6 @@ fn test_multiple_activations_in_same_block() { ) .unwrap(); - - roll_to_session(1); ProofOfStake::activate_liquidity_for_3rdparty_rewards( @@ -3564,22 +3606,20 @@ fn test_multiple_activations_in_same_block() { ) .unwrap(); - roll_to_session(2); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), - Ok(REWARD_AMOUNT/10/2) + Ok(REWARD_AMOUNT / 10 / 2) ); }); } - #[test] #[serial] fn rewards_are_available_in_next_session_after_rewards_are_provided() { ExtBuilder::new() - .issue(ALICE, REWARD_TOKEN, 10*3*REWARD_AMOUNT) + .issue(ALICE, REWARD_TOKEN, 10 * 3 * REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) @@ -3591,40 +3631,162 @@ fn rewards_are_available_in_next_session_after_rewards_are_provided() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10 * 3 * REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, REWARD_TOKEN, 10 * 3 * REWARD_AMOUNT, 10u32.into(),) .unwrap(); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); - - - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); roll_to_session(1); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); roll_to_session(2); - assert_eq!(15_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(15_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(EVE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); - assert_eq!(15_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(15_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!( + 15_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 15_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(EVE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + 15_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 15_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); roll_to_session(3); - assert_eq!(15_000u128 + 10_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(15_000u128 + 10_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(10_000u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!( + 15_000u128 + 10_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 15_000u128 + 10_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 10_000u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); }); } @@ -3632,7 +3794,7 @@ fn rewards_are_available_in_next_session_after_rewards_are_provided() { #[serial] fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedule() { ExtBuilder::new() - .issue(ALICE, REWARD_TOKEN, 10*3*REWARD_AMOUNT) + .issue(ALICE, REWARD_TOKEN, 10 * 3 * REWARD_AMOUNT) .issue(ALICE, LIQUIDITY_TOKEN, 100) .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) @@ -3645,61 +3807,260 @@ fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedu let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); - /// 1000 rewards per session - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, REWARD_TOKEN, REWARD_AMOUNT, 10u32.into(),) .unwrap(); - - - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(ALICE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(ALICE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); roll_to_session(2); - assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(ALICE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + ALICE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 50, REWARD_TOKEN, None,) .unwrap(); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(EVE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); - ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(ALICE), LIQUIDITY_TOKEN, 50, REWARD_TOKEN,) .unwrap(); - ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, REWARD_TOKEN,) .unwrap(); - ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(EVE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN,) .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 50, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(EVE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(ALICE), + LIQUIDITY_TOKEN, + 50, + REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(EVE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + ) + .unwrap(); - assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(ALICE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + ALICE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); roll_to_session(3); - assert_eq!(1000u128, ProofOfStake::calculate_3rdparty_rewards_amount(ALICE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - - ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(ALICE), LIQUIDITY_TOKEN, 50, REWARD_TOKEN,) .unwrap(); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(ALICE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, 50, REWARD_TOKEN, None,) .unwrap(); - ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(EVE), LIQUIDITY_TOKEN, 100, REWARD_TOKEN, None,) .unwrap(); + assert_eq!( + 1000u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + ALICE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); - assert_eq!(1000u128, ProofOfStake::calculate_3rdparty_rewards_amount(ALICE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(500u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(0u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(ALICE), + LIQUIDITY_TOKEN, + 50, + REWARD_TOKEN, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(ALICE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 50, + REWARD_TOKEN, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(EVE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + assert_eq!( + 1000u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + ALICE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 500u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 0u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); roll_to_session(4); - assert_eq!(1249u128, ProofOfStake::calculate_3rdparty_rewards_amount(ALICE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(749u128, ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(749u128, ProofOfStake::calculate_3rdparty_rewards_amount(CHARLIE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); - assert_eq!(249u128, ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN).unwrap()); + assert_eq!( + 1249u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + ALICE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 749u128, + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); + assert_eq!( + 749u128, + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ) + .unwrap() + ); + assert_eq!( + 249u128, + ProofOfStake::calculate_3rdparty_rewards_amount(EVE, LIQUIDITY_TOKEN, REWARD_TOKEN) + .unwrap() + ); }); } - - - From 85ad4fb59f48221af2d787db2c46429c887460ca Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 25 Oct 2023 11:23:48 +0000 Subject: [PATCH 053/125] remove prints --- pallets/proof-of-stake/src/lib.rs | 175 +--------------------------- pallets/proof-of-stake/src/tests.rs | 5 - 2 files changed, 6 insertions(+), 174 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index bbd89cc196..2239393e01 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -191,8 +191,6 @@ pub mod pallet { fn on_initialize(n: T::BlockNumber) -> Weight { let session_id = Self::session_index() as u64; - println!("=================> ON_INITIALIZE {} : {}", n, session_id); - if frame_system::Pallet::::block_number().saturated_into::() % T::RewardsDistributionPeriod::get() == 0u32 @@ -201,24 +199,11 @@ pub mod pallet { return Default::default() } - // println!("on_initialize {}", n); const AMOUNT_PER_BLOCK: u64 = 5; - // // NOTE: 3R - // println!("ScheduleListPos : {:?}", ScheduleListPos::::get()); - // println!("ScheduleListHead : {:?}", ScheduleListHead::::get()); - // println!("ScheduleListTail : {:?}", ScheduleListTail::::get()); - - // 1R 1W 15RW - - //NOTE: 5 transfers => 15R 15W - // NOTE: 3R + 1R // TODO: make configurable for idx in 0..AMOUNT_PER_BLOCK { - // println!("iter {}:{}", n, idx); - // println!("session_id : {:?}", session_id); - let last_valid = ScheduleListPos::::get(); let pos = match (last_valid, ScheduleListHead::::get()) { (Some(pos), _) => { @@ -231,16 +216,10 @@ pub mod pallet { (None, Some(head)) => Some(head), _ => None, }; - // println!("last_valid : {:?}", last_valid); - // println!("pos : {:?}", pos); if let Some(pos_val) = pos { if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val) { if schedule.last_session >= session_id { - println!( - "=====> SCHEDULEREWARDSTOTAL BEFORE : ({}:{}) : {:?}", - schedule.liq_token, schedule.reward_token, schedule - ); if schedule.scheduled_at < session_id { ScheduleRewardsTotal::::mutate( (schedule.liq_token, schedule.reward_token), @@ -252,30 +231,22 @@ pub mod pallet { *pending = schedule.amount_per_session; *idx = session_id; } - println!("=====> SCHEDULEREWARDSTOTAL : ({}:{}) cumulative: {} pending: {}", schedule.liq_token, schedule.reward_token ,*cumulative, *pending); }, ); } - println!( - "=====> SCHEDULEREWARDSTOTAL AFTER : ({}:{}) : {:?}", - schedule.liq_token, schedule.reward_token, schedule - ); ScheduleListPos::::put(pos_val); } else { match (Self::head(), Self::tail()) { - (Some(head), Some(tail)) if head == pos_val && head != tail => { - println!("remove first list elem"); + (Some(head), Some(tail)) if head == pos_val && head != tail => if let Some(next) = next { ScheduleListHead::::put(next); - } - }, + }, (Some(head), Some(tail)) if tail == pos_val && head == tail => { ScheduleListTail::::kill(); ScheduleListHead::::kill(); ScheduleListPos::::kill(); }, - (Some(head), Some(tail)) if tail == pos_val && head != tail => { - println!("remove last list elem"); + (Some(head), Some(tail)) if tail == pos_val && head != tail => if let Some(last_valid) = last_valid { ScheduleListTail::::put(last_valid); RewardsSchedulesList::::mutate(last_valid, |data| { @@ -283,24 +254,20 @@ pub mod pallet { *next = None } }); - } - }, - (Some(head), Some(tail)) => { - println!("remove middle elem {}", pos_val); + }, + (Some(head), Some(tail)) => if let Some(last_valid) = last_valid { RewardsSchedulesList::::mutate(last_valid, |data| { if let Some((schedule, prev_next)) = data.as_mut() { *prev_next = next } }); - } - }, + }, _ => {}, } } } } else { - // println!("###############################################"); break } } @@ -825,11 +792,6 @@ impl Pallet { let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); if idx == (Self::session_index() as u64) { - println!( - "update_cumulative_rewards cumulative idx: {} amount: {}", - idx, - cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default() - ); } else { let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); @@ -845,16 +807,6 @@ impl Pallet { let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) .checked_div(U256::from(total_activated_liquidity)) .unwrap_or_default(); - println!( - "update_cumulative_rewards cumulative + pending idx: {} RAW amount: {}", - idx, - cumulative + pending - ); - println!( - "update_cumulative_rewards cumulative + pending idx: {} amount: {}", - idx, - (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default() - ); ScheduleRewardsPerLiquidity::::insert( (liquidity_asset_id, liquidity_assets_reward), (cumulative + pending, (Self::session_index() as u64)), @@ -870,15 +822,6 @@ impl Pallet { let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); if idx == (Self::session_index() as u64) { - println!( - "total_rewards_for_liquidity cumulative idx: {} RAW amount: {}", - idx, cumulative - ); - println!( - "total_rewards_for_liquidity cumulative idx: {} amount: {}", - idx, - cumulative.checked_div(U256::from(u128::MAX)).unwrap_or_default() - ); cumulative } else { let total_activated_liquidity = @@ -888,11 +831,6 @@ impl Pallet { let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) .checked_div(U256::from(total_activated_liquidity)) .unwrap_or_default(); - println!( - "total_rewards_for_liquidity cumulative + pending idx: {} amount: {}", - idx, - (cumulative + pending).checked_div(U256::from(u128::MAX)).unwrap_or_default() - ); cumulative + pending } } @@ -907,14 +845,8 @@ impl Pallet { liquidity_assets_reward, ); if idx == (Self::session_index() as u64) { - println!("total_activated_liquidity cumulative idx: {} amount: {}", idx, cumulative); cumulative } else { - println!( - "total_activated_liquidity cumulative + pending idx: {} amount: {}", - idx, - cumulative + pending_positive - pending_negative - ); cumulative + pending_positive - pending_negative } } @@ -926,14 +858,8 @@ impl Pallet { let (pending, idx, cumulative) = ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); if idx == (Self::session_index() as u64) { - println!("total_schedule_rewards cumulative idx: {} amount: {}", idx, cumulative); cumulative } else { - println!( - "total_schedule_rewards cumulative + pending idx: {} amount: {}", - idx, - cumulative + pending - ); cumulative + pending } } @@ -947,13 +873,6 @@ impl Pallet { // TODO: make configurable let session_id = Self::session_index() as u64; - println!( - "update_total_activated_liqudity BEFORE {:?}", - TotalActivatedLiquidityForSchedules::::get( - liquidity_asset_id, - liquidity_assets_reward - ) - ); TotalActivatedLiquidityForSchedules::::mutate( liquidity_asset_id, liquidity_assets_reward, @@ -965,7 +884,6 @@ impl Pallet { *pending_negative += diff; }; } else { - println!("update_total_activated_liqudity SWITCH {}", diff); // NOTE: handle burn so negative diff *cumulative = *cumulative + *pending_positive - *pending_negative; if change { @@ -979,26 +897,6 @@ impl Pallet { } }, ); - println!( - "update_total_activated_liqudity AFTER {:?}", - TotalActivatedLiquidityForSchedules::::get( - liquidity_asset_id, - liquidity_assets_reward - ) - ); - - // println!("UPDATE_TOTAL_ACTIVATED_LIQUDITY liq: {} reward:{} amount:{}", liquidity_asset_id, liquidity_assets_reward, diff); - // if let Ok((idx, amount)) = TotalActivatedLiquidityForSchedules::::try_get(liquidity_asset_id, liquidity_assets_reward){ - // - // if session_id > idx { - // PrevTotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |val| *val += amount); - // TotalActivatedLiquidityForSchedules::::insert(liquidity_asset_id, liquidity_assets_reward, (session_id, 0)); - // }else{ - // TotalActivatedLiquidityForSchedules::::mutate(liquidity_asset_id, liquidity_assets_reward, |(session_id, new_amount)| amount += kkj); - // } - // }else{ - // TotalActivatedLiquidityForSchedules::::insert(liquidity_asset_id, liquidity_assets_reward, (session_id, new_amount)); - // } } fn activate_liquidity_for_native_rewards_impl( @@ -1352,16 +1250,6 @@ impl Pallet { true, ); - // TotalActivatedLiquidityForSchedules::::mutate( - // liquidity_asset_id, - // liquidity_assets_reward, - // |amount| -> DispatchResult { - // *amount = - // amount.checked_add(liquidity_assets_added).ok_or(Error::::MathOverflow)?; - // Ok(()) - // }, - // )?; - Ok(()) } @@ -1438,15 +1326,6 @@ impl Pallet { liquidity_assets_burned, false, ); - // TotalActivatedLiquidityForSchedules::::try_mutate( - // liquidity_asset_id, - // reward_token, - // |amount| -> DispatchResult { - // *amount = - // amount.checked_sub(liquidity_assets_burned).ok_or(Error::::MathOverflow)?; - // Ok(()) - // }, - // )?; ActivatedLiquidityForSchedules::::try_mutate_exists( (user.clone(), liquidity_asset_id, reward_token), @@ -1630,7 +1509,6 @@ impl ProofOfStakeRewardsApi for Pallet { ) { let liquidity_token_id = ::ValuationApi::get_liquidity_asset(pool.0, pool.1).expect("pool exist"); - log!(info, "XXXX {}", liquidity_token_id); Pallet::::reward_pool_impl( account.clone(), pool, @@ -1743,45 +1621,6 @@ impl ProofOfStakeRewardsApi for Pallet { impl LiquidityMiningApi for Pallet { /// Distributs liquidity mining rewards between all the activated tokens based on their weight fn distribute_rewards(liquidity_mining_rewards: Balance) { - // R:1 W:0 - // let schedules = RewardsSchedules::::get(); - // - // // R:1 W:0 - // let mut pools = ScheduleRewardsPerSingleLiquidity::::get(); - // - // let it = - // schedules - // .iter() - // .filter_map(|((session, rewarded_token, tokenid, amount, _), ())| { - // if (*session).saturated_into::() >= Self::session_index() { - // Some((rewarded_token, tokenid, amount)) - // } else { - // None - // } - // }); - // - // for (staked_token, rewarded_token, amount) in it { - // // R: T::RewardsSchedulesLimit - in most pesimistic case - // match TotalActivatedLiquidityForSchedules::::get(staked_token, rewarded_token) { - // 0 => {}, - // activated_amount => { - // let activated_amount = U256::from(activated_amount); - // let rewards = - // pools.get(&(*staked_token, *rewarded_token)).cloned().unwrap_or_default(); - // let rewards_for_liquidity = U256::from(*amount) - // .checked_mul(U256::from(u128::MAX)) - // .and_then(|x| x.checked_div(activated_amount)) - // .and_then(|x| x.checked_add(rewards)); - // - // if let Some(val) = rewards_for_liquidity { - // pools.insert((*staked_token, *rewarded_token), val); - // } - // }, - // } - // } - // - // ScheduleRewardsPerSingleLiquidity::::put(pools); - // let _ = PromotedPoolRewards::::try_mutate(|promoted_pools| -> DispatchResult { // benchmark with max of X prom pools let activated_pools: Vec<_> = promoted_pools @@ -1826,5 +1665,3 @@ impl LiquidityMiningApi for Pallet { }); } } - -// test for calculate_3rdparty_rewards_all diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 1000a312ae..2b63cdcd64 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -2117,7 +2117,6 @@ fn user_can_claim_3rdparty_rewards() { ); roll_to_session(2); - println!("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, @@ -2140,7 +2139,6 @@ fn user_can_claim_3rdparty_rewards() { ); roll_to_session(3); - println!("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(1500) @@ -2225,7 +2223,6 @@ fn overlapping_3rdparty_rewards_works() { Ok(10000) ); - println!("############################## ##############################"); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( BOB, @@ -3016,7 +3013,6 @@ fn can_claim_schedule_rewards() { ) .unwrap(); - println!(">>>>>>>>>>>>>>>>>>>>>> ACTIVATE"); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -3025,7 +3021,6 @@ fn can_claim_schedule_rewards() { None, ) .unwrap(); - println!(">>>>>>>>>>>>>>>>>>>>>> ACTIVATE"); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, From 4defde868748920496bab69cfe5164a92df5ae17 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 26 Oct 2023 09:35:41 +0000 Subject: [PATCH 054/125] annotate storage reads & writes --- pallets/proof-of-stake/src/lib.rs | 38 +++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 2239393e01..b2f83d986a 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -191,20 +191,35 @@ pub mod pallet { fn on_initialize(n: T::BlockNumber) -> Weight { let session_id = Self::session_index() as u64; - if frame_system::Pallet::::block_number().saturated_into::() % - T::RewardsDistributionPeriod::get() == - 0u32 - { + // NOTE: 1R + if n.saturated_into::() % T::RewardsDistributionPeriod::get() == 0u32 { ScheduleListPos::::kill(); return Default::default() } - const AMOUNT_PER_BLOCK: u64 = 5; - // NOTE: 3R + 1R - // TODO: make configurable for idx in 0..AMOUNT_PER_BLOCK { + // READS PER ITERTION + // + // ON VALID SCHEDULE (AVERAGE) ====> 3R + 1 W + N*R + N*W + // 3 x READ HEAD,TAIL,POS : ALWAYS + // 1 x WRITE ScheduleListPos : ALWAYS (pesimistic) + // PER ITER: + // - READ RewardsSchedulesList : ALWAYS + // - WRITE ScheduleRewardsTotal : ALWAYS (pesemisitic) + + // ON OUTDATED SCHEDULE (PESIMITIC) =====> 3R + 1W + (N-1)*W + 2W + // 3 x READ HEAD,TAIL,POS : ALWAYS + // 1 x WRITE ScheduleListPos `next` : ONCE (pesemisitic) + // REMOVE N-1 SCHEDULES IN THE MIDDDLE + // - 1 x WRITE update previous schedudle `next` : ALWAYS (pesemisitic) + // REMOVE LAST ELEM: + // - 1 x WRITE update list tail + // - 1 x WRITE update elem before last : ALWAYS (pesemisitic) + + // NOTE: 1R let last_valid = ScheduleListPos::::get(); + // NOTE: 1R let pos = match (last_valid, ScheduleListHead::::get()) { (Some(pos), _) => { if let Some((schedule, next)) = RewardsSchedulesList::::get(pos) { @@ -218,9 +233,11 @@ pub mod pallet { }; if let Some(pos_val) = pos { + // NOTE: 1R if let Some((schedule, next)) = RewardsSchedulesList::::get(pos_val) { if schedule.last_session >= session_id { if schedule.scheduled_at < session_id { + // NOTE: 1R 1W ScheduleRewardsTotal::::mutate( (schedule.liq_token, schedule.reward_token), |(pending, idx, cumulative)| { @@ -234,21 +251,27 @@ pub mod pallet { }, ); } + // NOTE: 1W ScheduleListPos::::put(pos_val); } else { + // NOTE: 2R match (Self::head(), Self::tail()) { (Some(head), Some(tail)) if head == pos_val && head != tail => if let Some(next) = next { + // NOTE: 1W ScheduleListHead::::put(next); }, (Some(head), Some(tail)) if tail == pos_val && head == tail => { + // NOTE: 3W ScheduleListTail::::kill(); ScheduleListHead::::kill(); ScheduleListPos::::kill(); }, (Some(head), Some(tail)) if tail == pos_val && head != tail => if let Some(last_valid) = last_valid { + // NOTE: 1W ScheduleListTail::::put(last_valid); + // NOTE: 1R 1W RewardsSchedulesList::::mutate(last_valid, |data| { if let Some((schedule, next)) = data.as_mut() { *next = None @@ -257,6 +280,7 @@ pub mod pallet { }, (Some(head), Some(tail)) => if let Some(last_valid) = last_valid { + // NOTE: 1R 1W RewardsSchedulesList::::mutate(last_valid, |data| { if let Some((schedule, prev_next)) = data.as_mut() { *prev_next = next From 41d198a95d3b8f446ce8bd62056b4b2d3dace8c0 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Fri, 27 Oct 2023 09:51:16 +0000 Subject: [PATCH 055/125] remove unused param --- pallets/proof-of-stake/src/tests.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 2b63cdcd64..00adf2d878 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1067,7 +1067,7 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { }); } -pub(crate) fn roll_to_while_minting(n: u64, expected_amount_minted: Option) { +pub(crate) fn roll_to_while_minting(n: u64) { let mut session_number: u32; let mut session_issuance: (Balance, Balance); let mut block_issuance: Balance; @@ -1081,10 +1081,6 @@ pub(crate) fn roll_to_while_minting(n: u64, expected_amount_minted: Option()); - if let Some(x) = expected_amount_minted { - assert_eq!(x, block_issuance); - } - // Compute issuance for the next session only after all issuance has been issued is current session // To avoid overestimating the missing issuance and overshooting the cap if ((System::block_number().saturated_into::() + 1u32) % BlocksPerRound::get()) == 0 { @@ -1122,12 +1118,12 @@ fn test_migrated_from_pallet_issuance() { ) .unwrap(); - roll_to_while_minting(4, None); + roll_to_while_minting(4); assert_eq!( U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); - roll_to_while_minting(9, None); + roll_to_while_minting(9); assert_eq!( U256::from_dec_str("153142037538566829850910961827022692956054020").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() @@ -1142,7 +1138,7 @@ fn test_migrated_from_pallet_issuance() { None, ) .unwrap(); - roll_to_while_minting(14, None); + roll_to_while_minting(14); assert_eq!( U256::from_dec_str("191427546923208537313638702283778366195067525").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() @@ -1152,7 +1148,7 @@ fn test_migrated_from_pallet_issuance() { ProofOfStake::get_pool_rewards(2).unwrap() ); - roll_to_while_minting(19, None); + roll_to_while_minting(19); assert_eq!( U256::from_dec_str("229713056307850244776366442740534039434081030").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() From 29e305aab9e816b337df3c1513913c1362396fbf Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sat, 28 Oct 2023 15:19:04 +0000 Subject: [PATCH 056/125] align issuance & pos rewards period --- pallets/proof-of-stake/src/lib.rs | 15 +-- pallets/proof-of-stake/src/mock.rs | 2 +- pallets/proof-of-stake/src/tests.rs | 142 ++++++++++++++++++---------- 3 files changed, 104 insertions(+), 55 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index b2f83d986a..831b74b6c1 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -192,10 +192,11 @@ pub mod pallet { let session_id = Self::session_index() as u64; // NOTE: 1R - if n.saturated_into::() % T::RewardsDistributionPeriod::get() == 0u32 { + if Self::is_new_session() { ScheduleListPos::::kill(); return Default::default() } + const AMOUNT_PER_BLOCK: u64 = 5; for idx in 0..AMOUNT_PER_BLOCK { @@ -1156,14 +1157,16 @@ impl Pallet { } pub fn session_index() -> u32 { - frame_system::Pallet::::block_number() - .saturated_into::() - .checked_div(T::RewardsDistributionPeriod::get()) - .unwrap_or(0) + Self::get_current_rewards_time().unwrap_or_default() } pub fn rewards_period() -> u32 { - ::RewardsDistributionPeriod::get() + T::RewardsDistributionPeriod::get() + } + + pub fn is_new_session() -> bool { + let block_nr = frame_system::Pallet::::block_number().saturated_into::(); + (block_nr + 1) % Self::rewards_period() == 0u32 } fn native_token_id() -> TokenId { diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index ebaddba9d0..877f0af460 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -170,7 +170,7 @@ parameter_types! { pub const ImmediateTGEReleasePercent: Percent = Percent::from_percent(20); pub const TGEReleasePeriod: u32 = 100u32; // 2 years pub const TGEReleaseBegin: u32 = 10u32; // Two weeks into chain start - pub const BlocksPerRound: u32 = 5u32; + pub const BlocksPerRound: u32 = 10u32; pub const HistoryLimit: u32 = 10u32; } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 00adf2d878..4616176584 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -43,13 +43,33 @@ fn initialize_liquidity_rewards() { .unwrap(); } -pub(crate) fn roll_to_session(n: u32) { - let block = n * Pallet::::rewards_period(); +fn process_all_schedules_in_current_session() { + let session = ProofOfStake::session_index(); + loop { + if ProofOfStake::session_index() > session { + panic!("couldnt process all schedules within the session"); + } + + if !ProofOfStake::is_new_session() && ProofOfStake::pos() == ProofOfStake::tail() { + break + } + roll_to_next_block(); + } +} + +fn roll_to_next_block() { + forward_to_block((System::block_number() + 1).saturated_into::()); +} + +fn roll_to_next_session() { + let current_session = ProofOfStake::session_index(); + roll_to_session(current_session + 1); +} - if block < System::block_number().saturated_into::() { - panic!("cannot roll to past block"); +pub fn roll_to_session(n: u32) { + while ProofOfStake::session_index() < n { + roll_to_next_block(); } - forward_to_block(block); } fn forward_to_block(n: u32) { @@ -57,13 +77,60 @@ fn forward_to_block(n: u32) { } fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { - while System::block_number().saturated_into::() <= n { + while System::block_number().saturated_into::() < n { + System::set_block_number(System::block_number().saturated_into::() + 1); ProofOfStake::on_initialize(System::block_number().saturated_into::()); - if System::block_number().saturated_into::() % ProofOfStake::rewards_period() == 0 { + if ProofOfStake::is_new_session() { ProofOfStake::distribute_rewards(rewards); } ProofOfStake::on_finalize(n as u64); - System::set_block_number(System::block_number().saturated_into::() + 1); + } +} +// +// pub fn roll_to_while_minting(n: u64) { +// let mut session_number: u32; +// let mut session_issuance: (Balance, Balance); +// let mut block_issuance: Balance; +// while System::block_number() < n { +// System::on_finalize(System::block_number()); +// +// System::set_block_number(System::block_number() + 1); +// +// System::on_initialize(System::block_number()); +// session_number = ProofOfStake::session_index(); +// session_issuance = ::get_all_issuance(session_number) +// .expect("session issuance is always populated in advance"); +// block_issuance = (session_issuance.0 + session_issuance.1) / +// (BlocksPerRound::get().saturated_into::()); +// +// // Compute issuance for the next session only after all issuance has been issued is current session +// // To avoid overestimating the missing issuance and overshooting the cap +// if ProofOfStake::is_new_session() { +// ::compute_issuance(session_number + 1u32); +// } +// } +// } + +pub(crate) fn roll_to_while_minting(n: u64) { + let mut session_number: u32; + let mut session_issuance: (Balance, Balance); + let mut block_issuance: Balance; + while System::block_number() < n { + System::on_finalize(System::block_number()); + System::set_block_number(System::block_number() + 1); + System::on_initialize(System::block_number()); + session_number = System::block_number().saturated_into::() / BlocksPerRound::get(); + session_issuance = ::get_all_issuance(session_number) + .expect("session issuance is always populated in advance"); + block_issuance = (session_issuance.0 + session_issuance.1) / (BlocksPerRound::get().saturated_into::()); + + // Compute issuance for the next session only after all issuance has been issued is current session + // To avoid overestimating the missing issuance and overshooting the cap + // if ((System::block_number().saturated_into::() + 1u32) % BlocksPerRound::get()) == 0 { + // if ((System::block_number().saturated_into::() + 1u32) % BlocksPerRound::get()) == 0 { + if ProofOfStake::is_new_session(){ + ::compute_issuance(session_number + 1u32); + } } } @@ -630,7 +697,7 @@ fn rewards_rounding_during_often_mint() { let mut higher_rewards_cumulative = 0; for n in 1..10000 { System::set_block_number(n); - if (n + 1) % (ProofOfStake::rewards_period() as u64) == 0 { + if ProofOfStake::is_new_session() { ProofOfStake::distribute_rewards(10000); mint_and_activate_tokens( @@ -1067,28 +1134,6 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { }); } -pub(crate) fn roll_to_while_minting(n: u64) { - let mut session_number: u32; - let mut session_issuance: (Balance, Balance); - let mut block_issuance: Balance; - while System::block_number() < n { - System::on_finalize(System::block_number()); - System::set_block_number(System::block_number() + 1); - System::on_initialize(System::block_number()); - session_number = System::block_number().saturated_into::() / BlocksPerRound::get(); - session_issuance = ::get_all_issuance(session_number) - .expect("session issuance is always populated in advance"); - block_issuance = (session_issuance.0 + session_issuance.1) / - (BlocksPerRound::get().saturated_into::()); - - // Compute issuance for the next session only after all issuance has been issued is current session - // To avoid overestimating the missing issuance and overshooting the cap - if ((System::block_number().saturated_into::() + 1u32) % BlocksPerRound::get()) == 0 { - ::compute_issuance(session_number + 1u32); - } - } -} - #[test] fn test_migrated_from_pallet_issuance() { new_test_ext().execute_with(|| { @@ -1118,14 +1163,14 @@ fn test_migrated_from_pallet_issuance() { ) .unwrap(); - roll_to_while_minting(4); + roll_to_while_minting(9); assert_eq!( - U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), + U256::from_dec_str("153142377820933750789374425201630124724265475").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); - roll_to_while_minting(9); + roll_to_while_minting(19); assert_eq!( - U256::from_dec_str("153142037538566829850910961827022692956054020").unwrap(), + U256::from_dec_str("306284755641867501578748850403260249448530950").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); @@ -1138,23 +1183,23 @@ fn test_migrated_from_pallet_issuance() { None, ) .unwrap(); - roll_to_while_minting(14); + roll_to_while_minting(29); assert_eq!( - U256::from_dec_str("191427546923208537313638702283778366195067525").unwrap(), + U256::from_dec_str("382855774411150916504204331316771595926557960").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); assert_eq!( - U256::from_dec_str("38285509384641707462727740456755673239013505").unwrap(), + U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), ProofOfStake::get_pool_rewards(2).unwrap() ); - - roll_to_while_minting(19); + // + roll_to_while_minting(39); assert_eq!( - U256::from_dec_str("229713056307850244776366442740534039434081030").unwrap(), + U256::from_dec_str("459426793180434331429659812230282942404584970").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); assert_eq!( - U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), + U256::from_dec_str("153142037538566829850910961827022692956054020").unwrap(), ProofOfStake::get_pool_rewards(2).unwrap() ); }); @@ -1531,11 +1576,11 @@ fn rewards_linked_list_removes_outdated_schedule_automatically() { assert_eq!(ScheduleListTail::::get(), Some(1u64)); assert_eq!(ScheduleListPos::::get(), Some(1u64)); - forward_to_block(30); + forward_to_block(29); assert_eq!(ScheduleListHead::::get(), Some(1u64)); assert_eq!(ScheduleListTail::::get(), Some(1u64)); - forward_to_block(31); + forward_to_block(30); assert_eq!(ScheduleListHead::::get(), None); assert_eq!(ScheduleListTail::::get(), None); assert_eq!(ScheduleListPos::::get(), None); @@ -1691,7 +1736,7 @@ fn remove_first_few_elems_at_once_from_linked_list() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(3u64)); - forward_to_block(21); + forward_to_block(20); assert_eq!(ScheduleListHead::::get(), Some(2u64)); assert_eq!(ScheduleListTail::::get(), Some(3u64)); @@ -1833,8 +1878,8 @@ fn remove_random_elements_from_linked_list_over_time() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(6u64)); - forward_to_block(24); - + roll_to_session(2); + process_all_schedules_in_current_session(); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(6u64)); assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); @@ -1843,7 +1888,8 @@ fn remove_random_elements_from_linked_list_over_time() { assert_eq!(RewardsSchedulesList::::get(4u64).unwrap().1, Some(6u64)); assert_eq!(RewardsSchedulesList::::get(6u64).unwrap().1, None); - forward_to_block(40); + roll_to_session(3); + process_all_schedules_in_current_session(); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(6u64)); From 35983739cbd20335988edb88cef440e81597b2f9 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sun, 29 Oct 2023 20:10:52 +0000 Subject: [PATCH 057/125] wip does not work --- pallets/proof-of-stake/src/tests.rs | 110 ++++++++++++---------------- 1 file changed, 48 insertions(+), 62 deletions(-) diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 4616176584..a2ca124d5e 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -77,39 +77,25 @@ fn forward_to_block(n: u32) { } fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { + while System::block_number().saturated_into::() < n { - System::set_block_number(System::block_number().saturated_into::() + 1); - ProofOfStake::on_initialize(System::block_number().saturated_into::()); + + let new_block_number = System::block_number().saturated_into::() + 1; + System::set_block_number(new_block_number); + + System::on_initialize(new_block_number); + ProofOfStake::on_initialize(new_block_number); + if ProofOfStake::is_new_session() { ProofOfStake::distribute_rewards(rewards); + ::compute_issuance(ProofOfStake::session_index() + 1); } - ProofOfStake::on_finalize(n as u64); + + ProofOfStake::on_finalize(new_block_number); + System::on_finalize(new_block_number); } } -// -// pub fn roll_to_while_minting(n: u64) { -// let mut session_number: u32; -// let mut session_issuance: (Balance, Balance); -// let mut block_issuance: Balance; -// while System::block_number() < n { -// System::on_finalize(System::block_number()); -// -// System::set_block_number(System::block_number() + 1); -// -// System::on_initialize(System::block_number()); -// session_number = ProofOfStake::session_index(); -// session_issuance = ::get_all_issuance(session_number) -// .expect("session issuance is always populated in advance"); -// block_issuance = (session_issuance.0 + session_issuance.1) / -// (BlocksPerRound::get().saturated_into::()); -// -// // Compute issuance for the next session only after all issuance has been issued is current session -// // To avoid overestimating the missing issuance and overshooting the cap -// if ProofOfStake::is_new_session() { -// ::compute_issuance(session_number + 1u32); -// } -// } -// } + pub(crate) fn roll_to_while_minting(n: u64) { let mut session_number: u32; @@ -122,7 +108,7 @@ pub(crate) fn roll_to_while_minting(n: u64) { session_number = System::block_number().saturated_into::() / BlocksPerRound::get(); session_issuance = ::get_all_issuance(session_number) .expect("session issuance is always populated in advance"); - block_issuance = (session_issuance.0 + session_issuance.1) / (BlocksPerRound::get().saturated_into::()); + block_issuance = (session_issuance.0 + session_issuance.1) / ProofOfStake::rewards_period() as u128; // Compute issuance for the next session only after all issuance has been issued is current session // To avoid overestimating the missing issuance and overshooting the cap @@ -1163,45 +1149,45 @@ fn test_migrated_from_pallet_issuance() { ) .unwrap(); - roll_to_while_minting(9); + forward_to_block(9); assert_eq!( U256::from_dec_str("153142377820933750789374425201630124724265475").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); - roll_to_while_minting(19); - assert_eq!( - U256::from_dec_str("306284755641867501578748850403260249448530950").unwrap(), - ProofOfStake::get_pool_rewards(1).unwrap() - ); - - assert_eq!(2, TokensOf::::create(&99999, 1_000_000u128).unwrap()); - ProofOfStake::enable(2, 1u8); - ProofOfStake::activate_liquidity_for_native_rewards( - RuntimeOrigin::signed(99999), - 2, - 1, - None, - ) - .unwrap(); - roll_to_while_minting(29); - assert_eq!( - U256::from_dec_str("382855774411150916504204331316771595926557960").unwrap(), - ProofOfStake::get_pool_rewards(1).unwrap() - ); - assert_eq!( - U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), - ProofOfStake::get_pool_rewards(2).unwrap() - ); + // roll_to_while_minting(19); + // assert_eq!( + // U256::from_dec_str("306284755641867501578748850403260249448530950").unwrap(), + // ProofOfStake::get_pool_rewards(1).unwrap() + // ); // - roll_to_while_minting(39); - assert_eq!( - U256::from_dec_str("459426793180434331429659812230282942404584970").unwrap(), - ProofOfStake::get_pool_rewards(1).unwrap() - ); - assert_eq!( - U256::from_dec_str("153142037538566829850910961827022692956054020").unwrap(), - ProofOfStake::get_pool_rewards(2).unwrap() - ); + // assert_eq!(2, TokensOf::::create(&99999, 1_000_000u128).unwrap()); + // ProofOfStake::enable(2, 1u8); + // ProofOfStake::activate_liquidity_for_native_rewards( + // RuntimeOrigin::signed(99999), + // 2, + // 1, + // None, + // ) + // .unwrap(); + // roll_to_while_minting(29); + // assert_eq!( + // U256::from_dec_str("382855774411150916504204331316771595926557960").unwrap(), + // ProofOfStake::get_pool_rewards(1).unwrap() + // ); + // assert_eq!( + // U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), + // ProofOfStake::get_pool_rewards(2).unwrap() + // ); + // // + // roll_to_while_minting(39); + // assert_eq!( + // U256::from_dec_str("459426793180434331429659812230282942404584970").unwrap(), + // ProofOfStake::get_pool_rewards(1).unwrap() + // ); + // assert_eq!( + // U256::from_dec_str("153142037538566829850910961827022692956054020").unwrap(), + // ProofOfStake::get_pool_rewards(2).unwrap() + // ); }); } From 776e60ac2c9a21860f735241133d3cc0d1dbbd86 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 30 Oct 2023 07:02:25 +0100 Subject: [PATCH 058/125] removed custom block progression method --- pallets/proof-of-stake/src/tests.rs | 95 +++++++++++------------------ 1 file changed, 36 insertions(+), 59 deletions(-) diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index a2ca124d5e..9479d9f1b0 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -88,7 +88,6 @@ fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { if ProofOfStake::is_new_session() { ProofOfStake::distribute_rewards(rewards); - ::compute_issuance(ProofOfStake::session_index() + 1); } ProofOfStake::on_finalize(new_block_number); @@ -97,29 +96,6 @@ fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { } -pub(crate) fn roll_to_while_minting(n: u64) { - let mut session_number: u32; - let mut session_issuance: (Balance, Balance); - let mut block_issuance: Balance; - while System::block_number() < n { - System::on_finalize(System::block_number()); - System::set_block_number(System::block_number() + 1); - System::on_initialize(System::block_number()); - session_number = System::block_number().saturated_into::() / BlocksPerRound::get(); - session_issuance = ::get_all_issuance(session_number) - .expect("session issuance is always populated in advance"); - block_issuance = (session_issuance.0 + session_issuance.1) / ProofOfStake::rewards_period() as u128; - - // Compute issuance for the next session only after all issuance has been issued is current session - // To avoid overestimating the missing issuance and overshooting the cap - // if ((System::block_number().saturated_into::() + 1u32) % BlocksPerRound::get()) == 0 { - // if ((System::block_number().saturated_into::() + 1u32) % BlocksPerRound::get()) == 0 { - if ProofOfStake::is_new_session(){ - ::compute_issuance(session_number + 1u32); - } - } -} - #[test] fn liquidity_rewards_single_user_mint_W() { new_test_ext().execute_with(|| { @@ -1125,6 +1101,7 @@ fn test_migrated_from_pallet_issuance() { new_test_ext().execute_with(|| { env_logger::try_init(); System::set_block_number(1); + const LIQUIDITY_ISSUANCE: Balance = 450045; let token_id = TokensOf::::create(&99999, 2000_000_000).unwrap(); assert_eq!(token_id, 0); @@ -1149,45 +1126,45 @@ fn test_migrated_from_pallet_issuance() { ) .unwrap(); - forward_to_block(9); + forward_to_block_with_custom_rewards(9, LIQUIDITY_ISSUANCE); assert_eq!( U256::from_dec_str("153142377820933750789374425201630124724265475").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); - // roll_to_while_minting(19); - // assert_eq!( - // U256::from_dec_str("306284755641867501578748850403260249448530950").unwrap(), - // ProofOfStake::get_pool_rewards(1).unwrap() - // ); - // - // assert_eq!(2, TokensOf::::create(&99999, 1_000_000u128).unwrap()); - // ProofOfStake::enable(2, 1u8); - // ProofOfStake::activate_liquidity_for_native_rewards( - // RuntimeOrigin::signed(99999), - // 2, - // 1, - // None, - // ) - // .unwrap(); - // roll_to_while_minting(29); - // assert_eq!( - // U256::from_dec_str("382855774411150916504204331316771595926557960").unwrap(), - // ProofOfStake::get_pool_rewards(1).unwrap() - // ); - // assert_eq!( - // U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), - // ProofOfStake::get_pool_rewards(2).unwrap() - // ); - // // - // roll_to_while_minting(39); - // assert_eq!( - // U256::from_dec_str("459426793180434331429659812230282942404584970").unwrap(), - // ProofOfStake::get_pool_rewards(1).unwrap() - // ); - // assert_eq!( - // U256::from_dec_str("153142037538566829850910961827022692956054020").unwrap(), - // ProofOfStake::get_pool_rewards(2).unwrap() - // ); + forward_to_block_with_custom_rewards(19, LIQUIDITY_ISSUANCE); + assert_eq!( + U256::from_dec_str("306284755641867501578748850403260249448530950").unwrap(), + ProofOfStake::get_pool_rewards(1).unwrap() + ); + + assert_eq!(2, TokensOf::::create(&99999, 1_000_000u128).unwrap()); + ProofOfStake::enable(2, 1u8); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(99999), + 2, + 1, + None, + ) + .unwrap(); + forward_to_block_with_custom_rewards(29, LIQUIDITY_ISSUANCE); + assert_eq!( + U256::from_dec_str("382855774411150916504204331316771595926557960").unwrap(), + ProofOfStake::get_pool_rewards(1).unwrap() + ); + assert_eq!( + U256::from_dec_str("76571018769283414925455480913511346478027010").unwrap(), + ProofOfStake::get_pool_rewards(2).unwrap() + ); + + forward_to_block_with_custom_rewards(39, LIQUIDITY_ISSUANCE); + assert_eq!( + U256::from_dec_str("459426793180434331429659812230282942404584970").unwrap(), + ProofOfStake::get_pool_rewards(1).unwrap() + ); + assert_eq!( + U256::from_dec_str("153142037538566829850910961827022692956054020").unwrap(), + ProofOfStake::get_pool_rewards(2).unwrap() + ); }); } From 50f5e34a769804cf699b1ca3c75e5bda2d9a723f Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 30 Oct 2023 08:16:41 +0100 Subject: [PATCH 059/125] add test for preventing activation on unpromoted pool --- pallets/proof-of-stake/src/tests.rs | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 9479d9f1b0..9db8e83b4a 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -4064,3 +4064,66 @@ fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedu ); }); } + + +#[test] +#[serial] +fn activity_for_schedule_rewards_can_be_activated_only_after_pool_is_rewarded_for_the_first_time() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, 10 * 3 * REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .build() + .execute_with(|| { + System::set_block_number(1); + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + + assert_err_ignore_postinfo!( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ), + Error::::NotAPromotedPool + ); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 2u8).unwrap(); + + assert_err_ignore_postinfo!( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ), + Error::::NotAPromotedPool + ); + + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT / 2, + 10u32.into(), + ) + .unwrap(); + + + assert_ok!( + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + ); + + }); +} From 8ce3cb122f366c763e59d7a6888ac336c29419cc Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 30 Oct 2023 08:17:03 +0100 Subject: [PATCH 060/125] move cumulative distributed calculations to dedicated class --- pallets/fee-lock/src/mock.rs | 2 +- pallets/proof-of-stake/src/lib.rs | 143 +++--------------- pallets/proof-of-stake/src/reward_info.rs | 3 +- .../src/schedule_rewards_calculator.rs | 128 ++++++++++++++++ 4 files changed, 149 insertions(+), 127 deletions(-) create mode 100644 pallets/proof-of-stake/src/schedule_rewards_calculator.rs diff --git a/pallets/fee-lock/src/mock.rs b/pallets/fee-lock/src/mock.rs index 0e3dbab812..40052e6332 100644 --- a/pallets/fee-lock/src/mock.rs +++ b/pallets/fee-lock/src/mock.rs @@ -14,8 +14,8 @@ use crate as pallet_fee_lock; use frame_support::{ construct_runtime, parameter_types, traits::{ConstU32, Contains, Everything}, - weights::{constants::RocksDbWeight, Weight}, PalletId, + weights::{constants::RocksDbWeight}, }; use frame_system as system; use mangata_types::Amount; diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 831b74b6c1..f29ab0b271 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -133,7 +133,11 @@ use sp_runtime::{traits::SaturatedConversion, Perbill}; use sp_std::{convert::TryInto, prelude::*}; mod reward_info; -use reward_info::{AsymptoticCurveRewards, ConstCurveRewards, RewardInfo, RewardsCalculator}; +use reward_info::{RewardInfo, RewardsCalculator}; + +mod schedule_rewards_calculator; +use schedule_rewards_calculator::ScheduleRewardsCalculator; + mod benchmarking; #[cfg(test)] @@ -178,7 +182,6 @@ const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!") #[frame_support::pallet] pub mod pallet { use frame_support::traits::Currency; - use mangata_support::traits::PoolCreateApi; use super::*; @@ -186,9 +189,10 @@ pub mod pallet { #[pallet::without_storage_info] pub struct Pallet(PhantomData); + #[pallet::hooks] impl Hooks for Pallet { - fn on_initialize(n: T::BlockNumber) -> Weight { + fn on_initialize(_n: T::BlockNumber) -> Weight { let session_id = Self::session_index() as u64; // NOTE: 1R @@ -199,7 +203,7 @@ pub mod pallet { const AMOUNT_PER_BLOCK: u64 = 5; - for idx in 0..AMOUNT_PER_BLOCK { + for _ in 0..AMOUNT_PER_BLOCK { // READS PER ITERTION // // ON VALID SCHEDULE (AVERAGE) ====> 3R + 1 W + N*R + N*W @@ -223,7 +227,7 @@ pub mod pallet { // NOTE: 1R let pos = match (last_valid, ScheduleListHead::::get()) { (Some(pos), _) => { - if let Some((schedule, next)) = RewardsSchedulesList::::get(pos) { + if let Some((_schedule, next)) = RewardsSchedulesList::::get(pos) { next } else { None @@ -274,16 +278,16 @@ pub mod pallet { ScheduleListTail::::put(last_valid); // NOTE: 1R 1W RewardsSchedulesList::::mutate(last_valid, |data| { - if let Some((schedule, next)) = data.as_mut() { + if let Some((_schedule, next)) = data.as_mut() { *next = None } }); }, - (Some(head), Some(tail)) => + (Some(_head), Some(_tail)) => if let Some(last_valid) = last_valid { // NOTE: 1R 1W RewardsSchedulesList::::mutate(last_valid, |data| { - if let Some((schedule, prev_next)) = data.as_mut() { + if let Some((_schedule, prev_next)) = data.as_mut() { *prev_next = next } }); @@ -466,6 +470,7 @@ pub mod pallet { pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat, (TokenId, TokenId), (u128, u64, u128), ValueQuery>; + #[pallet::storage] pub type ScheduleRewardsPerLiquidity = StorageMap<_, Twox64Concat, (TokenId, TokenId), (U256, u64), ValueQuery>; @@ -646,7 +651,6 @@ pub mod pallet { /// - amount - amount of the token /// - schedule_end - id of the last rewarded seession. Rewards will be distributedd equally between sessions in range (now .. /// schedule_end). Distribution starts from the *next* session till `schedule_end`. - // TODO: delays schedule by 1 session #[transactional] #[pallet::call_index(4)] #[pallet::weight(<::WeightInfo>::reward_pool())] @@ -748,7 +752,7 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - Self::update_cumulative_rewards(liquidity_token_id, reward_token); + ScheduleRewardsCalculator::::update_cumulative_rewards(liquidity_token_id, reward_token); Self::claim_schedule_rewards_all_impl(sender, liquidity_token_id, reward_token)?; Ok(()) } @@ -813,116 +817,6 @@ pub mod pallet { } impl Pallet { - fn update_cumulative_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) { - let (cumulative, idx) = - ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Self::session_index() as u64) { - } else { - let total_activated_liquidity = - Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); - let total_schedule_rewards = - Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); - if total_activated_liquidity > 0 { - ScheduleRewardsTotal::::mutate( - (liquidity_asset_id, liquidity_assets_reward), - |(cumulative, _, _)| { - *cumulative = 0; - }, - ); - let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) - .checked_div(U256::from(total_activated_liquidity)) - .unwrap_or_default(); - ScheduleRewardsPerLiquidity::::insert( - (liquidity_asset_id, liquidity_assets_reward), - (cumulative + pending, (Self::session_index() as u64)), - ); - } - } - } - - fn total_rewards_for_liquidity( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - ) -> U256 { - let (cumulative, idx) = - ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Self::session_index() as u64) { - cumulative - } else { - let total_activated_liquidity = - Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); - let total_schedule_rewards = - Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); - let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) - .checked_div(U256::from(total_activated_liquidity)) - .unwrap_or_default(); - cumulative + pending - } - } - - fn total_activated_liquidity( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - ) -> Balance { - let (pending_negative, pending_positive, idx, cumulative) = - TotalActivatedLiquidityForSchedules::::get( - liquidity_asset_id, - liquidity_assets_reward, - ); - if idx == (Self::session_index() as u64) { - cumulative - } else { - cumulative + pending_positive - pending_negative - } - } - - fn total_schedule_rewards( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - ) -> Balance { - let (pending, idx, cumulative) = - ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Self::session_index() as u64) { - cumulative - } else { - cumulative + pending - } - } - - fn update_total_activated_liqudity( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - diff: Balance, - change: bool, - ) { - // TODO: make configurable - let session_id = Self::session_index() as u64; - - TotalActivatedLiquidityForSchedules::::mutate( - liquidity_asset_id, - liquidity_assets_reward, - |(pending_negative, pending_positive, idx, cumulative)| { - if *idx == session_id { - if change { - *pending_positive += diff; - } else { - *pending_negative += diff; - }; - } else { - // NOTE: handle burn so negative diff - *cumulative = *cumulative + *pending_positive - *pending_negative; - if change { - *pending_positive = diff; - *pending_negative = 0u128; - } else { - *pending_positive = 0u128; - *pending_negative = diff; - }; - *idx = session_id; - } - }, - ); - } fn activate_liquidity_for_native_rewards_impl( user: AccountIdOf, @@ -1189,7 +1083,6 @@ impl Pallet { } fn ensure_is_promoted_pool(liquidity_asset_id: TokenId) -> Result<(), DispatchError> { - //NOTE: 2 separate functions for separate rewards if Self::get_pool_rewards(liquidity_asset_id).is_ok() || RewardTokensPerPool::::iter_prefix_values(liquidity_asset_id) .next() @@ -1238,7 +1131,7 @@ impl Pallet { ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - Self::update_cumulative_rewards(liquidity_asset_id, liquidity_assets_reward); + ScheduleRewardsCalculator::::update_cumulative_rewards(liquidity_asset_id, liquidity_assets_reward); { let calc = RewardsCalculator::schedule_rewards::( user.clone(), @@ -1270,7 +1163,7 @@ impl Pallet { }, )?; - Self::update_total_activated_liqudity( + ScheduleRewardsCalculator::::update_total_activated_liqudity( liquidity_asset_id, liquidity_assets_reward, liquidity_assets_added, @@ -1329,7 +1222,7 @@ impl Pallet { reward_token: TokenId, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - Self::update_cumulative_rewards(liquidity_asset_id, reward_token); + ScheduleRewardsCalculator::::update_cumulative_rewards(liquidity_asset_id, reward_token); let calc = RewardsCalculator::schedule_rewards::( user.clone(), @@ -1347,7 +1240,7 @@ impl Pallet { rewards_info, ); - Self::update_total_activated_liqudity( + ScheduleRewardsCalculator::::update_total_activated_liqudity( liquidity_asset_id, reward_token, liquidity_assets_burned, diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index ece914f5a3..9c0b14f74c 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -1,6 +1,7 @@ use frame_support::dispatch::DispatchResult; use crate::{Config, Error, Pallet}; +use crate::schedule_rewards_calculator::ScheduleRewardsCalculator; use frame_support::pallet_prelude::*; use mangata_types::{Balance, TokenId}; use sp_core::U256; @@ -94,7 +95,7 @@ impl RewardsCalculator { // println!("total_rewards : {}", total_rewards); // let pool_ratio_current = U256::from(total_rewards.checked_div(total_activated).unwrap_or_default()) * U256::from(u128::MAX); let pool_ratio_current = - Pallet::::total_rewards_for_liquidity(asset_id, reward_asset_id); + ScheduleRewardsCalculator::::total_rewards_for_liquidity(asset_id, reward_asset_id); println!("SCHEDULE REWARDS RATIO: {}", pool_ratio_current); let default_rewards = RewardInfo { diff --git a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs new file mode 100644 index 0000000000..fb9c5da382 --- /dev/null +++ b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs @@ -0,0 +1,128 @@ + +use core::marker::PhantomData; +use crate::Config; +use crate::Pallet; +use crate::ScheduleRewardsPerLiquidity; +use crate::TotalActivatedLiquidityForSchedules; +use crate::ScheduleRewardsTotal; +use mangata_types::{Balance, TokenId}; +use sp_core::U256; + + pub struct ScheduleRewardsCalculator { + data: PhantomData + } + + impl ScheduleRewardsCalculator { + + pub fn update_cumulative_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) { + let (cumulative, idx) = + ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Pallet::::session_index() as u64) { + } else { + let total_activated_liquidity = + Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); + let total_schedule_rewards = + Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + if total_activated_liquidity > 0 { + ScheduleRewardsTotal::::mutate( + (liquidity_asset_id, liquidity_assets_reward), + |(cumulative, _, _)| { + *cumulative = 0; + }, + ); + let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) + .checked_div(U256::from(total_activated_liquidity)) + .unwrap_or_default(); + ScheduleRewardsPerLiquidity::::insert( + + (liquidity_asset_id, liquidity_assets_reward), + (cumulative + pending, (Pallet::::session_index() as u64)), + ); + } + } + } + + pub fn total_rewards_for_liquidity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> U256 { + let (cumulative, idx) = + ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Pallet::::session_index() as u64) { + cumulative + } else { + let total_activated_liquidity = + Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); + let total_schedule_rewards = + Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) + .checked_div(U256::from(total_activated_liquidity)) + .unwrap_or_default(); + cumulative + pending + } + } + + pub fn total_activated_liquidity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> Balance { + let (pending_negative, pending_positive, idx, cumulative) = + TotalActivatedLiquidityForSchedules::::get( + liquidity_asset_id, + liquidity_assets_reward, + ); + if idx == (Pallet::::session_index() as u64) { + cumulative + } else { + cumulative + pending_positive - pending_negative + } + } + + pub fn total_schedule_rewards( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> Balance { + let (pending, idx, cumulative) = + ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Pallet::::session_index() as u64) { + cumulative + } else { + cumulative + pending + } + } + + pub fn update_total_activated_liqudity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + diff: Balance, + change: bool, + ) { + // TODO: make configurable + let session_id = Pallet::::session_index() as u64; + + TotalActivatedLiquidityForSchedules::::mutate( + liquidity_asset_id, + liquidity_assets_reward, + |(pending_negative, pending_positive, idx, cumulative)| { + if *idx == session_id { + if change { + *pending_positive += diff; + } else { + *pending_negative += diff; + }; + } else { + // NOTE: handle burn so negative diff + *cumulative = *cumulative + *pending_positive - *pending_negative; + if change { + *pending_positive = diff; + *pending_negative = 0u128; + } else { + *pending_positive = 0u128; + *pending_negative = diff; + }; + *idx = session_id; + } + }, + ); + } + } From d4a94cd302973b854ed8181e995db555a8fbbd49 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 30 Oct 2023 09:07:26 +0100 Subject: [PATCH 061/125] refactor: create ScheduleRewardsCalculator --- pallets/fee-lock/src/mock.rs | 2 +- pallets/proof-of-stake/src/lib.rs | 13 +- pallets/proof-of-stake/src/reward_info.rs | 3 +- .../src/schedule_rewards_calculator.rs | 203 +++++++++--------- pallets/proof-of-stake/src/tests.rs | 26 +-- 5 files changed, 120 insertions(+), 127 deletions(-) diff --git a/pallets/fee-lock/src/mock.rs b/pallets/fee-lock/src/mock.rs index 40052e6332..aa39313d10 100644 --- a/pallets/fee-lock/src/mock.rs +++ b/pallets/fee-lock/src/mock.rs @@ -14,8 +14,8 @@ use crate as pallet_fee_lock; use frame_support::{ construct_runtime, parameter_types, traits::{ConstU32, Contains, Everything}, + weights::constants::RocksDbWeight, PalletId, - weights::{constants::RocksDbWeight}, }; use frame_system as system; use mangata_types::Amount; diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index f29ab0b271..131a771eb2 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -189,7 +189,6 @@ pub mod pallet { #[pallet::without_storage_info] pub struct Pallet(PhantomData); - #[pallet::hooks] impl Hooks for Pallet { fn on_initialize(_n: T::BlockNumber) -> Weight { @@ -470,7 +469,6 @@ pub mod pallet { pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat, (TokenId, TokenId), (u128, u64, u128), ValueQuery>; - #[pallet::storage] pub type ScheduleRewardsPerLiquidity = StorageMap<_, Twox64Concat, (TokenId, TokenId), (U256, u64), ValueQuery>; @@ -752,7 +750,10 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - ScheduleRewardsCalculator::::update_cumulative_rewards(liquidity_token_id, reward_token); + ScheduleRewardsCalculator::::update_cumulative_rewards( + liquidity_token_id, + reward_token, + ); Self::claim_schedule_rewards_all_impl(sender, liquidity_token_id, reward_token)?; Ok(()) } @@ -817,7 +818,6 @@ pub mod pallet { } impl Pallet { - fn activate_liquidity_for_native_rewards_impl( user: AccountIdOf, liquidity_asset_id: TokenId, @@ -1131,7 +1131,10 @@ impl Pallet { ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; - ScheduleRewardsCalculator::::update_cumulative_rewards(liquidity_asset_id, liquidity_assets_reward); + ScheduleRewardsCalculator::::update_cumulative_rewards( + liquidity_asset_id, + liquidity_assets_reward, + ); { let calc = RewardsCalculator::schedule_rewards::( user.clone(), diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 9c0b14f74c..8abb74214d 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -1,7 +1,6 @@ use frame_support::dispatch::DispatchResult; -use crate::{Config, Error, Pallet}; -use crate::schedule_rewards_calculator::ScheduleRewardsCalculator; +use crate::{schedule_rewards_calculator::ScheduleRewardsCalculator, Config, Error, Pallet}; use frame_support::pallet_prelude::*; use mangata_types::{Balance, TokenId}; use sp_core::U256; diff --git a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs index fb9c5da382..55e2d9e72d 100644 --- a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs +++ b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs @@ -1,128 +1,127 @@ - +use crate::{ + Config, Pallet, ScheduleRewardsPerLiquidity, ScheduleRewardsTotal, + TotalActivatedLiquidityForSchedules, +}; use core::marker::PhantomData; -use crate::Config; -use crate::Pallet; -use crate::ScheduleRewardsPerLiquidity; -use crate::TotalActivatedLiquidityForSchedules; -use crate::ScheduleRewardsTotal; use mangata_types::{Balance, TokenId}; use sp_core::U256; - pub struct ScheduleRewardsCalculator { - data: PhantomData - } - - impl ScheduleRewardsCalculator { - - pub fn update_cumulative_rewards(liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId) { - let (cumulative, idx) = - ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Pallet::::session_index() as u64) { - } else { - let total_activated_liquidity = - Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); - let total_schedule_rewards = - Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); - if total_activated_liquidity > 0 { - ScheduleRewardsTotal::::mutate( - (liquidity_asset_id, liquidity_assets_reward), - |(cumulative, _, _)| { - *cumulative = 0; - }, - ); - let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) - .checked_div(U256::from(total_activated_liquidity)) - .unwrap_or_default(); - ScheduleRewardsPerLiquidity::::insert( +pub struct ScheduleRewardsCalculator { + data: PhantomData, +} - (liquidity_asset_id, liquidity_assets_reward), - (cumulative + pending, (Pallet::::session_index() as u64)), - ); - } - } - } - - pub fn total_rewards_for_liquidity( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - ) -> U256 { - let (cumulative, idx) = +impl ScheduleRewardsCalculator { + pub fn update_cumulative_rewards( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) { + let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Pallet::::session_index() as u64) { - cumulative - } else { - let total_activated_liquidity = + if idx == (Pallet::::session_index() as u64) { + } else { + let total_activated_liquidity = Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); - let total_schedule_rewards = + let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + if total_activated_liquidity > 0 { + ScheduleRewardsTotal::::mutate( + (liquidity_asset_id, liquidity_assets_reward), + |(cumulative, _, _)| { + *cumulative = 0; + }, + ); let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) .checked_div(U256::from(total_activated_liquidity)) .unwrap_or_default(); - cumulative + pending + ScheduleRewardsPerLiquidity::::insert( + (liquidity_asset_id, liquidity_assets_reward), + (cumulative + pending, (Pallet::::session_index() as u64)), + ); } } + } - pub fn total_activated_liquidity( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - ) -> Balance { - let (pending_negative, pending_positive, idx, cumulative) = + pub fn total_rewards_for_liquidity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> U256 { + let (cumulative, idx) = + ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); + if idx == (Pallet::::session_index() as u64) { + cumulative + } else { + let total_activated_liquidity = + Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); + let total_schedule_rewards = + Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); + let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) + .checked_div(U256::from(total_activated_liquidity)) + .unwrap_or_default(); + cumulative + pending + } + } + + pub fn total_activated_liquidity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> Balance { + let (pending_negative, pending_positive, idx, cumulative) = TotalActivatedLiquidityForSchedules::::get( liquidity_asset_id, liquidity_assets_reward, ); - if idx == (Pallet::::session_index() as u64) { - cumulative - } else { - cumulative + pending_positive - pending_negative - } + if idx == (Pallet::::session_index() as u64) { + cumulative + } else { + cumulative + pending_positive - pending_negative } + } - pub fn total_schedule_rewards( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - ) -> Balance { - let (pending, idx, cumulative) = + pub fn total_schedule_rewards( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> Balance { + let (pending, idx, cumulative) = ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Pallet::::session_index() as u64) { - cumulative - } else { - cumulative + pending - } + if idx == (Pallet::::session_index() as u64) { + cumulative + } else { + cumulative + pending } + } - pub fn update_total_activated_liqudity( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - diff: Balance, - change: bool, - ) { - // TODO: make configurable - let session_id = Pallet::::session_index() as u64; + pub fn update_total_activated_liqudity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + diff: Balance, + change: bool, + ) { + // TODO: make configurable + let session_id = Pallet::::session_index() as u64; - TotalActivatedLiquidityForSchedules::::mutate( - liquidity_asset_id, - liquidity_assets_reward, - |(pending_negative, pending_positive, idx, cumulative)| { - if *idx == session_id { - if change { - *pending_positive += diff; - } else { - *pending_negative += diff; - }; + TotalActivatedLiquidityForSchedules::::mutate( + liquidity_asset_id, + liquidity_assets_reward, + |(pending_negative, pending_positive, idx, cumulative)| { + if *idx == session_id { + if change { + *pending_positive += diff; } else { - // NOTE: handle burn so negative diff - *cumulative = *cumulative + *pending_positive - *pending_negative; - if change { - *pending_positive = diff; - *pending_negative = 0u128; - } else { - *pending_positive = 0u128; - *pending_negative = diff; - }; - *idx = session_id; - } - }, - ); - } + *pending_negative += diff; + }; + } else { + // NOTE: handle burn so negative diff + *cumulative = *cumulative + *pending_positive - *pending_negative; + if change { + *pending_positive = diff; + *pending_negative = 0u128; + } else { + *pending_positive = 0u128; + *pending_negative = diff; + }; + *idx = session_id; + } + }, + ); } +} diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 9db8e83b4a..7bb711e02f 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -77,9 +77,7 @@ fn forward_to_block(n: u32) { } fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { - while System::block_number().saturated_into::() < n { - let new_block_number = System::block_number().saturated_into::() + 1; System::set_block_number(new_block_number); @@ -95,7 +93,6 @@ fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { } } - #[test] fn liquidity_rewards_single_user_mint_W() { new_test_ext().execute_with(|| { @@ -4065,7 +4062,6 @@ fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedu }); } - #[test] #[serial] fn activity_for_schedule_rewards_can_be_activated_only_after_pool_is_rewarded_for_the_first_time() { @@ -4091,7 +4087,8 @@ fn activity_for_schedule_rewards_can_be_activated_only_after_pool_is_rewarded_fo Error::::NotAPromotedPool ); - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 2u8).unwrap(); + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 2u8) + .unwrap(); assert_err_ignore_postinfo!( ProofOfStake::activate_liquidity_for_3rdparty_rewards( @@ -4104,7 +4101,6 @@ fn activity_for_schedule_rewards_can_be_activated_only_after_pool_is_rewarded_fo Error::::NotAPromotedPool ); - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -4114,16 +4110,12 @@ fn activity_for_schedule_rewards_can_be_activated_only_after_pool_is_rewarded_fo ) .unwrap(); - - assert_ok!( - ProofOfStake::activate_liquidity_for_3rdparty_rewards( - RuntimeOrigin::signed(BOB), - LIQUIDITY_TOKEN, - 100, - REWARD_TOKEN, - None, - ) - ); - + assert_ok!(ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + )); }); } From 868de07806ed4601a998e18a790865ece6a50149 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 30 Oct 2023 10:27:43 +0100 Subject: [PATCH 062/125] refactor: extract ScheduleRewards struct --- pallets/proof-of-stake/src/lib.rs | 22 ++---- .../src/schedule_rewards_calculator.rs | 78 ++++++++++++++++--- 2 files changed, 72 insertions(+), 28 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 131a771eb2..ad2628f77b 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -136,7 +136,7 @@ mod reward_info; use reward_info::{RewardInfo, RewardsCalculator}; mod schedule_rewards_calculator; -use schedule_rewards_calculator::ScheduleRewardsCalculator; +use schedule_rewards_calculator::{ScheduleRewardsCalculator, ScheduleRewards}; mod benchmarking; @@ -178,6 +178,7 @@ pub enum ThirdPartyActivationKind { } const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!"); +pub type SessionId = u64; #[frame_support::pallet] pub mod pallet { @@ -244,15 +245,7 @@ pub mod pallet { // NOTE: 1R 1W ScheduleRewardsTotal::::mutate( (schedule.liq_token, schedule.reward_token), - |(pending, idx, cumulative)| { - if *idx >= session_id { - *pending += schedule.amount_per_session - } else { - *cumulative += *pending; - *pending = schedule.amount_per_session; - *idx = session_id; - } - }, + |s| s.provide_rewards(session_id, schedule.amount_per_session) ); } // NOTE: 1W @@ -457,17 +450,12 @@ pub mod pallet { ValueQuery, >; - /// How much scheduled rewards per single liquidty_token should be distribute_rewards - /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic - #[pallet::storage] - pub type ScheduleRewardsPerSingleLiquidity = - StorageValue<_, BTreeMap<(TokenId, TokenId), u128>, ValueQuery>; /// How much scheduled rewards per single liquidty_token should be distribute_rewards /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic #[pallet::storage] - pub type ScheduleRewardsTotal = - StorageMap<_, Twox64Concat, (TokenId, TokenId), (u128, u64, u128), ValueQuery>; + // pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat, (TokenId, TokenId), (u128, u64, u128), ValueQuery>; + pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat, (TokenId, TokenId), ScheduleRewards, ValueQuery>; #[pallet::storage] pub type ScheduleRewardsPerLiquidity = diff --git a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs index 55e2d9e72d..9a11f1d841 100644 --- a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs +++ b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs @@ -1,20 +1,80 @@ use crate::{ Config, Pallet, ScheduleRewardsPerLiquidity, ScheduleRewardsTotal, - TotalActivatedLiquidityForSchedules, + TotalActivatedLiquidityForSchedules, SessionId }; use core::marker::PhantomData; use mangata_types::{Balance, TokenId}; use sp_core::U256; +use frame_support::pallet_prelude::*; + + +#[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo)] +/// Information about single token rewards. Automatically accumulates new rewards into `pending` +/// and once `pending_session_id < current_session` they are moved to `total` and become ready for +/// distribution to end users +pub struct ScheduleRewards { + // Accumulated rewards in current or past session. Once `now > pending_session_id` they + // should be moved to total + pending: u128, + + // id of the session when pending_rewards were recently updated + pending_session_id: SessionId, + + // total amount of rewards ready for distribution + total: u128, +} + + +impl ScheduleRewards { + pub fn provide_rewards(&mut self, now: SessionId, amount: u128) { + if now <= self.pending_session_id { + self.pending += amount; + } else { + self.total += self.pending; + self.pending = amount; + self.pending_session_id = now; + } + } + + pub fn total_rewards(&self, now: SessionId) -> u128 { + if now <= self.pending_session_id { + self.total + } else { + self.total + self.pending + } + } + + pub fn transfer_pending(&mut self, now: SessionId) { + if now > self.pending_session_id { + self.total += self.pending; + self.pending = 0; + self.pending_session_id = now; + } + } + + pub fn clear(&mut self, now: SessionId) { + self.total = 0; + self.pending = 0; + self.pending_session_id = now; + } +} + pub struct ScheduleRewardsCalculator { data: PhantomData, } +/// Class responsible for maintaining and periodically updating cumulative +/// calculations required for 3rdparty rewards impl ScheduleRewardsCalculator { pub fn update_cumulative_rewards( liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, ) { + + let session_id = Pallet::::session_index() as u64; + + let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); if idx == (Pallet::::session_index() as u64) { @@ -26,9 +86,10 @@ impl ScheduleRewardsCalculator { if total_activated_liquidity > 0 { ScheduleRewardsTotal::::mutate( (liquidity_asset_id, liquidity_assets_reward), - |(cumulative, _, _)| { - *cumulative = 0; - }, + |schedule| { + schedule.transfer_pending(session_id); + schedule.clear(session_id); + } ); let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) .checked_div(U256::from(total_activated_liquidity)) @@ -81,15 +142,10 @@ impl ScheduleRewardsCalculator { liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, ) -> Balance { - let (pending, idx, cumulative) = - ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)); - if idx == (Pallet::::session_index() as u64) { - cumulative - } else { - cumulative + pending - } + ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)).total_rewards(Pallet::::session_index() as u64) } + pub fn update_total_activated_liqudity( liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, From 111b0cd0b2aa201f4b2f6c5ff7ffde1d423bbdf8 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 30 Oct 2023 12:07:49 +0100 Subject: [PATCH 063/125] apply formatting --- pallets/proof-of-stake/src/lib.rs | 29 +-- .../src/schedule_rewards_calculator.rs | 193 ++++++++++-------- 2 files changed, 113 insertions(+), 109 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index ad2628f77b..fad8932b60 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -136,7 +136,9 @@ mod reward_info; use reward_info::{RewardInfo, RewardsCalculator}; mod schedule_rewards_calculator; -use schedule_rewards_calculator::{ScheduleRewardsCalculator, ScheduleRewards}; +use schedule_rewards_calculator::{ + ActivatedLiquidityPerSchedule, ScheduleRewards, ScheduleRewardsCalculator, +}; mod benchmarking; @@ -245,7 +247,7 @@ pub mod pallet { // NOTE: 1R 1W ScheduleRewardsTotal::::mutate( (schedule.liq_token, schedule.reward_token), - |s| s.provide_rewards(session_id, schedule.amount_per_session) + |s| s.provide_rewards(session_id, schedule.amount_per_session), ); } // NOTE: 1W @@ -450,22 +452,16 @@ pub mod pallet { ValueQuery, >; - /// How much scheduled rewards per single liquidty_token should be distribute_rewards /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic #[pallet::storage] - // pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat, (TokenId, TokenId), (u128, u64, u128), ValueQuery>; - pub type ScheduleRewardsTotal = StorageMap<_, Twox64Concat, (TokenId, TokenId), ScheduleRewards, ValueQuery>; + pub type ScheduleRewardsTotal = + StorageMap<_, Twox64Concat, (TokenId, TokenId), ScheduleRewards, ValueQuery>; #[pallet::storage] pub type ScheduleRewardsPerLiquidity = StorageMap<_, Twox64Concat, (TokenId, TokenId), (U256, u64), ValueQuery>; - /// How much scheduled rewards per single liquidty_token should be distribute_rewards - /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic - // #[pallet::storage] - // pub type ScheduleRewardsCumulative = StorageMap<_, Twox64Concat ,(TokenId, TokenId, u64), u128, ValueQuery>; - /// List of activated schedules sorted by expiry date #[pallet::storage] #[pallet::getter(fn schedules)] @@ -483,9 +479,6 @@ pub mod pallet { #[pallet::getter(fn pos)] pub type ScheduleListPos = StorageValue<_, ScheduleId, OptionQuery>; - #[pallet::storage] - pub type ScheduleListPosPrev = StorageValue<_, ScheduleId, OptionQuery>; - #[pallet::storage] #[pallet::getter(fn head)] pub type ScheduleListHead = StorageValue<_, ScheduleId, OptionQuery>; @@ -503,7 +496,9 @@ pub mod pallet { pub type RewardTokensPerPool = StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (), ValueQuery>; - /// Total amount of activated liquidity for each schedule + /// Tracks number of activated liquidity per schedule. It is used for calculation of + /// "cumulative rewrds amount" per 1 liquidity token. Therefore activation/deactivation needs + /// to be deffered same way as schedule rewards are delayed. #[pallet::storage] pub type TotalActivatedLiquidityForSchedules = StorageDoubleMap< _, @@ -511,14 +506,10 @@ pub mod pallet { TokenId, Twox64Concat, TokenId, - (u128, u128, u64, u128), + ActivatedLiquidityPerSchedule, ValueQuery, >; - // #[pallet::storage] - // pub type PrevTotalActivatedLiquidityForSchedules = - // StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, u128, ValueQuery>; - /// Tracks how much liquidity user activated for particular (liq token, reward token) pair /// StorageNMap was used because it only require single read to know if user deactivated all /// liquidity associated with particular liquidity_token that is rewarded. If so part of the diff --git a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs index 9a11f1d841..5be33a0a00 100644 --- a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs +++ b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs @@ -1,64 +1,105 @@ use crate::{ - Config, Pallet, ScheduleRewardsPerLiquidity, ScheduleRewardsTotal, - TotalActivatedLiquidityForSchedules, SessionId + Config, Pallet, ScheduleRewardsPerLiquidity, ScheduleRewardsTotal, SessionId, + TotalActivatedLiquidityForSchedules, }; use core::marker::PhantomData; +use frame_support::pallet_prelude::*; use mangata_types::{Balance, TokenId}; use sp_core::U256; -use frame_support::pallet_prelude::*; - #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo)] +pub struct ActivatedLiquidityPerSchedule { + pending_positive: u128, + pending_negative: u128, + pending_session_id: SessionId, + total: u128, +} + +#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] +pub enum LiquidityModification { + Increase, + Decrease, +} + +impl ActivatedLiquidityPerSchedule { + fn total(&self, now: SessionId) -> u128 { + if now <= self.pending_session_id { + self.total + } else { + self.total + self.pending_positive - self.pending_negative + } + } + + fn update(&mut self, now: SessionId, amount: u128, kind: LiquidityModification) { + if now <= self.pending_session_id { + if kind == LiquidityModification::Increase { + self.pending_positive += amount; + } else { + self.pending_negative += amount; + } + } else { + self.total = self.total + self.pending_positive - self.pending_negative; + if kind == LiquidityModification::Increase { + self.pending_positive = amount; + self.pending_negative = 0u128; + } else { + self.pending_positive = 0u128; + self.pending_negative = amount; + }; + self.pending_session_id = now; + } + } +} + /// Information about single token rewards. Automatically accumulates new rewards into `pending` /// and once `pending_session_id < current_session` they are moved to `total` and become ready for /// distribution to end users +#[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo)] pub struct ScheduleRewards { - // Accumulated rewards in current or past session. Once `now > pending_session_id` they - // should be moved to total - pending: u128, + // Accumulated rewards in current or past session. Once `now > pending_session_id` they + // should be moved to total + pending: u128, - // id of the session when pending_rewards were recently updated - pending_session_id: SessionId, + // id of the session when pending_rewards were recently updated + pending_session_id: SessionId, - // total amount of rewards ready for distribution - total: u128, + // total amount of rewards ready for distribution + total: u128, } - impl ScheduleRewards { - pub fn provide_rewards(&mut self, now: SessionId, amount: u128) { - if now <= self.pending_session_id { - self.pending += amount; - } else { - self.total += self.pending; - self.pending = amount; - self.pending_session_id = now; - } - } - - pub fn total_rewards(&self, now: SessionId) -> u128 { - if now <= self.pending_session_id { - self.total - } else { - self.total + self.pending - } - } - - pub fn transfer_pending(&mut self, now: SessionId) { - if now > self.pending_session_id { - self.total += self.pending; - self.pending = 0; - self.pending_session_id = now; - } - } - - pub fn clear(&mut self, now: SessionId) { - self.total = 0; - self.pending = 0; - self.pending_session_id = now; - } -} + pub fn provide_rewards(&mut self, now: SessionId, amount: u128) { + if now <= self.pending_session_id { + self.pending += amount; + } else { + self.total += self.pending; + self.pending = amount; + self.pending_session_id = now; + } + } + + pub fn total_rewards(&self, now: SessionId) -> u128 { + if now <= self.pending_session_id { + self.total + } else { + self.total + self.pending + } + } + pub fn transfer_pending(&mut self, now: SessionId) { + if now > self.pending_session_id { + self.total += self.pending; + self.pending = 0; + self.pending_session_id = now; + } + } + + pub fn clear(&mut self, now: SessionId) { + self.total = 0; + self.pending = 0; + self.pending_session_id = now; + } +} pub struct ScheduleRewardsCalculator { data: PhantomData, @@ -71,9 +112,7 @@ impl ScheduleRewardsCalculator { liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, ) { - - let session_id = Pallet::::session_index() as u64; - + let session_id = Pallet::::session_index() as u64; let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); @@ -87,9 +126,9 @@ impl ScheduleRewardsCalculator { ScheduleRewardsTotal::::mutate( (liquidity_asset_id, liquidity_assets_reward), |schedule| { - schedule.transfer_pending(session_id); - schedule.clear(session_id); - } + schedule.transfer_pending(session_id); + schedule.clear(session_id); + }, ); let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) .checked_div(U256::from(total_activated_liquidity)) @@ -122,62 +161,36 @@ impl ScheduleRewardsCalculator { } } - pub fn total_activated_liquidity( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - ) -> Balance { - let (pending_negative, pending_positive, idx, cumulative) = - TotalActivatedLiquidityForSchedules::::get( - liquidity_asset_id, - liquidity_assets_reward, - ); - if idx == (Pallet::::session_index() as u64) { - cumulative - } else { - cumulative + pending_positive - pending_negative - } - } - pub fn total_schedule_rewards( liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, ) -> Balance { - ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)).total_rewards(Pallet::::session_index() as u64) + ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)) + .total_rewards(Pallet::::session_index() as u64) } - pub fn update_total_activated_liqudity( liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, diff: Balance, change: bool, ) { - // TODO: make configurable let session_id = Pallet::::session_index() as u64; - + let kind = + if change { LiquidityModification::Increase } else { LiquidityModification::Decrease }; TotalActivatedLiquidityForSchedules::::mutate( liquidity_asset_id, liquidity_assets_reward, - |(pending_negative, pending_positive, idx, cumulative)| { - if *idx == session_id { - if change { - *pending_positive += diff; - } else { - *pending_negative += diff; - }; - } else { - // NOTE: handle burn so negative diff - *cumulative = *cumulative + *pending_positive - *pending_negative; - if change { - *pending_positive = diff; - *pending_negative = 0u128; - } else { - *pending_positive = 0u128; - *pending_negative = diff; - }; - *idx = session_id; - } - }, + |s| s.update(session_id, diff, kind), ); } + + pub fn total_activated_liquidity( + liquidity_asset_id: TokenId, + liquidity_assets_reward: TokenId, + ) -> Balance { + let session_id = Pallet::::session_index() as u64; + TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward) + .total(session_id) + } } From 5b849e9ac330a09450981c93804e5ea4dd100354 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 30 Oct 2023 12:14:42 +0100 Subject: [PATCH 064/125] adding docs to rewards_calculator module --- pallets/proof-of-stake/src/reward_info.rs | 10 ---------- .../proof-of-stake/src/schedule_rewards_calculator.rs | 9 +++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 8abb74214d..b8c0b46837 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -85,17 +85,8 @@ impl RewardsCalculator { crate::RewardTokensPerPool::::try_get(asset_id, reward_asset_id).is_ok(), crate::Error::::NotAPromotedPool ); - - // NOTE: take into acout previous rewards (prev + rewards/activated) - // let total_activated = Pallet::::total_activated_liquidity(asset_id, reward_asset_id); - // let total_rewards = Pallet::::total_schedule_rewards(asset_id, reward_asset_id); - // println!("REWARDS CALCULATOR at {} for {}", current_time, user); - // println!("total_activated : {}", total_activated); - // println!("total_rewards : {}", total_rewards); - // let pool_ratio_current = U256::from(total_rewards.checked_div(total_activated).unwrap_or_default()) * U256::from(u128::MAX); let pool_ratio_current = ScheduleRewardsCalculator::::total_rewards_for_liquidity(asset_id, reward_asset_id); - println!("SCHEDULE REWARDS RATIO: {}", pool_ratio_current); let default_rewards = RewardInfo { activated_amount: 0_u128, @@ -197,7 +188,6 @@ impl CurveRewards for ConstCurveRewards { let rewards_base: U256 = U256::from(user_info.activated_amount) .checked_mul(pool_rewards_ratio_new)? .checked_div(U256::from(u128::MAX))?; // always fit into u128 - println!("REWARDS : {}", rewards_base); rewards_base.try_into().ok() } diff --git a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs index 5be33a0a00..3922e74c0f 100644 --- a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs +++ b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs @@ -108,6 +108,8 @@ pub struct ScheduleRewardsCalculator { /// Class responsible for maintaining and periodically updating cumulative /// calculations required for 3rdparty rewards impl ScheduleRewardsCalculator { + /// updates cumulative number of rewards per 1 liquidity (mulipliedd by u128::MAX) because of + /// precision. pub fn update_cumulative_rewards( liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, @@ -141,6 +143,8 @@ impl ScheduleRewardsCalculator { } } + /// returns cumulative number of rewards per 1 liquidity (mulipliedd by u128::MAX) because of + /// precision. pub fn total_rewards_for_liquidity( liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, @@ -161,6 +165,8 @@ impl ScheduleRewardsCalculator { } } + /// returns amount of schedule rewards that has been accumulated since last update of `ScheduleRewardsPerLiquidity` + /// its beeing tracked only for purpose of `ScheduleRewardsPerLiquidity` calculations pub fn total_schedule_rewards( liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, @@ -169,6 +175,8 @@ impl ScheduleRewardsCalculator { .total_rewards(Pallet::::session_index() as u64) } + /// returns amount of schedule rewards that has been accumulated since last update of `ScheduleRewardsPerLiquidity` + /// its beeing tracked only for purpose of `ScheduleRewardsPerLiquidity` calculations pub fn update_total_activated_liqudity( liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, @@ -185,6 +193,7 @@ impl ScheduleRewardsCalculator { ); } + /// returns info about total activated liquidity per schedule pub fn total_activated_liquidity( liquidity_asset_id: TokenId, liquidity_assets_reward: TokenId, From e6d3d209d08de41d05af03209464633fd9a88f2b Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 30 Oct 2023 19:49:25 +0100 Subject: [PATCH 065/125] fix wasm32 compilation --- Cargo.lock | 1 - pallets/proof-of-stake/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1705c86419..1102437ef3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6820,7 +6820,6 @@ dependencies = [ "pallet-vesting-mangata", "pallet-xyk", "parity-scale-codec", - "primitive-types", "rustc-hex", "scale-info", "serde", diff --git a/pallets/proof-of-stake/Cargo.toml b/pallets/proof-of-stake/Cargo.toml index 9c23e8e6f6..c6aedfa0ad 100644 --- a/pallets/proof-of-stake/Cargo.toml +++ b/pallets/proof-of-stake/Cargo.toml @@ -29,7 +29,6 @@ pallet-bootstrap = { default-features = false, path = "../bootstrap" } sp-arithmetic = { default-features = false, version = '6.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } libm = { default-features = false, git = "https://github.com/rust-lang/libm", rev="2f3fc968f43d345f9b449938d050a9ea46a04c83"} orml-tokens = { default-features = false, version = '0.4.1-dev' , git = "https://github.com/mangata-finance/open-runtime-module-library", branch = "mangata-dev" } -primitive-types = "0.12.0" pallet-vesting-mangata = { git = "https://github.com/mangata-finance/substrate", default-features = false, branch = "mangata-dev" } mangata-support = { default-features = false , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } From bb516edc20884f695ed7158fe12daafb26fb7b22 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 31 Oct 2023 11:14:56 +0100 Subject: [PATCH 066/125] introduce pool volume valuation and align ut --- pallets/bootstrap/src/mock.rs | 3 +- pallets/proof-of-stake/src/benchmarking.rs | 8 +- pallets/proof-of-stake/src/lib.rs | 49 +- pallets/proof-of-stake/src/mock.rs | 22 +- pallets/proof-of-stake/src/tests.rs | 513 +++++++++++---------- pallets/xyk/src/mock.rs | 6 +- runtime/common/src/lib.rs | 5 +- runtime/mangata-kusama/src/lib.rs | 3 +- runtime/mangata-rococo/src/lib.rs | 3 +- 9 files changed, 344 insertions(+), 268 deletions(-) diff --git a/pallets/bootstrap/src/mock.rs b/pallets/bootstrap/src/mock.rs index d748fdeedf..115f68e478 100644 --- a/pallets/bootstrap/src/mock.rs +++ b/pallets/bootstrap/src/mock.rs @@ -166,7 +166,8 @@ impl pallet_proof_of_stake::Config for Test { type RewardsDistributionPeriod = ConstU32<10000>; type WeightInfo = (); type RewardsSchedulesLimit = ConstU32<10>; - type Min3rdPartyRewards = ConstU128<10>; + type Min3rdPartyRewardValutationPerSession = ConstU128<10>; + type Min3rdPartyRewardVolume = ConstU128<10>; type ValuationApi = Xyk; } diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 986cff9cf3..0008589e1d 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -220,7 +220,7 @@ benchmarks! { } } - let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewards::get(); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get(); let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit + 1); TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); @@ -284,7 +284,7 @@ benchmarks! { let schedules_limit = ::RewardsSchedulesLimit::get(); let caller: ::AccountId = whitelisted_caller(); let native_asset_id = ::NativeCurrencyId::get(); - let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewards::get(); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get(); loop { let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); @@ -333,7 +333,7 @@ benchmarks! { let schedules_limit = ::RewardsSchedulesLimit::get(); let caller: ::AccountId = whitelisted_caller(); let native_asset_id = ::NativeCurrencyId::get(); - let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewards::get(); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get(); loop { let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); @@ -413,7 +413,7 @@ benchmarks! { let schedules_limit = ::RewardsSchedulesLimit::get(); let caller: ::AccountId = whitelisted_caller(); let native_asset_id = ::NativeCurrencyId::get(); - let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewards::get(); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get(); loop { let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index fad8932b60..3aafedac2f 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -355,7 +355,8 @@ pub mod pallet { /// The maximum number of schedules that can be active at one moment type RewardsSchedulesLimit: Get; /// The minimum number of rewards per session for schedule rewards - type Min3rdPartyRewards: Get; + type Min3rdPartyRewardValutationPerSession: Get; + type Min3rdPartyRewardVolume : Get; type WeightInfo: WeightInfo; type ValuationApi: ValutationApiTrait; } @@ -387,6 +388,8 @@ pub mod pallet { TooManySchedules, /// Too little rewards per session TooLittleRewards, + /// Too little rewards per session + TooLittlePoolValuation, // Liquidity is reused for 3rdparty rewards LiquidityLockedIn3rdpartyRewards, } @@ -1340,17 +1343,15 @@ impl Pallet { .ok_or(Error::::MathOverflow)?; ensure!( - ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= - T::Min3rdPartyRewards::get() || - ((token_id == Into::::into(Self::native_token_id())) && - amount_per_session >= T::Min3rdPartyRewards::get()) || - ::ValuationApi::valuate_non_liquidity_token( - token_id, - amount_per_session - ) >= T::Min3rdPartyRewards::get(), + Self::verify_rewards_min_amount(token_id, amount_per_session), Error::::TooLittleRewards ); + ensure!( + Self::verify_rewards_min_volume(token_id), + Error::::TooLittlePoolValuation + ); + RewardTokensPerPool::::insert(liquidity_token_id, token_id, ()); T::Currency::transfer( @@ -1361,8 +1362,6 @@ impl Pallet { ExistenceRequirement::KeepAlive, )?; - let current_session = Self::session_index(); - let head = ScheduleListHead::::get(); let tail = ScheduleListTail::::get(); let schedule = Schedule { @@ -1394,6 +1393,34 @@ impl Pallet { Ok(()) } + + fn verify_rewards_min_amount(token_id: TokenId, amount_per_session: Balance) -> bool { + if ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= T::Min3rdPartyRewardValutationPerSession::get() { + return true; + } + + if token_id == Into::::into(Self::native_token_id()) && amount_per_session >= T::Min3rdPartyRewardValutationPerSession::get() { + return true; + } + + if ::ValuationApi::valuate_non_liquidity_token( token_id, amount_per_session) >= T::Min3rdPartyRewardValutationPerSession::get() { + return true; + } + + return false; + } + + fn verify_rewards_min_volume(token_id: TokenId) -> bool { + if token_id == Into::::into(Self::native_token_id()) { + return true; + } + + if let Some((mga_reserves, _)) = ::ValuationApi::get_pool_state(token_id) { + return mga_reserves >= T::Min3rdPartyRewardValutationPerSession::get(); + } + + return false; + } } impl ProofOfStakeRewardsApi for Pallet { diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 877f0af460..b103723b58 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -290,7 +290,8 @@ impl pos::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10>; type RewardsSchedulesLimit = ConstU32<10>; - type Min3rdPartyRewards = ConstU128<10>; + type Min3rdPartyRewardValutationPerSession = ConstU128<10>; + type Min3rdPartyRewardVolume = ConstU128<10>; type WeightInfo = (); type ValuationApi = MockValuationApi; } @@ -304,7 +305,8 @@ impl pos::Config for Test { type LiquidityMiningIssuanceVault = FakeLiquidityMiningIssuanceVault; type RewardsDistributionPeriod = ConstU32<10>; type RewardsSchedulesLimit = ConstU32<10>; - type Min3rdPartyRewards = ConstU128<100_000>; + type Min3rdPartyRewardValutationPerSession = ConstU128<100_000>; + type Min3rdPartyRewardVolume = ConstU128<10>; type WeightInfo = (); type ValuationApi = Xyk; } @@ -401,6 +403,10 @@ pub struct ExtBuilder { ext: sp_io::TestExternalities, } +fn min_req_valutation() -> u128 { + <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() +} + impl ExtBuilder { pub fn new() -> Self { let t = frame_system::GenesisConfig::default() @@ -429,6 +435,18 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { self.ext } + + pub fn execute_with_default_mocks(mut self, f: impl FnOnce() -> R) -> R { + self.ext.execute_with(|| { + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(10u32)); + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(11u128); + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(Some((min_req_valutation(),min_req_valutation()))); + f() + }) + } } /// Compares the system events with passed in events diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 7bb711e02f..57f3524f1f 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -94,8 +94,9 @@ fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { } #[test] +#[serial] fn liquidity_rewards_single_user_mint_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -164,8 +165,9 @@ fn liquidity_rewards_single_user_mint_W() { } #[test] +#[serial] fn liquidity_rewards_three_users_burn_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -213,8 +215,9 @@ fn liquidity_rewards_three_users_burn_W() { } #[test] +#[serial] fn liquidity_rewards_claim_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -256,8 +259,9 @@ fn liquidity_rewards_claim_W() { } #[test] +#[serial] fn liquidity_rewards_promote_pool_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -273,8 +277,9 @@ fn liquidity_rewards_promote_pool_W() { } #[test] +#[serial] fn liquidity_rewards_promote_pool_already_promoted_NW() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -292,8 +297,9 @@ fn liquidity_rewards_promote_pool_already_promoted_NW() { } #[test] +#[serial] fn liquidity_rewards_work_after_burn_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -342,8 +348,9 @@ fn liquidity_rewards_work_after_burn_W() { } #[test] +#[serial] fn liquidity_rewards_deactivate_transfer_controled_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -386,8 +393,9 @@ fn liquidity_rewards_deactivate_transfer_controled_W() { } #[test] +#[serial] fn liquidity_rewards_deactivate_more_NW() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -421,8 +429,9 @@ fn liquidity_rewards_deactivate_more_NW() { } #[test] +#[serial] fn liquidity_rewards_activate_more_NW() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -450,8 +459,9 @@ fn liquidity_rewards_activate_more_NW() { } #[test] +#[serial] fn liquidity_rewards_calculate_rewards_pool_not_promoted() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -468,8 +478,9 @@ fn liquidity_rewards_calculate_rewards_pool_not_promoted() { } #[test] +#[serial] fn liquidity_rewards_claim_pool_not_promoted() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -488,8 +499,9 @@ fn liquidity_rewards_claim_pool_not_promoted() { } #[test] +#[serial] fn liquidity_rewards_transfer_not_working() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { initialize_liquidity_rewards(); assert_err!( @@ -500,8 +512,9 @@ fn liquidity_rewards_transfer_not_working() { } #[test] +#[serial] fn liquidity_rewards_not_yet_claimed_already_claimed_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -564,8 +577,9 @@ fn liquidity_rewards_not_yet_claimed_already_claimed_W() { } #[test] +#[serial] fn extreme_case_pool_ratio() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -595,8 +609,9 @@ fn extreme_case_pool_ratio() { } #[test] +#[serial] fn rewards_rounding_during_often_mint() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -685,8 +700,9 @@ fn rewards_rounding_during_often_mint() { } #[test] +#[serial] fn rewards_storage_right_amounts_start1() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -829,8 +845,9 @@ fn rewards_storage_right_amounts_start1() { // starting point, user burned some rewards, then new rewards were generated (yellow) #[test] +#[serial] fn rewards_storage_right_amounts_start2() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -965,8 +982,9 @@ fn rewards_storage_right_amounts_start2() { // starting point, just new rewards were generated (green) #[test] +#[serial] fn rewards_storage_right_amounts_start3() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -1043,8 +1061,9 @@ fn rewards_storage_right_amounts_start3() { } #[test] +#[serial] fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -1094,8 +1113,9 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { } #[test] +#[serial] fn test_migrated_from_pallet_issuance() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { env_logger::try_init(); System::set_block_number(1); const LIQUIDITY_ISSUANCE: Balance = 450045; @@ -1166,8 +1186,9 @@ fn test_migrated_from_pallet_issuance() { } #[test] +#[serial] fn claim_rewards_from_pool_that_has_been_disabled() { - new_test_ext().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; @@ -1227,18 +1248,18 @@ const BOB: u128 = 3; const CHARLIE: u128 = 4; const EVE: u128 = 5; + +fn min_req_valutation() -> u128 { + <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() +} + + #[test] #[serial] fn user_can_provide_3rdparty_rewards() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .build() - .execute_with(|| { - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); - + .execute_with_default_mocks(|| { System::set_block_number(1); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1266,13 +1287,13 @@ fn user_can_provide_3rdparty_rewards() { fn cant_schedule_rewards_in_past() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(10u32)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + roll_to_session(5); assert_err!( @@ -1340,13 +1361,13 @@ fn cannot_reward_unexisting_pool() { fn rewards_are_stored_in_pallet_account() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(10u32)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + assert_eq!( TokensOf::::free_balance(REWARD_TOKEN, &Pallet::::pallet_account()), @@ -1375,13 +1396,13 @@ fn rewards_are_stored_in_pallet_account() { fn rewards_schedule_is_stored() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1415,13 +1436,13 @@ fn rewards_schedule_is_stored() { fn rewards_linked_list_insert_multiple_schedules() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 2 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1478,13 +1499,13 @@ fn rewards_linked_list_insert_multiple_schedules() { fn rewards_linked_list_removes_outdated_schedule_automatically() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 2 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1567,13 +1588,13 @@ fn insert_schedule_ending_at_session(n: u32) { fn rewards_first_schedule_from_linked_list_of_four() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + insert_schedule_ending_at_session(1); insert_schedule_ending_at_session(2); @@ -1603,13 +1624,13 @@ fn rewards_first_schedule_from_linked_list_of_four() { fn remove_last_schedule_from_linked_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(2); @@ -1639,13 +1660,13 @@ fn remove_last_schedule_from_linked_list() { fn remove_middle_schedule_from_linked_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(1); @@ -1675,13 +1696,13 @@ fn remove_middle_schedule_from_linked_list() { fn remove_first_few_elems_at_once_from_linked_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + insert_schedule_ending_at_session(1); insert_schedule_ending_at_session(1); @@ -1710,13 +1731,13 @@ fn remove_first_few_elems_at_once_from_linked_list() { fn remove_few_last_elems_at_once_from_linked_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(2); @@ -1745,13 +1766,13 @@ fn remove_few_last_elems_at_once_from_linked_list() { fn remove_few_middle_elements_from_linkedd_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(1); @@ -1780,13 +1801,13 @@ fn remove_few_middle_elements_from_linkedd_list() { fn remove_random_elements_from_linked_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 5 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(1); @@ -1818,13 +1839,13 @@ fn remove_random_elements_from_linked_list() { fn remove_random_elements_from_linked_list_over_time() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 7 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + insert_schedule_ending_at_session(3); // 0 insert_schedule_ending_at_session(2); // 1 @@ -1863,13 +1884,13 @@ fn remove_random_elements_from_linked_list_over_time() { fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 10 * REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + insert_schedule_ending_at_session(3); // 0 insert_schedule_ending_at_session(1); // 1 @@ -1902,12 +1923,12 @@ fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { #[ignore] #[serial] fn number_of_active_schedules_is_limited() { - ExtBuilder::new().issue(ALICE, REWARD_TOKEN, MILLION).build().execute_with(|| { + ExtBuilder::new().issue(ALICE, REWARD_TOKEN, MILLION).execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(10u32)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + let max_schedules: u32 = <::RewardsSchedulesLimit as sp_core::Get<_>>::get(); @@ -1949,13 +1970,13 @@ fn number_of_active_schedules_is_limited() { fn duplicated_schedules_works() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(10u32)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + assert_eq!(ScheduleListHead::::get(), None); assert_eq!(ScheduleListTail::::get(), None); @@ -2028,6 +2049,8 @@ fn accept_schedule_valuated_in_native_token() { get_liquidity_asset_mock.expect().return_const(Ok(10u32)); let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(0u128); + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(Some((min_req_valutation(),min_req_valutation()))); roll_to_session(4); @@ -2059,6 +2082,8 @@ fn accept_schedule_valuated_in_token_paired_with_native_token() { let valuate_non_liquidity_token_mock = MockValuationApi::valuate_non_liquidity_token_context(); valuate_non_liquidity_token_mock.expect().return_const(10u128); + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(Some((min_req_valutation(),min_req_valutation()))); roll_to_session(4); @@ -2080,14 +2105,14 @@ fn user_can_claim_3rdparty_rewards() { .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); @@ -2169,6 +2194,8 @@ fn overlapping_3rdparty_rewards_works() { get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(Some((min_req_valutation(),min_req_valutation()))); let first_reward_token = TokensOf::::create(&ALICE, MILLION).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 200).unwrap(); @@ -2243,13 +2270,13 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 200) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -2318,13 +2345,13 @@ fn deactivate_3rdparty_rewards() { .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -2418,6 +2445,9 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(Some((min_req_valutation(),min_req_valutation()))); + System::set_block_number(1); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -2644,13 +2674,13 @@ fn liquidity_minting_liquidity_can_be_resused() { .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) .unwrap(); @@ -2705,13 +2735,13 @@ fn fail_to_transfer_tokens_that_has_been_partially_deactivated() { .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) .unwrap(); @@ -2790,13 +2820,13 @@ fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) .unwrap(); @@ -2889,13 +2919,13 @@ fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) .unwrap(); @@ -2987,12 +3017,12 @@ fn can_claim_schedule_rewards() { .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + .execute_with_default_mocks(|| { + + + + System::set_block_number(1); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) @@ -3136,12 +3166,12 @@ fn can_not_provide_liquidity_for_schedule_rewards_when_its_only_activated_for_li ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + .execute_with_default_mocks(|| { + + + + System::set_block_number(1); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) @@ -3166,14 +3196,14 @@ fn can_not_provide_liquidity_for_mining_rewards_when_its_only_activated_for_sche ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -3203,7 +3233,7 @@ use sp_runtime::{traits::Dispatchable, Permill}; #[ignore] #[serial] fn activate_deactivate_calls_are_free_of_charge() { - ExtBuilder::new().build().execute_with(|| { + ExtBuilder::new().execute_with_default_mocks(|| { System::set_block_number(1); let activate_call = @@ -3233,14 +3263,14 @@ fn unsuccessul_activate_deactivate_calls_charges_fees() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + let activate_call = mock::RuntimeCall::ProofOfStake(Call::activate_liquidity_for_3rdparty_rewards { @@ -3285,14 +3315,14 @@ fn claim_rewards_from_multiple_sessions_at_once() { .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); @@ -3345,14 +3375,14 @@ fn multi_user_rewards_distributeion_scenario() { .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); @@ -3428,14 +3458,14 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_instantly() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + let amount = 10_000u128; @@ -3471,14 +3501,14 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_after_few_sessions( ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + let amount = 10_000u128; @@ -3516,14 +3546,14 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_schedule_is_finishe ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + let amount = 10_000u128; @@ -3563,14 +3593,14 @@ fn test_multiple_activations_in_same_block() { .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + let amount = 10_000u128; @@ -3620,13 +3650,13 @@ fn rewards_are_available_in_next_session_after_rewards_are_provided() { .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -3796,13 +3826,13 @@ fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedu .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); + + + + /// 1000 rewards per session ProofOfStake::reward_pool( @@ -4068,13 +4098,8 @@ fn activity_for_schedule_rewards_can_be_activated_only_after_pool_is_rewarded_fo ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 10 * 3 * REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .build() - .execute_with(|| { + .execute_with_default_mocks(|| { System::set_block_number(1); - let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); - get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); - let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); - valuate_liquidity_token_mock.expect().return_const(11u128); assert_err_ignore_postinfo!( ProofOfStake::activate_liquidity_for_3rdparty_rewards( diff --git a/pallets/xyk/src/mock.rs b/pallets/xyk/src/mock.rs index 84be772aed..ed70bc8179 100644 --- a/pallets/xyk/src/mock.rs +++ b/pallets/xyk/src/mock.rs @@ -330,7 +330,8 @@ impl pallet_proof_of_stake::Config for Test { type RewardsDistributionPeriod = ConstU32<10>; type WeightInfo = (); type RewardsSchedulesLimit = ConstU32<10>; - type Min3rdPartyRewards = ConstU128<10>; + type Min3rdPartyRewardValutationPerSession = ConstU128<10>; + type Min3rdPartyRewardVolume = ConstU128<10>; type ValuationApi = XykStorage; } @@ -344,7 +345,8 @@ impl pallet_proof_of_stake::Config for Test { type RewardsDistributionPeriod = ConstU32<1200>; type WeightInfo = (); type RewardsSchedulesLimit = ConstU32<10>; - type Min3rdPartyRewards = ConstU128<10>; + type Min3rdPartyRewardValutationPerSession = ConstU128<10>; + type Min3rdPartyRewardVolume = ConstU128<10>; type ValuationApi = XykStorage; } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index b08a94149d..2ad77371eb 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1371,9 +1371,10 @@ where use super::*; parameter_types! { - pub const RewardsSchedulesLimit: u32 = 200; + pub const RewardsSchedulesLimit: u32 = 100_000u32; // TODO: allign properly - pub const Min3rdPartyRewards: u128 = 100 * 30_000 * currency::DOLLARS; + pub const Min3rdPartyRewardValutationPerSession: u128 = 100 * 30_000 * currency::DOLLARS; + pub const Min3rdPartyRewardVolume: u128 = 100 * 30_000 * currency::DOLLARS; } } } diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index 04a18a4b14..cbd2ee430b 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -277,7 +277,8 @@ impl pallet_proof_of_stake::Config for Runtime { type RewardsDistributionPeriod = cfg::SessionLenghtOf; type WeightInfo = weights::pallet_proof_of_stake_weights::ModuleWeight; type RewardsSchedulesLimit = cfg::pallet_proof_of_stake::RewardsSchedulesLimit; - type Min3rdPartyRewards = cfg::pallet_proof_of_stake::Min3rdPartyRewards; + type Min3rdPartyRewardValutationPerSession = cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; + type Min3rdPartyRewardVolume = cfg::pallet_proof_of_stake::Min3rdPartyRewardVolume; type ValuationApi = Xyk; } diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index 3920a8016d..e7178cfc5a 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -277,7 +277,8 @@ impl pallet_proof_of_stake::Config for Runtime { type RewardsDistributionPeriod = cfg::SessionLenghtOf; type WeightInfo = weights::pallet_proof_of_stake_weights::ModuleWeight; type RewardsSchedulesLimit = cfg::pallet_proof_of_stake::RewardsSchedulesLimit; - type Min3rdPartyRewards = cfg::pallet_proof_of_stake::Min3rdPartyRewards; + type Min3rdPartyRewardValutationPerSession = cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; + type Min3rdPartyRewardVolume = cfg::pallet_proof_of_stake::Min3rdPartyRewardVolume; type ValuationApi = Xyk; } From 357cb9ffc5a53dd93be5802a7412c290d4e520b1 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 31 Oct 2023 12:53:20 +0100 Subject: [PATCH 067/125] verify volume of rewarded token --- pallets/proof-of-stake/src/lib.rs | 13 ++- pallets/proof-of-stake/src/mock.rs | 4 +- pallets/proof-of-stake/src/tests.rs | 157 +++++++++++++++++++++++++++- 3 files changed, 163 insertions(+), 11 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 3aafedac2f..7d8438f8e3 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -388,8 +388,8 @@ pub mod pallet { TooManySchedules, /// Too little rewards per session TooLittleRewards, - /// Too little rewards per session - TooLittlePoolValuation, + /// Too small volume of the pool + TooSmallVolume, // Liquidity is reused for 3rdparty rewards LiquidityLockedIn3rdpartyRewards, } @@ -1349,7 +1349,7 @@ impl Pallet { ensure!( Self::verify_rewards_min_volume(token_id), - Error::::TooLittlePoolValuation + Error::::TooSmallVolume ); RewardTokensPerPool::::insert(liquidity_token_id, token_id, ()); @@ -1411,14 +1411,19 @@ impl Pallet { } fn verify_rewards_min_volume(token_id: TokenId) -> bool { + if token_id == Into::::into(Self::native_token_id()) { return true; } if let Some((mga_reserves, _)) = ::ValuationApi::get_pool_state(token_id) { - return mga_reserves >= T::Min3rdPartyRewardValutationPerSession::get(); + return mga_reserves >= T::Min3rdPartyRewardVolume::get(); } + if let Ok((mga_reserves, _)) = ::ValuationApi::get_reserves(Self::native_token_id(), token_id){ + return mga_reserves >= T::Min3rdPartyRewardVolume::get(); + } + return false; } } diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index b103723b58..9e19d4986c 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -403,7 +403,7 @@ pub struct ExtBuilder { ext: sp_io::TestExternalities, } -fn min_req_valutation() -> u128 { +fn min_req_volume() -> u128 { <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() } @@ -443,7 +443,7 @@ impl ExtBuilder { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); - get_pool_state_mock.expect().return_const(Some((min_req_valutation(),min_req_valutation()))); + get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); f() }) } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 57f3524f1f..2a9eca7794 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1249,7 +1249,7 @@ const CHARLIE: u128 = 4; const EVE: u128 = 5; -fn min_req_valutation() -> u128 { +fn min_req_volume() -> u128 { <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() } @@ -2050,7 +2050,7 @@ fn accept_schedule_valuated_in_native_token() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(0u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); - get_pool_state_mock.expect().return_const(Some((min_req_valutation(),min_req_valutation()))); + get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); roll_to_session(4); @@ -2083,7 +2083,7 @@ fn accept_schedule_valuated_in_token_paired_with_native_token() { MockValuationApi::valuate_non_liquidity_token_context(); valuate_non_liquidity_token_mock.expect().return_const(10u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); - get_pool_state_mock.expect().return_const(Some((min_req_valutation(),min_req_valutation()))); + get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); roll_to_session(4); @@ -2195,7 +2195,7 @@ fn overlapping_3rdparty_rewards_works() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); - get_pool_state_mock.expect().return_const(Some((min_req_valutation(),min_req_valutation()))); + get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); let first_reward_token = TokensOf::::create(&ALICE, MILLION).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 200).unwrap(); @@ -2446,7 +2446,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() valuate_liquidity_token_mock.expect().return_const(11u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); - get_pool_state_mock.expect().return_const(Some((min_req_valutation(),min_req_valutation()))); + get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); System::set_block_number(1); ProofOfStake::reward_pool( @@ -4144,3 +4144,150 @@ fn activity_for_schedule_rewards_can_be_activated_only_after_pool_is_rewarded_fo )); }); } + + +#[test] +#[serial] +fn reject_3rdparty_rewards_with_non_liq_token_and_too_small_volume() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let too_small_volume = Some((min_req_volume()-1,min_req_volume()-1)); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(0u128); + + let valuate_non_liquidity_token_mock = MockValuationApi::valuate_non_liquidity_token_context(); + valuate_non_liquidity_token_mock.expect().return_const(10u128); + + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(too_small_volume); + + roll_to_session(4); + + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ), + Error::::TooSmallVolume + ); + }); +} + +#[test] +#[serial] +fn accept_3rdparty_rewards_with_non_liq_token_and_proper_valuation() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let min_volume = Some((min_req_volume(),min_req_volume())); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(0u128); + + let valuate_non_liquidity_token_mock = MockValuationApi::valuate_non_liquidity_token_context(); + valuate_non_liquidity_token_mock.expect().return_const(10u128); + + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(min_volume); + + roll_to_session(4); + + assert_ok!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ), + ); + }); +} + + +#[test] +#[serial] +fn reject_3rdparty_rewards_with_liq_token_and_too_small_volume() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + let too_small_volume = Some((min_req_volume()-1,min_req_volume()-1)); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(10u128); + + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(None); + + let get_reserves_mock = MockValuationApi::get_reserves_context(); + get_reserves_mock.expect().return_const(Ok((9u128, 0u128))); + + roll_to_session(4); + + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ), + Error::::TooSmallVolume + ); + }); +} + +#[test] +#[serial] +fn accept_3rdparty_rewards_with_liq_token_and_min_volume() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .build() + .execute_with(|| { + System::set_block_number(1); + + let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); + get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); + + let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); + valuate_liquidity_token_mock.expect().return_const(10u128); + + let get_pool_state_mock = MockValuationApi::get_pool_state_context(); + get_pool_state_mock.expect().return_const(None); + + let get_reserves_mock = MockValuationApi::get_reserves_context(); + get_reserves_mock.expect().return_const(Ok((min_req_volume(), 0u128))); + + roll_to_session(4); + + assert_ok!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ), + ); + }); +} From ec8e4d7395af58258de362e22ab427a2b009f053 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 31 Oct 2023 16:45:00 +0100 Subject: [PATCH 068/125] fixing some of the benchmarks --- pallets/proof-of-stake/src/benchmarking.rs | 18 +++++------ pallets/proof-of-stake/src/lib.rs | 6 +++- pallets/proof-of-stake/src/mock.rs | 36 ++++++++++++++++++++++ 3 files changed, 50 insertions(+), 10 deletions(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 0008589e1d..70fb8fd2c8 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -209,7 +209,7 @@ benchmarks! { init::(); - let schedules_limit = ::RewardsSchedulesLimit::get(); + let schedules_limit = 10u32; let caller: ::AccountId = whitelisted_caller(); let native_asset_id = ::NativeCurrencyId::get(); @@ -220,7 +220,7 @@ benchmarks! { } } - let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get(); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get() * 10u128; let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit + 1); TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); @@ -235,7 +235,7 @@ benchmarks! { RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, token_id), reward_token.into(), - REWARDS_AMOUNT, + (REWARDS_AMOUNT).into(), 10u32.into(), ).unwrap(); } @@ -260,16 +260,16 @@ benchmarks! { let reward_token = token_id + 1; assert_eq!( - RewardsSchedules::::get().len() as u32, - schedules_limit + PoS::::tail().unwrap(), + (schedules_limit - 1 ) as u64 ); }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,token_id), reward_token.into(), REWARDS_AMOUNT, 10u32.into()) verify { assert_eq!( - RewardsSchedules::::get().len() as u32, - schedules_limit + PoS::::tail().unwrap(), + schedules_limit as u64 ); } @@ -281,10 +281,10 @@ benchmarks! { init::(); - let schedules_limit = ::RewardsSchedulesLimit::get(); + let schedules_limit = 10u32; let caller: ::AccountId = whitelisted_caller(); let native_asset_id = ::NativeCurrencyId::get(); - let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get(); + let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get() * (schedules_limit as u128); loop { let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 7d8438f8e3..8e3c54d003 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -148,7 +148,7 @@ mod mock; #[cfg(test)] mod tests; -pub(crate) const LOG_TARGET: &str = "proof-of-stake"; +pub(crate) const LOG_TARGET: &str = "pos"; // syntactic sugar for logging. #[macro_export] @@ -1395,15 +1395,19 @@ impl Pallet { } fn verify_rewards_min_amount(token_id: TokenId, amount_per_session: Balance) -> bool { + log!(info, "blah 1 "); if ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= T::Min3rdPartyRewardValutationPerSession::get() { + log!(info, "blah 2 "); return true; } if token_id == Into::::into(Self::native_token_id()) && amount_per_session >= T::Min3rdPartyRewardValutationPerSession::get() { + log!(info, "blah 3 "); return true; } if ::ValuationApi::valuate_non_liquidity_token( token_id, amount_per_session) >= T::Min3rdPartyRewardValutationPerSession::get() { + log!(info, "blah 4 "); return true; } diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 9e19d4986c..da5b30947b 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -476,3 +476,39 @@ macro_rules! assert_event_emitted { } }; } + +fn roll_to_next_block() { + forward_to_block((System::block_number() + 1).saturated_into::()); +} + +pub fn roll_to_next_session() { + let current_session = ProofOfStake::session_index(); + roll_to_session(current_session + 1); +} + +pub fn roll_to_session(n: u32) { + while ProofOfStake::session_index() < n { + roll_to_next_block(); + } +} + +pub fn forward_to_block(n: u32) { + forward_to_block_with_custom_rewards(n, 10000); +} + +pub fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { + while System::block_number().saturated_into::() < n { + let new_block_number = System::block_number().saturated_into::() + 1; + System::set_block_number(new_block_number); + + System::on_initialize(new_block_number); + ProofOfStake::on_initialize(new_block_number); + + if ProofOfStake::is_new_session() { + ProofOfStake::distribute_rewards(rewards); + } + + ProofOfStake::on_finalize(new_block_number); + System::on_finalize(new_block_number); + } +} From 6ebec8d7f9926acc0904cca419824e0daed73d0d Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 1 Nov 2023 07:21:58 +0100 Subject: [PATCH 069/125] compiles --- pallets/proof-of-stake/src/mock.rs | 55 ++++++++++++++++++++++++++++- pallets/proof-of-stake/src/tests.rs | 37 +------------------ 2 files changed, 55 insertions(+), 37 deletions(-) diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index da5b30947b..6db24cd096 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -24,6 +24,7 @@ use mangata_types::{assets::CustomMetadata, Amount, Balance, TokenId}; use orml_tokens::{MultiTokenCurrencyAdapter, MultiTokenCurrencyExtended}; use orml_traits::{asset_registry::AssetMetadata, parameter_type_with_key}; use sp_runtime::{Perbill, Percent}; +use sp_runtime::Saturating; use std::{collections::HashMap, sync::Mutex}; pub const NATIVE_CURRENCY_ID: u32 = 0; @@ -477,25 +478,57 @@ macro_rules! assert_event_emitted { }; } -fn roll_to_next_block() { +pub fn roll_to_next_block() { forward_to_block((System::block_number() + 1).saturated_into::()); } +pub fn roll_to_next_block2() where + T: pos::Config, + T: frame_system::Config +{ + let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); + forward_to_block2::(new_block_number); +} + pub fn roll_to_next_session() { let current_session = ProofOfStake::session_index(); roll_to_session(current_session + 1); } +pub fn roll_to_next_session2() where + T: pos::Config, + T: frame_system::Config +{ + let current_session = ProofOfStake::session_index(); + roll_to_session2::(current_session + 1); +} + pub fn roll_to_session(n: u32) { while ProofOfStake::session_index() < n { roll_to_next_block(); } } +pub fn roll_to_session2(n: u32) where + T: pos::Config, + T: frame_system::Config +{ + while ProofOfStake::session_index() < n { + roll_to_next_block2::(); + } +} + pub fn forward_to_block(n: u32) { forward_to_block_with_custom_rewards(n, 10000); } +pub fn forward_to_block2(n: T::BlockNumber) where + T: pos::Config, + T: frame_system::Config +{ + forward_to_block_with_custom_rewards2::(n, 10000); +} + pub fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { while System::block_number().saturated_into::() < n { let new_block_number = System::block_number().saturated_into::() + 1; @@ -512,3 +545,23 @@ pub fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { System::on_finalize(new_block_number); } } + +pub fn forward_to_block_with_custom_rewards2(n: T::BlockNumber, rewards: u128) where + T: pos::Config, + T: frame_system::Config +{ + while frame_system::Pallet::::block_number() < n { + let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); + frame_system::Pallet::::set_block_number(new_block_number); + + frame_system::Pallet::::on_initialize(new_block_number); + pos::Pallet::::on_initialize(new_block_number); + + if pos::Pallet::::is_new_session() { + pos::Pallet::::distribute_rewards(rewards); + } + + pos::Pallet::::on_finalize(new_block_number); + frame_system::Pallet::::on_finalize(new_block_number); + } +} diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 2a9eca7794..4f3550f096 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -53,45 +53,10 @@ fn process_all_schedules_in_current_session() { if !ProofOfStake::is_new_session() && ProofOfStake::pos() == ProofOfStake::tail() { break } - roll_to_next_block(); + roll_to_next_block2::(); } } -fn roll_to_next_block() { - forward_to_block((System::block_number() + 1).saturated_into::()); -} - -fn roll_to_next_session() { - let current_session = ProofOfStake::session_index(); - roll_to_session(current_session + 1); -} - -pub fn roll_to_session(n: u32) { - while ProofOfStake::session_index() < n { - roll_to_next_block(); - } -} - -fn forward_to_block(n: u32) { - forward_to_block_with_custom_rewards(n, 10000); -} - -fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { - while System::block_number().saturated_into::() < n { - let new_block_number = System::block_number().saturated_into::() + 1; - System::set_block_number(new_block_number); - - System::on_initialize(new_block_number); - ProofOfStake::on_initialize(new_block_number); - - if ProofOfStake::is_new_session() { - ProofOfStake::distribute_rewards(rewards); - } - - ProofOfStake::on_finalize(new_block_number); - System::on_finalize(new_block_number); - } -} #[test] #[serial] From 2f62b22f0a54ed252308dba6571a8bec7b5902ca Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 1 Nov 2023 08:21:52 +0100 Subject: [PATCH 070/125] refactor method names --- pallets/proof-of-stake/src/mock.rs | 54 ++------ pallets/proof-of-stake/src/tests.rs | 186 ++++++++++++++-------------- 2 files changed, 102 insertions(+), 138 deletions(-) diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 6db24cd096..0977165361 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -478,75 +478,39 @@ macro_rules! assert_event_emitted { }; } -pub fn roll_to_next_block() { - forward_to_block((System::block_number() + 1).saturated_into::()); -} - -pub fn roll_to_next_block2() where +pub fn roll_to_next_block() where T: pos::Config, T: frame_system::Config { let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); - forward_to_block2::(new_block_number); -} - -pub fn roll_to_next_session() { - let current_session = ProofOfStake::session_index(); - roll_to_session(current_session + 1); + forward_to_block::(new_block_number); } -pub fn roll_to_next_session2() where +pub fn roll_to_next_session() where T: pos::Config, T: frame_system::Config { let current_session = ProofOfStake::session_index(); - roll_to_session2::(current_session + 1); -} - -pub fn roll_to_session(n: u32) { - while ProofOfStake::session_index() < n { - roll_to_next_block(); - } + roll_to_session::(current_session + 1); } -pub fn roll_to_session2(n: u32) where +pub fn roll_to_session(n: u32) where T: pos::Config, T: frame_system::Config { while ProofOfStake::session_index() < n { - roll_to_next_block2::(); + roll_to_next_block::(); } } -pub fn forward_to_block(n: u32) { - forward_to_block_with_custom_rewards(n, 10000); -} - -pub fn forward_to_block2(n: T::BlockNumber) where +pub fn forward_to_block(n: T::BlockNumber) where T: pos::Config, T: frame_system::Config { - forward_to_block_with_custom_rewards2::(n, 10000); -} - -pub fn forward_to_block_with_custom_rewards(n: u32, rewards: u128) { - while System::block_number().saturated_into::() < n { - let new_block_number = System::block_number().saturated_into::() + 1; - System::set_block_number(new_block_number); - - System::on_initialize(new_block_number); - ProofOfStake::on_initialize(new_block_number); - - if ProofOfStake::is_new_session() { - ProofOfStake::distribute_rewards(rewards); - } - - ProofOfStake::on_finalize(new_block_number); - System::on_finalize(new_block_number); - } + forward_to_block_with_custom_rewards::(n, 10000); } -pub fn forward_to_block_with_custom_rewards2(n: T::BlockNumber, rewards: u128) where +pub fn forward_to_block_with_custom_rewards(n: T::BlockNumber, rewards: u128) where T: pos::Config, T: frame_system::Config { diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 4f3550f096..681131f448 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -53,7 +53,7 @@ fn process_all_schedules_in_current_session() { if !ProofOfStake::is_new_session() && ProofOfStake::pos() == ProofOfStake::tail() { break } - roll_to_next_block2::(); + roll_to_next_block::(); } } @@ -160,18 +160,18 @@ fn liquidity_rewards_three_users_burn_W() { ) .unwrap(); - forward_to_block(100); + forward_to_block::(100); mint_and_activate_tokens(3, 4, 10000); - forward_to_block(200); + forward_to_block::(200); mint_and_activate_tokens(4, 4, 10000); - forward_to_block(240); + forward_to_block::(240); ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 5000) .unwrap(); - forward_to_block(400); + forward_to_block::(400); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 95965); assert_eq!(ProofOfStake::calculate_rewards_amount(3, 4).unwrap(), 44142); @@ -212,13 +212,13 @@ fn liquidity_rewards_claim_W() { ) .unwrap(); - forward_to_block(10); - forward_to_block(90); + forward_to_block::(10); + forward_to_block::(90); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 12142); ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 2562); }); } @@ -291,23 +291,23 @@ fn liquidity_rewards_work_after_burn_W() { ) .unwrap(); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 14704); mint_and_activate_tokens(3, 4, 10000); - forward_to_block(200); + forward_to_block::(200); mint_and_activate_tokens(4, 4, 10000); - forward_to_block(240); + forward_to_block::(240); ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(4), 4, 10000) .unwrap(); - forward_to_block(400); + forward_to_block::(400); assert_eq!(ProofOfStake::calculate_rewards_amount(4, 4).unwrap(), 948); mint_and_activate_tokens(4, 4, 20000); - forward_to_block(500); + forward_to_block::(500); assert_eq!(ProofOfStake::calculate_rewards_amount(4, 4).unwrap(), 8299); }); } @@ -343,7 +343,7 @@ fn liquidity_rewards_deactivate_transfer_controled_W() { orml_tokens::Error::::BalanceTooLow, ); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 14704); ProofOfStake::deactivate_liquidity_for_native_rewards( @@ -510,7 +510,7 @@ fn liquidity_rewards_not_yet_claimed_already_claimed_W() { ) .unwrap(); - forward_to_block(10); + forward_to_block::(10); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 291); ProofOfStake::deactivate_liquidity_for_native_rewards( @@ -531,7 +531,7 @@ fn liquidity_rewards_not_yet_claimed_already_claimed_W() { ) .unwrap(); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 12433); ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(2), 4).unwrap(); @@ -710,7 +710,7 @@ fn rewards_storage_right_amounts_start1() { mint_and_activate_tokens(5, 4, 10000); mint_and_activate_tokens(6, 4, 10000); - forward_to_block_with_custom_rewards(100, 50000); // No clue why we considr 50k rewards per + forward_to_block_with_custom_rewards::(100, 50000); // No clue why we considr 50k rewards per assert_eq!( U256::from(u128::MAX) * U256::from(10), PromotedPoolRewards::::get().get(&4).unwrap().rewards @@ -738,7 +738,7 @@ fn rewards_storage_right_amounts_start1() { assert_eq!(rewards_info.rewards_not_yet_claimed, 0); assert_eq!(rewards_info.rewards_already_claimed, 14704); - forward_to_block_with_custom_rewards(200, 50000); + forward_to_block_with_custom_rewards::(200, 50000); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 36530); assert_eq!(ProofOfStake::calculate_rewards_amount(3, 4).unwrap(), 36530); @@ -855,7 +855,7 @@ fn rewards_storage_right_amounts_start2() { mint_and_activate_tokens(4, 4, 10000); mint_and_activate_tokens(5, 4, 10000); - forward_to_block_with_custom_rewards(100, 40000); + forward_to_block_with_custom_rewards::(100, 40000); assert_eq!( U256::from(u128::MAX) * U256::from(10), PromotedPoolRewards::::get().get(&4).unwrap().rewards @@ -870,7 +870,7 @@ fn rewards_storage_right_amounts_start2() { ProofOfStake::deactivate_liquidity_for_native_rewards(RuntimeOrigin::signed(5), 4, 5000) .unwrap(); - forward_to_block_with_custom_rewards(200, 20000); //its really weird that rewards are + forward_to_block_with_custom_rewards::(200, 20000); //its really weird that rewards are //decreased from 40k to 20k in single assert_eq!( U256::from(u128::MAX) * U256::from(20), @@ -987,7 +987,7 @@ fn rewards_storage_right_amounts_start3() { .unwrap(); mint_and_activate_tokens(3, 4, 10000); - forward_to_block_with_custom_rewards(100, 20000); + forward_to_block_with_custom_rewards::(100, 20000); let mut rewards_info = ProofOfStake::get_rewards_info(2, 4); assert_eq!(rewards_info.rewards_not_yet_claimed, 0); @@ -1070,7 +1070,7 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { ) .unwrap(); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ProofOfStake::calculate_rewards_amount(3, 4).unwrap(), 14704); ProofOfStake::claim_native_rewards(RuntimeOrigin::signed(3), 4).unwrap(); @@ -1108,12 +1108,12 @@ fn test_migrated_from_pallet_issuance() { ) .unwrap(); - forward_to_block_with_custom_rewards(9, LIQUIDITY_ISSUANCE); + forward_to_block_with_custom_rewards::(9, LIQUIDITY_ISSUANCE); assert_eq!( U256::from_dec_str("153142377820933750789374425201630124724265475").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() ); - forward_to_block_with_custom_rewards(19, LIQUIDITY_ISSUANCE); + forward_to_block_with_custom_rewards::(19, LIQUIDITY_ISSUANCE); assert_eq!( U256::from_dec_str("306284755641867501578748850403260249448530950").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() @@ -1128,7 +1128,7 @@ fn test_migrated_from_pallet_issuance() { None, ) .unwrap(); - forward_to_block_with_custom_rewards(29, LIQUIDITY_ISSUANCE); + forward_to_block_with_custom_rewards::(29, LIQUIDITY_ISSUANCE); assert_eq!( U256::from_dec_str("382855774411150916504204331316771595926557960").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() @@ -1138,7 +1138,7 @@ fn test_migrated_from_pallet_issuance() { ProofOfStake::get_pool_rewards(2).unwrap() ); - forward_to_block_with_custom_rewards(39, LIQUIDITY_ISSUANCE); + forward_to_block_with_custom_rewards::(39, LIQUIDITY_ISSUANCE); assert_eq!( U256::from_dec_str("459426793180434331429659812230282942404584970").unwrap(), ProofOfStake::get_pool_rewards(1).unwrap() @@ -1184,7 +1184,7 @@ fn claim_rewards_from_pool_that_has_been_disabled() { ) .unwrap(); - forward_to_block(10); + forward_to_block::(10); assert_eq!(ProofOfStake::calculate_rewards_amount(2, 4).unwrap(), 291); @@ -1235,7 +1235,7 @@ fn user_can_provide_3rdparty_rewards() { ) .unwrap(); - roll_to_session(5); + roll_to_session::(5); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -1260,7 +1260,7 @@ fn cant_schedule_rewards_in_past() { - roll_to_session(5); + roll_to_session::(5); assert_err!( ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1495,38 +1495,38 @@ fn rewards_linked_list_removes_outdated_schedule_automatically() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(1u64)); - forward_to_block(2); + forward_to_block::(2); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(1u64)); assert_eq!(ScheduleListPos::::get(), Some(1u64)); - forward_to_block(5); + forward_to_block::(5); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(1u64)); assert_eq!(ScheduleListPos::::get(), Some(1u64)); - forward_to_block(11); + forward_to_block::(11); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(1u64)); assert_eq!(ScheduleListPos::::get(), Some(1u64)); - forward_to_block(21); + forward_to_block::(21); assert_eq!(ScheduleListHead::::get(), Some(1u64)); assert_eq!(ScheduleListTail::::get(), Some(1u64)); assert_eq!(ScheduleListPos::::get(), Some(1u64)); - forward_to_block(25); + forward_to_block::(25); assert_eq!(ScheduleListHead::::get(), Some(1u64)); assert_eq!(ScheduleListTail::::get(), Some(1u64)); assert_eq!(ScheduleListPos::::get(), Some(1u64)); - forward_to_block(29); + forward_to_block::(29); assert_eq!(ScheduleListHead::::get(), Some(1u64)); assert_eq!(ScheduleListTail::::get(), Some(1u64)); - forward_to_block(30); + forward_to_block::(30); assert_eq!(ScheduleListHead::::get(), None); assert_eq!(ScheduleListTail::::get(), None); assert_eq!(ScheduleListPos::::get(), None); @@ -1574,7 +1574,7 @@ fn rewards_first_schedule_from_linked_list_of_four() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(3u64)); - forward_to_block(21); + forward_to_block::(21); assert_eq!(ScheduleListHead::::get(), Some(1u64)); assert_eq!(ScheduleListTail::::get(), Some(3u64)); @@ -1610,7 +1610,7 @@ fn remove_last_schedule_from_linked_list() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(3u64)); - forward_to_block(21); + forward_to_block::(21); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(2u64)); @@ -1646,7 +1646,7 @@ fn remove_middle_schedule_from_linked_list() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(3u64)); - forward_to_block(21); + forward_to_block::(21); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(3u64)); @@ -1682,7 +1682,7 @@ fn remove_first_few_elems_at_once_from_linked_list() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(3u64)); - forward_to_block(20); + forward_to_block::(20); assert_eq!(ScheduleListHead::::get(), Some(2u64)); assert_eq!(ScheduleListTail::::get(), Some(3u64)); @@ -1717,7 +1717,7 @@ fn remove_few_last_elems_at_once_from_linked_list() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(3u64)); - forward_to_block(21); + forward_to_block::(21); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(1u64)); @@ -1752,7 +1752,7 @@ fn remove_few_middle_elements_from_linkedd_list() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(3u64)); - forward_to_block(21); + forward_to_block::(21); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(3u64)); @@ -1789,7 +1789,7 @@ fn remove_random_elements_from_linked_list() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(4u64)); - forward_to_block(21); + forward_to_block::(21); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(4u64)); @@ -1824,7 +1824,7 @@ fn remove_random_elements_from_linked_list_over_time() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(6u64)); - roll_to_session(2); + roll_to_session::(2); process_all_schedules_in_current_session(); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(6u64)); @@ -1834,7 +1834,7 @@ fn remove_random_elements_from_linked_list_over_time() { assert_eq!(RewardsSchedulesList::::get(4u64).unwrap().1, Some(6u64)); assert_eq!(RewardsSchedulesList::::get(6u64).unwrap().1, None); - roll_to_session(3); + roll_to_session::(3); process_all_schedules_in_current_session(); assert_eq!(ScheduleListHead::::get(), Some(0u64)); @@ -1871,14 +1871,14 @@ fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { assert_eq!(ScheduleListPos::::get(), None); assert_eq!(ScheduleListTail::::get(), Some(8u64)); - forward_to_block(24); + forward_to_block::(24); assert_eq!(ScheduleListHead::::get(), Some(0u64)); assert_eq!(ScheduleListTail::::get(), Some(8u64)); assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(8u64)); assert_eq!(RewardsSchedulesList::::get(8u64).unwrap().1, None); - forward_to_block(100); + forward_to_block::(100); assert_eq!(ScheduleListHead::::get(), None); assert_eq!(ScheduleListTail::::get(), None); }); @@ -1918,7 +1918,7 @@ fn number_of_active_schedules_is_limited() { Error::::TooManySchedules ); - roll_to_session(10); + roll_to_session::(10); assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1987,7 +1987,7 @@ fn reject_schedule_with_too_little_rewards_per_session() { MockValuationApi::valuate_non_liquidity_token_context(); valuate_non_liquidity_token_mock.expect().return_const(0u128); - roll_to_session(4); + roll_to_session::(4); assert_err!( ProofOfStake::reward_pool( @@ -2017,7 +2017,7 @@ fn accept_schedule_valuated_in_native_token() { let get_pool_state_mock = MockValuationApi::get_pool_state_context(); get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); - roll_to_session(4); + roll_to_session::(4); assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -2050,7 +2050,7 @@ fn accept_schedule_valuated_in_token_paired_with_native_token() { let get_pool_state_mock = MockValuationApi::get_pool_state_context(); get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); - roll_to_session(4); + roll_to_session::(4); assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -2094,7 +2094,7 @@ fn user_can_claim_3rdparty_rewards() { ) .unwrap(); - roll_to_session(1); + roll_to_session::(1); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -2108,7 +2108,7 @@ fn user_can_claim_3rdparty_rewards() { Ok(0) ); - roll_to_session(2); + roll_to_session::(2); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, @@ -2130,7 +2130,7 @@ fn user_can_claim_3rdparty_rewards() { Ok(1000) ); - roll_to_session(3); + roll_to_session::(3); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(1500) @@ -2177,7 +2177,7 @@ fn overlapping_3rdparty_rewards_works() { ) .unwrap(); - roll_to_session(1); + roll_to_session::(1); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -2187,7 +2187,7 @@ fn overlapping_3rdparty_rewards_works() { ) .unwrap(); - roll_to_session(5); + roll_to_session::(5); let second_reward_token_id = TokensOf::::create(&ALICE, MILLION).unwrap(); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -2206,7 +2206,7 @@ fn overlapping_3rdparty_rewards_works() { ) .unwrap(); - roll_to_session(7); + roll_to_session::(7); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( @@ -2252,7 +2252,7 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { ) .unwrap(); - roll_to_session(1); + roll_to_session::(1); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -2262,7 +2262,7 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { ) .unwrap(); - roll_to_session(5); + roll_to_session::(5); ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -2281,7 +2281,7 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { ) .unwrap(); - roll_to_session(7); + roll_to_session::(7); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( @@ -2327,7 +2327,7 @@ fn deactivate_3rdparty_rewards() { ) .unwrap(); - roll_to_session(1); + roll_to_session::(1); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -2346,7 +2346,7 @@ fn deactivate_3rdparty_rewards() { ) .unwrap(); - roll_to_session(2); + roll_to_session::(2); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), @@ -2369,7 +2369,7 @@ fn deactivate_3rdparty_rewards() { ) .unwrap(); - roll_to_session(3); + roll_to_session::(3); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), @@ -2431,7 +2431,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); - roll_to_session(2); + roll_to_session::(2); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![(FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 1 * 1000u128),] @@ -2453,7 +2453,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); - roll_to_session(3); + roll_to_session::(3); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![ @@ -2462,7 +2462,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ] ); - roll_to_session(4); + roll_to_session::(4); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), @@ -2488,7 +2488,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); - roll_to_session(5); + roll_to_session::(5); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![ @@ -2514,7 +2514,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); - roll_to_session(7); + roll_to_session::(7); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), vec![ @@ -2674,7 +2674,7 @@ fn liquidity_minting_liquidity_can_be_resused() { ) .unwrap(); - roll_to_session(2); + roll_to_session::(2); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount( @@ -3027,7 +3027,7 @@ fn can_claim_schedule_rewards() { ) .unwrap(); - forward_to_block(20); + forward_to_block::(20); assert_eq!(TokensOf::::free_balance(FIRST_REWARD_TOKEN, &BOB), 0,); assert_eq!(TokensOf::::free_balance(SECOND_REWARD_TOKEN, &BOB), 0,); @@ -3304,7 +3304,7 @@ fn claim_rewards_from_multiple_sessions_at_once() { ) .unwrap(); - roll_to_session(1); + roll_to_session::(1); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -3318,13 +3318,13 @@ fn claim_rewards_from_multiple_sessions_at_once() { Ok(0) ); - roll_to_session(2); + roll_to_session::(2); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(1000) ); - roll_to_session(5); + roll_to_session::(5); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(4000) @@ -3364,7 +3364,7 @@ fn multi_user_rewards_distributeion_scenario() { ) .unwrap(); - roll_to_session(1); + roll_to_session::(1); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -3378,7 +3378,7 @@ fn multi_user_rewards_distributeion_scenario() { Ok(0) ); - roll_to_session(2); + roll_to_session::(2); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(CHARLIE), LIQUIDITY_TOKEN, @@ -3401,7 +3401,7 @@ fn multi_user_rewards_distributeion_scenario() { Ok(1000) ); - roll_to_session(3); + roll_to_session::(3); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), Ok(1500) @@ -3451,7 +3451,7 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_instantly() { ) .unwrap(); - roll_to_session(12); + roll_to_session::(12); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), @@ -3486,7 +3486,7 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_after_few_sessions( ) .unwrap(); - roll_to_session(7); + roll_to_session::(7); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), LIQUIDITY_TOKEN, @@ -3496,7 +3496,7 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_after_few_sessions( ) .unwrap(); - roll_to_session(15); + roll_to_session::(15); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), @@ -3531,7 +3531,7 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_schedule_is_finishe ) .unwrap(); - roll_to_session(15); + roll_to_session::(15); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), @@ -3542,7 +3542,7 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_schedule_is_finishe ) .unwrap(); - roll_to_session(16); + roll_to_session::(16); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), @@ -3578,7 +3578,7 @@ fn test_multiple_activations_in_same_block() { ) .unwrap(); - roll_to_session(1); + roll_to_session::(1); ProofOfStake::activate_liquidity_for_3rdparty_rewards( RuntimeOrigin::signed(BOB), @@ -3598,7 +3598,7 @@ fn test_multiple_activations_in_same_block() { ) .unwrap(); - roll_to_session(2); + roll_to_session::(2); assert_eq!( ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), @@ -3660,7 +3660,7 @@ fn rewards_are_available_in_next_session_after_rewards_are_provided() { .unwrap() ); - roll_to_session(1); + roll_to_session::(1); assert_eq!( 0u128, @@ -3709,7 +3709,7 @@ fn rewards_are_available_in_next_session_after_rewards_are_provided() { .unwrap() ); - roll_to_session(2); + roll_to_session::(2); assert_eq!( 15_000u128, @@ -3758,7 +3758,7 @@ fn rewards_are_available_in_next_session_after_rewards_are_provided() { .unwrap() ); - roll_to_session(3); + roll_to_session::(3); assert_eq!( 15_000u128 + 10_000u128, @@ -3826,7 +3826,7 @@ fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedu ) .unwrap(); - roll_to_session(2); + roll_to_session::(2); assert_eq!( 500u128, @@ -3924,7 +3924,7 @@ fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedu .unwrap() ); - roll_to_session(3); + roll_to_session::(3); assert_eq!( 1000u128, @@ -4024,7 +4024,7 @@ fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedu .unwrap() ); - roll_to_session(4); + roll_to_session::(4); assert_eq!( 1249u128, @@ -4133,7 +4133,7 @@ fn reject_3rdparty_rewards_with_non_liq_token_and_too_small_volume() { let get_pool_state_mock = MockValuationApi::get_pool_state_context(); get_pool_state_mock.expect().return_const(too_small_volume); - roll_to_session(4); + roll_to_session::(4); assert_err!( ProofOfStake::reward_pool( @@ -4170,7 +4170,7 @@ fn accept_3rdparty_rewards_with_non_liq_token_and_proper_valuation() { let get_pool_state_mock = MockValuationApi::get_pool_state_context(); get_pool_state_mock.expect().return_const(min_volume); - roll_to_session(4); + roll_to_session::(4); assert_ok!( ProofOfStake::reward_pool( @@ -4207,7 +4207,7 @@ fn reject_3rdparty_rewards_with_liq_token_and_too_small_volume() { let get_reserves_mock = MockValuationApi::get_reserves_context(); get_reserves_mock.expect().return_const(Ok((9u128, 0u128))); - roll_to_session(4); + roll_to_session::(4); assert_err!( ProofOfStake::reward_pool( @@ -4243,7 +4243,7 @@ fn accept_3rdparty_rewards_with_liq_token_and_min_volume() { let get_reserves_mock = MockValuationApi::get_reserves_context(); get_reserves_mock.expect().return_const(Ok((min_req_volume(), 0u128))); - roll_to_session(4); + roll_to_session::(4); assert_ok!( ProofOfStake::reward_pool( From 7ebc15dbc7f5a64c8e57d63d157a80d5664cd8eb Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 1 Nov 2023 08:26:33 +0100 Subject: [PATCH 071/125] move utils to dedicated file --- pallets/proof-of-stake/src/lib.rs | 2 + pallets/proof-of-stake/src/mock.rs | 51 -------------------------- pallets/proof-of-stake/src/tests.rs | 1 + pallets/proof-of-stake/src/utils.rs | 57 +++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 51 deletions(-) create mode 100644 pallets/proof-of-stake/src/utils.rs diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 8e3c54d003..b76ca44555 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -148,6 +148,8 @@ mod mock; #[cfg(test)] mod tests; +mod utils; + pub(crate) const LOG_TARGET: &str = "pos"; // syntactic sugar for logging. diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 0977165361..772330b55b 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -478,54 +478,3 @@ macro_rules! assert_event_emitted { }; } -pub fn roll_to_next_block() where - T: pos::Config, - T: frame_system::Config -{ - let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); - forward_to_block::(new_block_number); -} - -pub fn roll_to_next_session() where - T: pos::Config, - T: frame_system::Config -{ - let current_session = ProofOfStake::session_index(); - roll_to_session::(current_session + 1); -} - -pub fn roll_to_session(n: u32) where - T: pos::Config, - T: frame_system::Config -{ - while ProofOfStake::session_index() < n { - roll_to_next_block::(); - } -} - -pub fn forward_to_block(n: T::BlockNumber) where - T: pos::Config, - T: frame_system::Config -{ - forward_to_block_with_custom_rewards::(n, 10000); -} - -pub fn forward_to_block_with_custom_rewards(n: T::BlockNumber, rewards: u128) where - T: pos::Config, - T: frame_system::Config -{ - while frame_system::Pallet::::block_number() < n { - let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); - frame_system::Pallet::::set_block_number(new_block_number); - - frame_system::Pallet::::on_initialize(new_block_number); - pos::Pallet::::on_initialize(new_block_number); - - if pos::Pallet::::is_new_session() { - pos::Pallet::::distribute_rewards(rewards); - } - - pos::Pallet::::on_finalize(new_block_number); - frame_system::Pallet::::on_finalize(new_block_number); - } -} diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 681131f448..92afa8a525 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -7,6 +7,7 @@ use crate::mock::*; use frame_support::{assert_err, assert_err_ignore_postinfo, assert_ok}; use mockall::predicate::eq; use serial_test::serial; +use crate::utils::*; use mangata_support::traits::{ComputeIssuance, GetIssuance}; diff --git a/pallets/proof-of-stake/src/utils.rs b/pallets/proof-of-stake/src/utils.rs new file mode 100644 index 0000000000..3a151cefb9 --- /dev/null +++ b/pallets/proof-of-stake/src/utils.rs @@ -0,0 +1,57 @@ +use crate as pos; +use sp_runtime::Saturating; +use frame_system::{Config, Pallet}; +use frame_support::traits::Hooks; +use mangata_support::traits::LiquidityMiningApi; + +pub fn roll_to_next_block() where + T: pos::Config, + T: frame_system::Config +{ + let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); + forward_to_block::(new_block_number); +} + +pub fn roll_to_next_session() where + T: pos::Config, + T: frame_system::Config +{ + let current_session = pos::Pallet::::session_index(); + roll_to_session::(current_session + 1); +} + +pub fn roll_to_session(n: u32) where + T: pos::Config, + T: frame_system::Config +{ + while pos::Pallet::::session_index() < n { + roll_to_next_block::(); + } +} + +pub fn forward_to_block(n: T::BlockNumber) where + T: pos::Config, + T: frame_system::Config +{ + forward_to_block_with_custom_rewards::(n, 10000); +} + +pub fn forward_to_block_with_custom_rewards(n: T::BlockNumber, rewards: u128) where + T: pos::Config, + T: frame_system::Config +{ + while frame_system::Pallet::::block_number() < n { + let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); + frame_system::Pallet::::set_block_number(new_block_number); + + frame_system::Pallet::::on_initialize(new_block_number); + pos::Pallet::::on_initialize(new_block_number); + + if pos::Pallet::::is_new_session() { + pos::Pallet::::distribute_rewards(rewards); + } + + pos::Pallet::::on_finalize(new_block_number); + frame_system::Pallet::::on_finalize(new_block_number); + } +} From 8ee013fe488564cb755db10719969c2f64f87715 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 1 Nov 2023 18:07:55 +0100 Subject: [PATCH 072/125] few remaining failing tests --- pallets/proof-of-stake/src/benchmarking.rs | 41 +++++++++++----------- pallets/proof-of-stake/src/lib.rs | 2 ++ pallets/proof-of-stake/src/tests.rs | 1 - pallets/proof-of-stake/src/utils.rs | 11 ++++++ 4 files changed, 34 insertions(+), 21 deletions(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 70fb8fd2c8..e7a1bdda93 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -29,27 +29,28 @@ type XykOf = ::ValuationApi; fn forward_to_next_session() where T: frame_system::Config, - T: pallet_issuance::Config, + // T: pallet_issuance::Config, T: Config, { - let current_block: u32 = frame_system::Pallet::::block_number().saturated_into::(); - - let blocks_per_session: u32 = PoS::::rewards_period(); - let target_block_nr: u32; - let target_session_nr: u32; - - if current_block == 0_u32 || current_block == 1_u32 { - target_session_nr = 1_u32; - target_block_nr = blocks_per_session; - } else { - // to fail on user trying to manage block nr on its own - assert!(current_block % blocks_per_session == 0); - target_session_nr = (current_block / blocks_per_session) + 1_u32; - target_block_nr = target_session_nr * blocks_per_session; - } - - frame_system::Pallet::::set_block_number(target_block_nr.into()); - pallet_issuance::Pallet::::compute_issuance(target_session_nr); + crate::utils::roll_to_next_session::(); + // let current_block: u32 = frame_system::Pallet::::block_number().saturated_into::(); + // + // let blocks_per_session: u32 = PoS::::rewards_period(); + // let target_block_nr: u32; + // let target_session_nr: u32; + // + // if current_block == 0_u32 || current_block == 1_u32 { + // target_session_nr = 1_u32; + // target_block_nr = blocks_per_session; + // } else { + // // to fail on user trying to manage block nr on its own + // assert!(current_block % blocks_per_session == 0); + // target_session_nr = (current_block / blocks_per_session) + 1_u32; + // target_block_nr = target_session_nr * blocks_per_session; + // } + // + // frame_system::Pallet::::set_block_number(target_block_nr.into()); + // pallet_issuance::Pallet::::compute_issuance(target_session_nr); } benchmarks! { @@ -69,7 +70,7 @@ benchmarks! { let non_native_asset_id2 : TokenId= ::Currency::create(&caller, initial_amount.into()).unwrap().into(); let liquidity_asset_id : TokenId= ::Currency::create(&caller, ((40000000000000000000_u128/2_u128) + (60000000000000000000_u128/2_u128)).into()).unwrap().into(); - PoS::::update_pool_promotion(RawOrigin::Root.into(), liquidity_asset_id, 1u8).unwrap(); + PoS::::update_pool_promotion(RawOrigin::Root.into(), liquidity_asset_id, 1u8).unwrap(); assert_eq!( ::Currency::total_issuance(liquidity_asset_id.into()), diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index b76ca44555..072e99e78f 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -1509,6 +1509,8 @@ impl ProofOfStakeRewardsApi for Pallet { let (rewards_info, total_available_rewards) = calc.claim_rewards().map_err(|err| Into::>::into(err))?; + // TODO: mint rewards while rolling to next session + println!( "REWARDS : {}", total_available_rewards); ::Currency::transfer( Self::native_token_id().into(), &::LiquidityMiningIssuanceVault::get(), diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 92afa8a525..9318fabc92 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -11,7 +11,6 @@ use crate::utils::*; use mangata_support::traits::{ComputeIssuance, GetIssuance}; -type TokensOf = ::Currency; fn mint_and_activate_tokens(who: AccountId, token_id: TokenId, amount: Balance) { TokensOf::::mint(token_id, &who, amount).unwrap(); diff --git a/pallets/proof-of-stake/src/utils.rs b/pallets/proof-of-stake/src/utils.rs index 3a151cefb9..f28b69b98e 100644 --- a/pallets/proof-of-stake/src/utils.rs +++ b/pallets/proof-of-stake/src/utils.rs @@ -1,9 +1,14 @@ use crate as pos; use sp_runtime::Saturating; +use sp_core::Get; use frame_system::{Config, Pallet}; use frame_support::traits::Hooks; use mangata_support::traits::LiquidityMiningApi; +type TokensOf = ::Currency; +use orml_tokens::MultiTokenCurrencyExtended; + + pub fn roll_to_next_block() where T: pos::Config, T: frame_system::Config @@ -48,6 +53,12 @@ pub fn forward_to_block_with_custom_rewards(n: T::BlockNumber, rewards: u128) pos::Pallet::::on_initialize(new_block_number); if pos::Pallet::::is_new_session() { + TokensOf::::mint( + pos::Pallet::::native_token_id().into(), + &::LiquidityMiningIssuanceVault::get().into(), + rewards.into() + ).unwrap(); + pos::Pallet::::distribute_rewards(rewards); } From cd882ffd6fd9fa826baad789a79680a3b2b1b3fb Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 1 Nov 2023 18:23:21 +0100 Subject: [PATCH 073/125] all benchmarks work --- pallets/proof-of-stake/src/benchmarking.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index e7a1bdda93..cc80f637a3 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -316,6 +316,7 @@ benchmarks! { }: activate_liquidity_for_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id, None) verify { + forward_to_next_session::(); forward_to_next_session::(); assert_eq!( PoS::::calculate_3rdparty_rewards_amount(caller, liquidity_asset_id, reward_token_id).unwrap(), @@ -334,7 +335,7 @@ benchmarks! { let schedules_limit = ::RewardsSchedulesLimit::get(); let caller: ::AccountId = whitelisted_caller(); let native_asset_id = ::NativeCurrencyId::get(); - let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get(); + let REWARDS_AMOUNT: u128 = 2u128 * ::Min3rdPartyRewardValutationPerSession::get(); loop { let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); @@ -414,7 +415,7 @@ benchmarks! { let schedules_limit = ::RewardsSchedulesLimit::get(); let caller: ::AccountId = whitelisted_caller(); let native_asset_id = ::NativeCurrencyId::get(); - let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get(); + let REWARDS_AMOUNT: u128 = 2u128 * ::Min3rdPartyRewardValutationPerSession::get(); loop { let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); @@ -450,6 +451,7 @@ benchmarks! { None ).unwrap(); + forward_to_next_session::(); forward_to_next_session::(); assert_eq!( PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), From 817503907ed142ab6af6f48fe2b9b28c7e2cfbeb Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 1 Nov 2023 18:58:02 +0100 Subject: [PATCH 074/125] kusama-runtime benchmarks fix --- pallets/proof-of-stake/src/lib.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 072e99e78f..e4270a7e91 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -1397,19 +1397,15 @@ impl Pallet { } fn verify_rewards_min_amount(token_id: TokenId, amount_per_session: Balance) -> bool { - log!(info, "blah 1 "); if ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= T::Min3rdPartyRewardValutationPerSession::get() { - log!(info, "blah 2 "); return true; } if token_id == Into::::into(Self::native_token_id()) && amount_per_session >= T::Min3rdPartyRewardValutationPerSession::get() { - log!(info, "blah 3 "); return true; } if ::ValuationApi::valuate_non_liquidity_token( token_id, amount_per_session) >= T::Min3rdPartyRewardValutationPerSession::get() { - log!(info, "blah 4 "); return true; } @@ -1509,8 +1505,6 @@ impl ProofOfStakeRewardsApi for Pallet { let (rewards_info, total_available_rewards) = calc.claim_rewards().map_err(|err| Into::>::into(err))?; - // TODO: mint rewards while rolling to next session - println!( "REWARDS : {}", total_available_rewards); ::Currency::transfer( Self::native_token_id().into(), &::LiquidityMiningIssuanceVault::get(), From f5f756c88acf76e85f46f93694a000b7459b3d71 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 2 Nov 2023 09:02:55 +0100 Subject: [PATCH 075/125] fix features so tests are imported correctly --- pallets/proof-of-stake/src/lib.rs | 4 ++- pallets/proof-of-stake/src/tests.rs | 39 ++++++++++++++--------------- pallets/proof-of-stake/src/utils.rs | 2 +- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index e4270a7e91..492cee85d9 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -142,12 +142,14 @@ use schedule_rewards_calculator::{ mod benchmarking; + #[cfg(test)] mod mock; -#[cfg(test)] +#[cfg(all(test, not(feature="runtime-benchmarks")))] mod tests; +#[cfg(any(feature = "runtime-benchmarks", test))] mod utils; pub(crate) const LOG_TARGET: &str = "pos"; diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 9318fabc92..01d1b6f268 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1,5 +1,4 @@ // Copyright (C) 2020 Mangata team -#![cfg(not(feature = "runtime-benchmarks"))] #![allow(non_snake_case)] use super::*; @@ -65,7 +64,7 @@ fn liquidity_rewards_single_user_mint_W() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -136,7 +135,7 @@ fn liquidity_rewards_three_users_burn_W() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -186,7 +185,7 @@ fn liquidity_rewards_claim_W() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -230,7 +229,7 @@ fn liquidity_rewards_promote_pool_W() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -248,7 +247,7 @@ fn liquidity_rewards_promote_pool_already_promoted_NW() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -268,7 +267,7 @@ fn liquidity_rewards_work_after_burn_W() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -319,7 +318,7 @@ fn liquidity_rewards_deactivate_transfer_controled_W() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -364,7 +363,7 @@ fn liquidity_rewards_deactivate_more_NW() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -400,7 +399,7 @@ fn liquidity_rewards_activate_more_NW() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -430,7 +429,7 @@ fn liquidity_rewards_calculate_rewards_pool_not_promoted() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -449,7 +448,7 @@ fn liquidity_rewards_claim_pool_not_promoted() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -483,7 +482,7 @@ fn liquidity_rewards_not_yet_claimed_already_claimed_W() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -548,7 +547,7 @@ fn extreme_case_pool_ratio() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -580,7 +579,7 @@ fn rewards_rounding_during_often_mint() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -671,7 +670,7 @@ fn rewards_storage_right_amounts_start1() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -816,7 +815,7 @@ fn rewards_storage_right_amounts_start2() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -953,7 +952,7 @@ fn rewards_storage_right_amounts_start3() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = 100_000_000_000_000u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -1032,7 +1031,7 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); @@ -1157,7 +1156,7 @@ fn claim_rewards_from_pool_that_has_been_disabled() { let max = std::u128::MAX; System::set_block_number(1); let acc_id: u128 = 2; - let amount: u128 = max; + let amount: u128 = max / 2u128; TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); TokensOf::::create(&acc_id, amount).unwrap(); diff --git a/pallets/proof-of-stake/src/utils.rs b/pallets/proof-of-stake/src/utils.rs index f28b69b98e..7c658785cc 100644 --- a/pallets/proof-of-stake/src/utils.rs +++ b/pallets/proof-of-stake/src/utils.rs @@ -5,7 +5,7 @@ use frame_system::{Config, Pallet}; use frame_support::traits::Hooks; use mangata_support::traits::LiquidityMiningApi; -type TokensOf = ::Currency; +pub type TokensOf = ::Currency; use orml_tokens::MultiTokenCurrencyExtended; From 2841e8c890af95395df1afc2e58bfa701e3260a2 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 2 Nov 2023 09:43:41 +0100 Subject: [PATCH 076/125] apply formatting --- pallets/proof-of-stake/src/lib.rs | 45 ++-- pallets/proof-of-stake/src/mock.rs | 10 +- pallets/proof-of-stake/src/tests.rs | 346 +++++++--------------------- pallets/proof-of-stake/src/utils.rs | 42 ++-- runtime/mangata-kusama/src/lib.rs | 3 +- runtime/mangata-rococo/src/lib.rs | 3 +- 6 files changed, 139 insertions(+), 310 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 492cee85d9..dbed364c27 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -142,11 +142,10 @@ use schedule_rewards_calculator::{ mod benchmarking; - #[cfg(test)] mod mock; -#[cfg(all(test, not(feature="runtime-benchmarks")))] +#[cfg(all(test, not(feature = "runtime-benchmarks")))] mod tests; #[cfg(any(feature = "runtime-benchmarks", test))] @@ -360,7 +359,7 @@ pub mod pallet { type RewardsSchedulesLimit: Get; /// The minimum number of rewards per session for schedule rewards type Min3rdPartyRewardValutationPerSession: Get; - type Min3rdPartyRewardVolume : Get; + type Min3rdPartyRewardVolume: Get; type WeightInfo: WeightInfo; type ValuationApi: ValutationApiTrait; } @@ -1351,10 +1350,7 @@ impl Pallet { Error::::TooLittleRewards ); - ensure!( - Self::verify_rewards_min_volume(token_id), - Error::::TooSmallVolume - ); + ensure!(Self::verify_rewards_min_volume(token_id), Error::::TooSmallVolume); RewardTokensPerPool::::insert(liquidity_token_id, token_id, ()); @@ -1399,36 +1395,43 @@ impl Pallet { } fn verify_rewards_min_amount(token_id: TokenId, amount_per_session: Balance) -> bool { - if ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= T::Min3rdPartyRewardValutationPerSession::get() { - return true; + if ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= + T::Min3rdPartyRewardValutationPerSession::get() + { + return true } - if token_id == Into::::into(Self::native_token_id()) && amount_per_session >= T::Min3rdPartyRewardValutationPerSession::get() { - return true; + if token_id == Into::::into(Self::native_token_id()) && + amount_per_session >= T::Min3rdPartyRewardValutationPerSession::get() + { + return true } - if ::ValuationApi::valuate_non_liquidity_token( token_id, amount_per_session) >= T::Min3rdPartyRewardValutationPerSession::get() { - return true; + if ::ValuationApi::valuate_non_liquidity_token(token_id, amount_per_session) >= + T::Min3rdPartyRewardValutationPerSession::get() + { + return true } - return false; + return false } fn verify_rewards_min_volume(token_id: TokenId) -> bool { - if token_id == Into::::into(Self::native_token_id()) { - return true; + return true } if let Some((mga_reserves, _)) = ::ValuationApi::get_pool_state(token_id) { - return mga_reserves >= T::Min3rdPartyRewardVolume::get(); + return mga_reserves >= T::Min3rdPartyRewardVolume::get() } - if let Ok((mga_reserves, _)) = ::ValuationApi::get_reserves(Self::native_token_id(), token_id){ - return mga_reserves >= T::Min3rdPartyRewardVolume::get(); - } + if let Ok((mga_reserves, _)) = + ::ValuationApi::get_reserves(Self::native_token_id(), token_id) + { + return mga_reserves >= T::Min3rdPartyRewardVolume::get() + } - return false; + return false } } diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 772330b55b..1d542db89b 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -23,8 +23,7 @@ pub use mangata_support::traits::ProofOfStakeRewardsApi; use mangata_types::{assets::CustomMetadata, Amount, Balance, TokenId}; use orml_tokens::{MultiTokenCurrencyAdapter, MultiTokenCurrencyExtended}; use orml_traits::{asset_registry::AssetMetadata, parameter_type_with_key}; -use sp_runtime::{Perbill, Percent}; -use sp_runtime::Saturating; +use sp_runtime::{Perbill, Percent, Saturating}; use std::{collections::HashMap, sync::Mutex}; pub const NATIVE_CURRENCY_ID: u32 = 0; @@ -405,7 +404,7 @@ pub struct ExtBuilder { } fn min_req_volume() -> u128 { - <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() + <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() } impl ExtBuilder { @@ -444,7 +443,9 @@ impl ExtBuilder { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); - get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); + get_pool_state_mock + .expect() + .return_const(Some((min_req_volume(), min_req_volume()))); f() }) } @@ -477,4 +478,3 @@ macro_rules! assert_event_emitted { } }; } - diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 01d1b6f268..43720734e9 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -2,15 +2,13 @@ #![allow(non_snake_case)] use super::*; -use crate::mock::*; +use crate::{mock::*, utils::*}; use frame_support::{assert_err, assert_err_ignore_postinfo, assert_ok}; use mockall::predicate::eq; use serial_test::serial; -use crate::utils::*; use mangata_support::traits::{ComputeIssuance, GetIssuance}; - fn mint_and_activate_tokens(who: AccountId, token_id: TokenId, amount: Balance) { TokensOf::::mint(token_id, &who, amount).unwrap(); ProofOfStake::activate_liquidity_for_native_rewards( @@ -56,7 +54,6 @@ fn process_all_schedules_in_current_session() { } } - #[test] #[serial] fn liquidity_rewards_single_user_mint_W() { @@ -870,7 +867,7 @@ fn rewards_storage_right_amounts_start2() { .unwrap(); forward_to_block_with_custom_rewards::(200, 20000); //its really weird that rewards are - //decreased from 40k to 20k in single + //decreased from 40k to 20k in single assert_eq!( U256::from(u128::MAX) * U256::from(20), PromotedPoolRewards::::get().get(&4).unwrap().rewards @@ -1212,12 +1209,10 @@ const BOB: u128 = 3; const CHARLIE: u128 = 4; const EVE: u128 = 5; - fn min_req_volume() -> u128 { - <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() + <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() } - #[test] #[serial] fn user_can_provide_3rdparty_rewards() { @@ -1251,14 +1246,9 @@ fn user_can_provide_3rdparty_rewards() { fn cant_schedule_rewards_in_past() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - roll_to_session::(5); assert_err!( ProofOfStake::reward_pool( @@ -1325,14 +1315,9 @@ fn cannot_reward_unexisting_pool() { fn rewards_are_stored_in_pallet_account() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - assert_eq!( TokensOf::::free_balance(REWARD_TOKEN, &Pallet::::pallet_account()), 0 @@ -1360,14 +1345,9 @@ fn rewards_are_stored_in_pallet_account() { fn rewards_schedule_is_stored() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -1400,14 +1380,9 @@ fn rewards_schedule_is_stored() { fn rewards_linked_list_insert_multiple_schedules() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 2 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -1463,14 +1438,9 @@ fn rewards_linked_list_insert_multiple_schedules() { fn rewards_linked_list_removes_outdated_schedule_automatically() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 2 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -1552,14 +1522,9 @@ fn insert_schedule_ending_at_session(n: u32) { fn rewards_first_schedule_from_linked_list_of_four() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - insert_schedule_ending_at_session(1); insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(2); @@ -1588,14 +1553,9 @@ fn rewards_first_schedule_from_linked_list_of_four() { fn remove_last_schedule_from_linked_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(2); @@ -1624,14 +1584,9 @@ fn remove_last_schedule_from_linked_list() { fn remove_middle_schedule_from_linked_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(1); insert_schedule_ending_at_session(2); @@ -1660,14 +1615,9 @@ fn remove_middle_schedule_from_linked_list() { fn remove_first_few_elems_at_once_from_linked_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - insert_schedule_ending_at_session(1); insert_schedule_ending_at_session(1); insert_schedule_ending_at_session(2); @@ -1695,14 +1645,9 @@ fn remove_first_few_elems_at_once_from_linked_list() { fn remove_few_last_elems_at_once_from_linked_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(1); @@ -1730,14 +1675,9 @@ fn remove_few_last_elems_at_once_from_linked_list() { fn remove_few_middle_elements_from_linkedd_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 4 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(1); insert_schedule_ending_at_session(1); @@ -1765,14 +1705,9 @@ fn remove_few_middle_elements_from_linkedd_list() { fn remove_random_elements_from_linked_list() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 5 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - insert_schedule_ending_at_session(2); insert_schedule_ending_at_session(1); insert_schedule_ending_at_session(2); @@ -1803,14 +1738,9 @@ fn remove_random_elements_from_linked_list() { fn remove_random_elements_from_linked_list_over_time() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 7 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - insert_schedule_ending_at_session(3); // 0 insert_schedule_ending_at_session(2); // 1 insert_schedule_ending_at_session(1); // 2 @@ -1848,14 +1778,9 @@ fn remove_random_elements_from_linked_list_over_time() { fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, 10 * REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - insert_schedule_ending_at_session(3); // 0 insert_schedule_ending_at_session(1); // 1 insert_schedule_ending_at_session(1); // 1 @@ -1887,46 +1812,44 @@ fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { #[ignore] #[serial] fn number_of_active_schedules_is_limited() { - ExtBuilder::new().issue(ALICE, REWARD_TOKEN, MILLION).execute_with_default_mocks(|| { - System::set_block_number(1); - + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, MILLION) + .execute_with_default_mocks(|| { + System::set_block_number(1); + let max_schedules: u32 = + <::RewardsSchedulesLimit as sp_core::Get<_>>::get(); + for i in 0..(max_schedules) { + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + (5u32 + i).into() + )); + } + assert_err!( + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 100u32.into() + ), + Error::::TooManySchedules + ); + roll_to_session::(10); - let max_schedules: u32 = - <::RewardsSchedulesLimit as sp_core::Get<_>>::get(); - for i in 0..(max_schedules) { assert_ok!(ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - REWARD_AMOUNT, - (5u32 + i).into() - )); - } - - assert_err!( - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, REWARD_TOKEN, REWARD_AMOUNT, 100u32.into() - ), - Error::::TooManySchedules - ); - - roll_to_session::(10); - - assert_ok!(ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - REWARD_AMOUNT, - 100u32.into() - )); - }); + )); + }); } #[test] @@ -1934,14 +1857,9 @@ fn number_of_active_schedules_is_limited() { fn duplicated_schedules_works() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - assert_eq!(ScheduleListHead::::get(), None); assert_eq!(ScheduleListTail::::get(), None); @@ -2014,7 +1932,9 @@ fn accept_schedule_valuated_in_native_token() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(0u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); - get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); + get_pool_state_mock + .expect() + .return_const(Some((min_req_volume(), min_req_volume()))); roll_to_session::(4); @@ -2047,7 +1967,9 @@ fn accept_schedule_valuated_in_token_paired_with_native_token() { MockValuationApi::valuate_non_liquidity_token_context(); valuate_non_liquidity_token_mock.expect().return_const(10u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); - get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); + get_pool_state_mock + .expect() + .return_const(Some((min_req_volume(), min_req_volume()))); roll_to_session::(4); @@ -2069,15 +1991,9 @@ fn user_can_claim_3rdparty_rewards() { .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); @@ -2159,7 +2075,9 @@ fn overlapping_3rdparty_rewards_works() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(11u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); - get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); + get_pool_state_mock + .expect() + .return_const(Some((min_req_volume(), min_req_volume()))); let first_reward_token = TokensOf::::create(&ALICE, MILLION).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 200).unwrap(); @@ -2234,14 +2152,9 @@ fn reuse_activated_liquiddity_tokens_for_multiple_3rdparty_schedules() { .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 200) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -2309,14 +2222,9 @@ fn deactivate_3rdparty_rewards() { .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -2410,7 +2318,9 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() valuate_liquidity_token_mock.expect().return_const(11u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); - get_pool_state_mock.expect().return_const(Some((min_req_volume(),min_req_volume()))); + get_pool_state_mock + .expect() + .return_const(Some((min_req_volume(), min_req_volume()))); System::set_block_number(1); ProofOfStake::reward_pool( @@ -2638,14 +2548,9 @@ fn liquidity_minting_liquidity_can_be_resused() { .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) .unwrap(); ProofOfStake::reward_pool( @@ -2699,14 +2604,9 @@ fn fail_to_transfer_tokens_that_has_been_partially_deactivated() { .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) .unwrap(); ProofOfStake::reward_pool( @@ -2784,14 +2684,9 @@ fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) .unwrap(); ProofOfStake::reward_pool( @@ -2883,14 +2778,9 @@ fn liquidity_can_be_deactivated_when_all_reward_participation_were_deactivated() .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) .unwrap(); ProofOfStake::reward_pool( @@ -2981,12 +2871,7 @@ fn can_claim_schedule_rewards() { .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { - - - - System::set_block_number(1); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) @@ -3130,12 +3015,7 @@ fn can_not_provide_liquidity_for_schedule_rewards_when_its_only_activated_for_li ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { - - - - System::set_block_number(1); ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) @@ -3160,15 +3040,9 @@ fn can_not_provide_liquidity_for_mining_rewards_when_its_only_activated_for_sche ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -3227,15 +3101,9 @@ fn unsuccessul_activate_deactivate_calls_charges_fees() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - - let activate_call = mock::RuntimeCall::ProofOfStake(Call::activate_liquidity_for_3rdparty_rewards { liquidity_token_id: LIQUIDITY_TOKEN, @@ -3279,15 +3147,9 @@ fn claim_rewards_from_multiple_sessions_at_once() { .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); @@ -3339,15 +3201,9 @@ fn multi_user_rewards_distributeion_scenario() { .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - - TokensOf::::mint(LIQUIDITY_TOKEN, &BOB, 100).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &CHARLIE, 100).unwrap(); TokensOf::::mint(LIQUIDITY_TOKEN, &EVE, 100).unwrap(); @@ -3422,15 +3278,9 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_instantly() { ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - - let amount = 10_000u128; ProofOfStake::reward_pool( @@ -3465,15 +3315,9 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_after_few_sessions( ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - - let amount = 10_000u128; ProofOfStake::reward_pool( @@ -3510,15 +3354,9 @@ fn test_all_scheduled_rewards_are_distributed_when_activated_schedule_is_finishe ExtBuilder::new() .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - - let amount = 10_000u128; ProofOfStake::reward_pool( @@ -3557,15 +3395,9 @@ fn test_multiple_activations_in_same_block() { .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - - let amount = 10_000u128; ProofOfStake::reward_pool( @@ -3614,14 +3446,9 @@ fn rewards_are_available_in_next_session_after_rewards_are_provided() { .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), REWARDED_PAIR, @@ -3790,14 +3617,9 @@ fn multiple_activations_and_deactivations_from_multiple_users_on_the_same_schedu .issue(BOB, LIQUIDITY_TOKEN, 100) .issue(CHARLIE, LIQUIDITY_TOKEN, 100) .issue(EVE, LIQUIDITY_TOKEN, 100) - .execute_with_default_mocks(|| { System::set_block_number(1); - - - - /// 1000 rewards per session ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -4109,7 +3931,6 @@ fn activity_for_schedule_rewards_can_be_activated_only_after_pool_is_rewarded_fo }); } - #[test] #[serial] fn reject_3rdparty_rewards_with_non_liq_token_and_too_small_volume() { @@ -4118,7 +3939,7 @@ fn reject_3rdparty_rewards_with_non_liq_token_and_too_small_volume() { .build() .execute_with(|| { System::set_block_number(1); - let too_small_volume = Some((min_req_volume()-1,min_req_volume()-1)); + let too_small_volume = Some((min_req_volume() - 1, min_req_volume() - 1)); let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -4126,7 +3947,8 @@ fn reject_3rdparty_rewards_with_non_liq_token_and_too_small_volume() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(0u128); - let valuate_non_liquidity_token_mock = MockValuationApi::valuate_non_liquidity_token_context(); + let valuate_non_liquidity_token_mock = + MockValuationApi::valuate_non_liquidity_token_context(); valuate_non_liquidity_token_mock.expect().return_const(10u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); @@ -4135,15 +3957,15 @@ fn reject_3rdparty_rewards_with_non_liq_token_and_too_small_volume() { roll_to_session::(4); assert_err!( - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - 10, - 5u32.into() - ), - Error::::TooSmallVolume - ); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ), + Error::::TooSmallVolume + ); }); } @@ -4155,7 +3977,7 @@ fn accept_3rdparty_rewards_with_non_liq_token_and_proper_valuation() { .build() .execute_with(|| { System::set_block_number(1); - let min_volume = Some((min_req_volume(),min_req_volume())); + let min_volume = Some((min_req_volume(), min_req_volume())); let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -4163,7 +3985,8 @@ fn accept_3rdparty_rewards_with_non_liq_token_and_proper_valuation() { let valuate_liquidity_token_mock = MockValuationApi::valuate_liquidity_token_context(); valuate_liquidity_token_mock.expect().return_const(0u128); - let valuate_non_liquidity_token_mock = MockValuationApi::valuate_non_liquidity_token_context(); + let valuate_non_liquidity_token_mock = + MockValuationApi::valuate_non_liquidity_token_context(); valuate_non_liquidity_token_mock.expect().return_const(10u128); let get_pool_state_mock = MockValuationApi::get_pool_state_context(); @@ -4171,19 +3994,16 @@ fn accept_3rdparty_rewards_with_non_liq_token_and_proper_valuation() { roll_to_session::(4); - assert_ok!( - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - 10, - 5u32.into() - ), - ); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ),); }); } - #[test] #[serial] fn reject_3rdparty_rewards_with_liq_token_and_too_small_volume() { @@ -4192,7 +4012,7 @@ fn reject_3rdparty_rewards_with_liq_token_and_too_small_volume() { .build() .execute_with(|| { System::set_block_number(1); - let too_small_volume = Some((min_req_volume()-1,min_req_volume()-1)); + let too_small_volume = Some((min_req_volume() - 1, min_req_volume() - 1)); let get_liquidity_asset_mock = MockValuationApi::get_liquidity_asset_context(); get_liquidity_asset_mock.expect().return_const(Ok(LIQUIDITY_TOKEN)); @@ -4209,15 +4029,15 @@ fn reject_3rdparty_rewards_with_liq_token_and_too_small_volume() { roll_to_session::(4); assert_err!( - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - 10, - 5u32.into() - ), - Error::::TooSmallVolume - ); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ), + Error::::TooSmallVolume + ); }); } @@ -4244,14 +4064,12 @@ fn accept_3rdparty_rewards_with_liq_token_and_min_volume() { roll_to_session::(4); - assert_ok!( - ProofOfStake::reward_pool( - RuntimeOrigin::signed(ALICE), - REWARDED_PAIR, - REWARD_TOKEN, - 10, - 5u32.into() - ), - ); + assert_ok!(ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + 10, + 5u32.into() + ),); }); } diff --git a/pallets/proof-of-stake/src/utils.rs b/pallets/proof-of-stake/src/utils.rs index 7c658785cc..552618d632 100644 --- a/pallets/proof-of-stake/src/utils.rs +++ b/pallets/proof-of-stake/src/utils.rs @@ -1,52 +1,57 @@ use crate as pos; -use sp_runtime::Saturating; -use sp_core::Get; -use frame_system::{Config, Pallet}; use frame_support::traits::Hooks; +use frame_system::{Config, Pallet}; use mangata_support::traits::LiquidityMiningApi; +use sp_core::Get; +use sp_runtime::Saturating; pub type TokensOf = ::Currency; use orml_tokens::MultiTokenCurrencyExtended; - -pub fn roll_to_next_block() where +pub fn roll_to_next_block() +where T: pos::Config, - T: frame_system::Config + T: frame_system::Config, { - let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); + let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); forward_to_block::(new_block_number); } -pub fn roll_to_next_session() where +pub fn roll_to_next_session() +where T: pos::Config, - T: frame_system::Config + T: frame_system::Config, { let current_session = pos::Pallet::::session_index(); roll_to_session::(current_session + 1); } -pub fn roll_to_session(n: u32) where +pub fn roll_to_session(n: u32) +where T: pos::Config, - T: frame_system::Config + T: frame_system::Config, { while pos::Pallet::::session_index() < n { roll_to_next_block::(); } } -pub fn forward_to_block(n: T::BlockNumber) where +pub fn forward_to_block(n: T::BlockNumber) +where T: pos::Config, - T: frame_system::Config + T: frame_system::Config, { forward_to_block_with_custom_rewards::(n, 10000); } -pub fn forward_to_block_with_custom_rewards(n: T::BlockNumber, rewards: u128) where +pub fn forward_to_block_with_custom_rewards(n: T::BlockNumber, rewards: u128) +where T: pos::Config, - T: frame_system::Config + T: frame_system::Config, { while frame_system::Pallet::::block_number() < n { - let new_block_number = frame_system::Pallet::::block_number().saturating_add(1u32.into()); + let new_block_number = + frame_system::Pallet::::block_number().saturating_add(1u32.into()); frame_system::Pallet::::set_block_number(new_block_number); frame_system::Pallet::::on_initialize(new_block_number); @@ -56,8 +61,9 @@ pub fn forward_to_block_with_custom_rewards(n: T::BlockNumber, rewards: u128) TokensOf::::mint( pos::Pallet::::native_token_id().into(), &::LiquidityMiningIssuanceVault::get().into(), - rewards.into() - ).unwrap(); + rewards.into(), + ) + .unwrap(); pos::Pallet::::distribute_rewards(rewards); } diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index cbd2ee430b..35d91d2965 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -277,7 +277,8 @@ impl pallet_proof_of_stake::Config for Runtime { type RewardsDistributionPeriod = cfg::SessionLenghtOf; type WeightInfo = weights::pallet_proof_of_stake_weights::ModuleWeight; type RewardsSchedulesLimit = cfg::pallet_proof_of_stake::RewardsSchedulesLimit; - type Min3rdPartyRewardValutationPerSession = cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; + type Min3rdPartyRewardValutationPerSession = + cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; type Min3rdPartyRewardVolume = cfg::pallet_proof_of_stake::Min3rdPartyRewardVolume; type ValuationApi = Xyk; } diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index e7178cfc5a..37c7ddd39d 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -277,7 +277,8 @@ impl pallet_proof_of_stake::Config for Runtime { type RewardsDistributionPeriod = cfg::SessionLenghtOf; type WeightInfo = weights::pallet_proof_of_stake_weights::ModuleWeight; type RewardsSchedulesLimit = cfg::pallet_proof_of_stake::RewardsSchedulesLimit; - type Min3rdPartyRewardValutationPerSession = cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; + type Min3rdPartyRewardValutationPerSession = + cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; type Min3rdPartyRewardVolume = cfg::pallet_proof_of_stake::Min3rdPartyRewardVolume; type ValuationApi = Xyk; } From 03be574ad197de5a8d08dac1ac2e12b93bf593bf Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 2 Nov 2023 10:48:02 +0100 Subject: [PATCH 077/125] fix test for that verifies that fees are not charged on successful activations/deactivations --- pallets/proof-of-stake/src/tests.rs | 55 +++++++++++++++++++---------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 43720734e9..0f5c0fe6d0 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -3068,31 +3068,48 @@ use frame_support::dispatch::{GetDispatchInfo, Pays}; use sp_runtime::{traits::Dispatchable, Permill}; #[test] -#[ignore] #[serial] fn activate_deactivate_calls_are_free_of_charge() { - ExtBuilder::new().execute_with_default_mocks(|| { - System::set_block_number(1); + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); - let activate_call = - mock::RuntimeCall::ProofOfStake(Call::activate_liquidity_for_3rdparty_rewards { - liquidity_token_id: LIQUIDITY_TOKEN, - amount: 100, - reward_token: REWARD_TOKEN, - use_balance_from: None, - }); + let activate_call = + mock::RuntimeCall::ProofOfStake(Call::activate_liquidity_for_3rdparty_rewards { + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + use_balance_from: None, + }); - let deactivate_call = - mock::RuntimeCall::ProofOfStake(Call::deactivate_liquidity_for_3rdparty_rewards { - liquidity_token_id: LIQUIDITY_TOKEN, - amount: 100, - reward_token: REWARD_TOKEN, - }); + let deactivate_call = + mock::RuntimeCall::ProofOfStake(Call::deactivate_liquidity_for_3rdparty_rewards { + liquidity_token_id: LIQUIDITY_TOKEN, + amount: 100, + reward_token: REWARD_TOKEN, + }); - assert_eq!(activate_call.get_dispatch_info().pays_fee, Pays::No); + assert_eq!( + activate_call.dispatch(RuntimeOrigin::signed(BOB)).unwrap().pays_fee, + Pays::No + ); - assert_eq!(deactivate_call.get_dispatch_info().pays_fee, Pays::No); - }); + assert_eq!( + deactivate_call.dispatch(RuntimeOrigin::signed(BOB)).unwrap().pays_fee, + Pays::No + ); + }); } #[test] From 0c378676d2dcaa6ee8ea63a3f37d3ecfa607d8cd Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 2 Nov 2023 12:26:34 +0100 Subject: [PATCH 078/125] align --- Cargo.lock | 283 ++++++- Cargo.toml | 2205 ++++++++++++++++++++++++++-------------------------- 2 files changed, 1360 insertions(+), 1128 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1102437ef3..ef57fb35bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -554,6 +554,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "hash-db 0.16.0", "log", @@ -1099,7 +1100,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", + "frame-system-benchmarking 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -2611,6 +2612,7 @@ dependencies = [ [[package]] name = "extrinsic-shuffler" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "derive_more", "log", @@ -2779,6 +2781,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", ] @@ -2801,6 +2804,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-support-procedural", @@ -2826,6 +2830,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "Inflector", "array-bytes 4.2.0", @@ -2878,6 +2883,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2888,6 +2894,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2904,6 +2911,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "aquamarine", "extrinsic-shuffler", @@ -2937,6 +2945,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "log", @@ -2952,6 +2961,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "bitflags", "environmental", @@ -2985,6 +2995,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "Inflector", "cfg-expr", @@ -2999,6 +3010,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -3010,6 +3022,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro2", "quote", @@ -3019,6 +3032,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "extrinsic-shuffler", "frame-support", @@ -3038,6 +3052,22 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#afd05d5ed525572ed1b6d6a19aeac2465f552e1f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "frame-system-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -3052,6 +3082,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "sp-api", @@ -3060,6 +3091,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "parity-scale-codec", @@ -4112,7 +4144,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", + "frame-system-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -4956,7 +4988,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", + "frame-system-benchmarking 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -5080,7 +5112,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-aura", - "sc-consensus-grandpa", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", "sc-executor", "sc-keystore", "sc-network", @@ -5146,7 +5178,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", + "frame-system-benchmarking 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -5240,6 +5272,7 @@ dependencies = [ [[package]] name = "mangata-support" version = "0.1.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "mangata-types", @@ -5252,6 +5285,7 @@ dependencies = [ [[package]] name = "mangata-types" version = "0.1.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -5419,6 +5453,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "log", @@ -5438,6 +5473,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "anyhow", "jsonrpsee", @@ -6075,6 +6111,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6090,6 +6127,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6105,6 +6143,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6118,6 +6157,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6141,6 +6181,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6160,6 +6201,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6174,6 +6216,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6192,9 +6235,10 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", - "binary-merkle-tree 4.0.0-dev", + "binary-merkle-tree 4.0.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "frame-support", "frame-system", "log", @@ -6247,6 +6291,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6264,6 +6309,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6282,6 +6328,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6298,6 +6345,7 @@ dependencies = [ [[package]] name = "pallet-collective-mangata" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6314,6 +6362,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6330,7 +6379,6 @@ dependencies = [ [[package]] name = "pallet-crowdloan-rewards" version = "0.6.0" -source = "git+https://github.com/mangata-finance//crowdloan-rewards?branch=mangata-dev#93f22908087bf475bf1021bc9c3337fefd00fb39" dependencies = [ "ed25519-dalek", "frame-benchmarking", @@ -6354,6 +6402,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6371,13 +6420,14 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", "log", - "pallet-election-provider-support-benchmarking 4.0.0-dev", + "pallet-election-provider-support-benchmarking 4.0.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "parity-scale-codec", "rand 0.8.5", "scale-info", @@ -6393,6 +6443,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6418,6 +6469,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6435,6 +6487,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6481,6 +6534,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6503,6 +6557,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6518,6 +6573,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6537,6 +6593,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6605,6 +6662,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6621,6 +6679,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6667,6 +6726,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6682,6 +6742,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6697,6 +6758,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6733,6 +6795,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6743,6 +6806,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6783,6 +6847,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6836,6 +6901,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6850,6 +6916,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6867,6 +6934,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6881,6 +6949,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6899,6 +6968,7 @@ dependencies = [ [[package]] name = "pallet-root-testing" version = "1.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#afd05d5ed525572ed1b6d6a19aeac2465f552e1f" dependencies = [ "frame-support", "frame-system", @@ -6913,6 +6983,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -6929,6 +7000,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6965,6 +7037,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -6978,6 +7051,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7000,6 +7074,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7010,6 +7085,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "log", "sp-arithmetic", @@ -7027,6 +7103,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7043,6 +7120,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -7056,6 +7134,7 @@ dependencies = [ [[package]] name = "pallet-sudo-mangata" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -7087,6 +7166,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7104,6 +7184,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7122,6 +7203,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -7137,6 +7219,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-mangata" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-support", "frame-system", @@ -7152,6 +7235,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-mangata-rpc" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "jsonrpsee", "pallet-transaction-payment-mangata-rpc-runtime-api", @@ -7167,6 +7251,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-mangata-rpc-runtime-api" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "pallet-transaction-payment-mangata", "parity-scale-codec", @@ -7178,6 +7263,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7193,6 +7279,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7204,6 +7291,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7220,6 +7308,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7235,6 +7324,7 @@ dependencies = [ [[package]] name = "pallet-utility-mangata" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7250,6 +7340,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7264,6 +7355,7 @@ dependencies = [ [[package]] name = "pallet-vesting-mangata" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7279,6 +7371,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-benchmarking", "frame-support", @@ -7381,6 +7474,7 @@ dependencies = [ [[package]] name = "parachain-staking" version = "3.0.0" +source = "git+https://github.com/mangata-finance//moonbeam?branch=feature/3rdparty-rewards#508b9d4bf3940fdb6e984d84d07da8367baea915" dependencies = [ "aquamarine", "frame-benchmarking", @@ -8498,7 +8592,7 @@ dependencies = [ "sc-consensus-beefy", "sc-consensus-beefy-rpc", "sc-consensus-epochs", - "sc-consensus-grandpa", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "sc-consensus-grandpa-rpc", "sc-rpc", "sc-sync-state-rpc", @@ -8525,7 +8619,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", + "frame-system-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -8789,7 +8883,7 @@ dependencies = [ "sc-consensus", "sc-consensus-babe", "sc-consensus-beefy", - "sc-consensus-grandpa", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "sc-consensus-slots", "sc-executor", "sc-keystore", @@ -8952,7 +9046,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-babe", - "sc-consensus-grandpa", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "sc-executor", "sc-network", "sc-service", @@ -9657,7 +9751,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", + "frame-system-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -10007,6 +10101,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "log", "sp-core", @@ -10017,6 +10112,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -10044,6 +10140,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "futures-timer", @@ -10066,6 +10163,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship-ver" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "aquamarine", "futures", @@ -10091,6 +10189,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -10105,6 +10204,7 @@ dependencies = [ [[package]] name = "sc-block-builder-ver" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "aquamarine", "extrinsic-shuffler", @@ -10125,6 +10225,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -10143,6 +10244,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10153,6 +10255,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "chrono", @@ -10192,6 +10295,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "fnv", "futures", @@ -10217,6 +10321,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -10242,6 +10347,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -10266,6 +10372,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -10294,6 +10401,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "fork-tree", @@ -10334,6 +10442,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "jsonrpsee", @@ -10355,6 +10464,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10408,6 +10518,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10420,6 +10531,47 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" +dependencies = [ + "ahash 0.8.3", + "array-bytes 4.2.0", + "async-trait", + "dyn-clone", + "finality-grandpa", + "fork-tree", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-telemetry", + "sc-utils", + "serde_json", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-grandpa", + "sp-core", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-consensus-grandpa" +version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#afd05d5ed525572ed1b6d6a19aeac2465f552e1f" dependencies = [ "ahash 0.8.3", "array-bytes 4.2.0", @@ -10467,7 +10619,7 @@ dependencies = [ "log", "parity-scale-codec", "sc-client-api", - "sc-consensus-grandpa", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "sc-rpc", "serde", "sp-blockchain", @@ -10479,6 +10631,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -10503,6 +10656,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -10526,6 +10680,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -10538,6 +10693,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "log", "sc-allocator", @@ -10550,6 +10706,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "anyhow", "cfg-if", @@ -10567,6 +10724,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ansi_term", "futures", @@ -10582,6 +10740,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10596,6 +10755,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "async-channel", @@ -10639,6 +10799,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "cid", "futures", @@ -10658,6 +10819,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10685,6 +10847,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ahash 0.8.3", "futures", @@ -10703,6 +10866,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10724,6 +10888,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10757,6 +10922,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10776,6 +10942,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -10806,6 +10973,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "libp2p", @@ -10818,6 +10986,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10826,6 +10995,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "hash-db 0.15.2", @@ -10856,6 +11026,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10875,6 +11046,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "http", @@ -10890,6 +11062,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10915,6 +11088,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "directories", @@ -10946,7 +11120,7 @@ dependencies = [ "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", - "sc-storage-monitor 0.1.0", + "sc-storage-monitor 0.1.0 (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -10986,6 +11160,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "log", "parity-scale-codec", @@ -10996,6 +11171,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "clap", "fs4", @@ -11027,6 +11203,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -11034,7 +11211,7 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-epochs", - "sc-consensus-grandpa", + "sc-consensus-grandpa 0.10.0-dev (git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards)", "serde", "serde_json", "sp-blockchain", @@ -11045,6 +11222,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "libc", @@ -11063,6 +11241,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "chrono", "futures", @@ -11081,6 +11260,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ansi_term", "atty", @@ -11111,6 +11291,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11121,6 +11302,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -11147,6 +11329,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -11160,6 +11343,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-channel", "futures", @@ -11672,6 +11856,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "hash-db 0.16.0", "log", @@ -11689,6 +11874,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "Inflector", "blake2", @@ -11702,6 +11888,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -11714,6 +11901,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "integer-sqrt", "num-traits", @@ -11727,6 +11915,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -11739,6 +11928,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "sp-api", @@ -11750,6 +11940,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "futures", "log", @@ -11767,6 +11958,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -11781,6 +11973,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "parity-scale-codec", @@ -11798,6 +11991,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "merlin", @@ -11820,6 +12014,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "lazy_static", "parity-scale-codec", @@ -11838,6 +12033,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "finality-grandpa", "log", @@ -11855,6 +12051,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -11868,6 +12065,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -11880,6 +12078,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "base58", @@ -11923,6 +12122,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "blake2b_simd", "byteorder", @@ -11936,6 +12136,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro2", "quote", @@ -11946,6 +12147,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11954,6 +12156,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "proc-macro2", "quote", @@ -11963,6 +12166,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "environmental", "parity-scale-codec", @@ -11973,6 +12177,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11987,6 +12192,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "bytes", "ed25519", @@ -12011,6 +12217,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "lazy_static", "sp-core", @@ -12021,6 +12228,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures", @@ -12037,6 +12245,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "thiserror", "zstd", @@ -12045,6 +12254,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -12062,6 +12272,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -12075,6 +12286,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "sp-api", "sp-core", @@ -12084,6 +12296,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "backtrace", "lazy_static", @@ -12093,6 +12306,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "rustc-hash", "serde", @@ -12102,6 +12316,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "either", "hash256-std-hasher", @@ -12124,6 +12339,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -12141,6 +12357,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "Inflector", "proc-macro-crate", @@ -12152,6 +12369,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -12165,6 +12383,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -12176,6 +12395,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "hash-db 0.16.0", "log", @@ -12195,10 +12415,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" [[package]] name = "sp-storage" version = "7.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12211,6 +12433,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "futures-timer", @@ -12225,6 +12448,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "sp-std", @@ -12236,6 +12460,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "sp-api", "sp-runtime", @@ -12244,6 +12469,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "log", @@ -12259,6 +12485,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ahash 0.8.3", "hash-db 0.16.0", @@ -12281,6 +12508,7 @@ dependencies = [ [[package]] name = "sp-ver" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "log", @@ -12298,6 +12526,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12314,6 +12543,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -12324,6 +12554,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -12337,6 +12568,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "parity-scale-codec", "scale-info", @@ -12515,6 +12747,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "platforms 2.0.0", ] @@ -12522,6 +12755,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12540,6 +12774,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "hyper", "log", @@ -12551,6 +12786,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "jsonrpsee", @@ -12563,6 +12799,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "jsonrpsee", "log", @@ -12581,6 +12818,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -12606,6 +12844,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "ansi_term", "build-helper", @@ -13249,6 +13488,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "async-trait", "clap", @@ -13461,6 +13701,7 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "ver-api" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" dependencies = [ "derive_more", "futures", @@ -14153,7 +14394,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", + "frame-system-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", @@ -14789,14 +15030,22 @@ dependencies = [ "pkg-config", ] +[[patch.unused]] +name = "pallet-vesting-mangata" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" + [[patch.unused]] name = "sp-authorship" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" [[patch.unused]] name = "sp-authorship" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" [[patch.unused]] name = "sp-authorship" version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" diff --git a/Cargo.toml b/Cargo.toml index 80d3a23727..e79c889cdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,12 +55,12 @@ orml-tokens = { git = "https://github.com/mangata-finance//open-runtime-module-l # patch generated by ./scripts/dev_manifest.sh [patch."https://github.com/mangata-finance/moonbeam"] # parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "feature/update-staking-benchmarks" } -# parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "mangata-dev" } -parachain-staking = { path = "../moonbeam/pallets/parachain-staking" } +parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", branch = "feature/3rdparty-rewards" } +# parachain-staking = { path = "../moonbeam/pallets/parachain-staking" } [patch."https://github.com/mangata-finance/crowdloan-rewards"] -pallet-crowdloan-rewards = { git = "https://github.com/mangata-finance//crowdloan-rewards", branch = "mangata-dev" } -# pallet-crowdloan-rewards = { path = "../crowdloan-rewards" } +# pallet-crowdloan-rewards = { git = "https://github.com/mangata-finance//crowdloan-rewards", branch = "fr-dev" } +pallet-crowdloan-rewards = { path = "../crowdloan-rewards" } # patch generated by ./scripts/dev_manifest.sh [patch."https://github.com/paritytech/cumulus"] @@ -370,1120 +370,1103 @@ xcm-procedural = { git = "https://github.com/mangata-finance//polkadot", branch # xcm = { path = "../polkadot/xcm" } # xcm-procedural = { path = "../polkadot/xcm/procedural" } -# # patch generated by ./scripts/dev-0.9.29_manifest.sh -# [patch."https://github.com/mangata-finance/substrate"] -# sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# -# # patch generated by ./scripts/dev-0.9.29_manifest.sh -# [patch."https://github.com/paritytech/substrate"] -# sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# -# # patch generated by ./scripts/dev-0.9.29_manifest.sh -# [patch."https://github.com/PureStake/substrate"] -# sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } -# sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "mangata-dev" } - [patch."https://github.com/mangata-finance//substrate"] -pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } +pallet-vesting-mangata = { git = "https://github.com/mangata-finance/substrate", branch = "feature/3rdparty-rewards" } -# patch generated by ./scripts/dev_manifest.sh + # patch generated by ./scripts/dev-0.9.29_manifest.sh [patch."https://github.com/mangata-finance/substrate"] -sc-offchain = { path = "../substrate/client/offchain" } -sc-keystore = { path = "../substrate/client/keystore" } -mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } -mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } -sc-informant = { path = "../substrate/client/informant" } -sc-client-db = { path = "../substrate/client/db" } -sc-rpc-api = { path = "../substrate/client/rpc-api" } -sc-client-api = { path = "../substrate/client/api" } -sc-block-builder = { path = "../substrate/client/block-builder" } -sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } -sc-transaction-pool = { path = "../substrate/client/transaction-pool" } -sc-utils = { path = "../substrate/client/utils" } -sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } -sc-tracing = { path = "../substrate/client/tracing" } -sc-state-db = { path = "../substrate/client/state-db" } -sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } -sc-authority-discovery = { path = "../substrate/client/authority-discovery" } -sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } -sc-consensus-babe = { path = "../substrate/client/consensus/babe" } -sc-consensus-slots = { path = "../substrate/client/consensus/slots" } -sc-consensus = { path = "../substrate/client/consensus/common" } -sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } -sc-consensus-aura = { path = "../substrate/client/consensus/aura" } -sc-basic-authorship = { path = "../substrate/client/basic-authorship" } -sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } -sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } -sc-executor = { path = "../substrate/client/executor" } -sc-executor-common = { path = "../substrate/client/executor/common" } -sc-cli = { path = "../substrate/client/cli" } -sc-peerset = { path = "../substrate/client/peerset" } -sc-telemetry = { path = "../substrate/client/telemetry" } -sc-allocator = { path = "../substrate/client/allocator" } -sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } -sc-network-gossip = { path = "../substrate/client/network-gossip" } -sc-sysinfo = { path = "../substrate/client/sysinfo" } -sc-rpc-server = { path = "../substrate/client/rpc-servers" } -sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } -sc-rpc = { path = "../substrate/client/rpc" } -sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } -sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } -sc-chain-spec = { path = "../substrate/client/chain-spec" } -sc-network-sync = { path = "../substrate/client/network/sync" } -sc-network-bitswap = { path = "../substrate/client/network/bitswap" } -sc-network-light = { path = "../substrate/client/network/light" } -sc-network-transactions = { path = "../substrate/client/network/transactions" } -sc-network = { path = "../substrate/client/network" } -sc-network-common = { path = "../substrate/client/network/common" } -sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } -sc-service = { path = "../substrate/client/service" } -substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } -fork-tree = { path = "../substrate/utils/fork-tree" } -frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } -try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } -frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } -substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } -substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } -substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } -substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } -substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } -pallet-referenda = { path = "../substrate/frame/referenda" } -pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } -pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } -pallet-utility = { path = "../substrate/frame/utility" } -pallet-session = { path = "../substrate/frame/session" } -pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } -pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } -pallet-treasury = { path = "../substrate/frame/treasury" } -pallet-sudo = { path = "../substrate/frame/sudo" } -pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } -pallet-membership = { path = "../substrate/frame/membership" } -pallet-recovery = { path = "../substrate/frame/recovery" } -pallet-tips = { path = "../substrate/frame/tips" } -pallet-balances = { path = "../substrate/frame/balances" } -pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } -frame-executive = { path = "../substrate/frame/executive" } -pallet-timestamp = { path = "../substrate/frame/timestamp" } -pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } -pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } -pallet-preimage = { path = "../substrate/frame/preimage" } -frame-try-runtime = { path = "../substrate/frame/try-runtime" } -pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } -pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } -pallet-society = { path = "../substrate/frame/society" } -pallet-identity = { path = "../substrate/frame/identity" } -pallet-babe = { path = "../substrate/frame/babe" } -pallet-child-bounties = { path = "../substrate/frame/child-bounties" } -pallet-vesting = { path = "../substrate/frame/vesting" } -pallet-bounties = { path = "../substrate/frame/bounties" } -frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } -frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } -pallet-indices = { path = "../substrate/frame/indices" } -pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } -pallet-collective = { path = "../substrate/frame/collective" } -pallet-multisig = { path = "../substrate/frame/multisig" } -pallet-offences = { path = "../substrate/frame/offences" } -pallet-scheduler = { path = "../substrate/frame/scheduler" } -pallet-nis = { path = "../substrate/frame/nis" } -frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } -frame-system = { path = "../substrate/frame/system" } -frame-benchmarking = { path = "../substrate/frame/benchmarking" } -pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } -pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } -pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } -pallet-proxy = { path = "../substrate/frame/proxy" } -pallet-whitelist = { path = "../substrate/frame/whitelist" } -pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } -pallet-bags-list = { path = "../substrate/frame/bags-list" } -pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } -pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } -pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } -pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } -frame-support = { path = "../substrate/frame/support" } -frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } -frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } -frame-support-procedural = { path = "../substrate/frame/support/procedural" } -pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } -pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } -pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } -pallet-staking = { path = "../substrate/frame/staking" } -pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } -pallet-grandpa = { path = "../substrate/frame/grandpa" } -pallet-democracy = { path = "../substrate/frame/democracy" } -pallet-beefy = { path = "../substrate/frame/beefy" } -pallet-aura = { path = "../substrate/frame/aura" } -pallet-authorship = { path = "../substrate/frame/authorship" } -pallet-im-online = { path = "../substrate/frame/im-online" } -mangata-support = { path = "../substrate/frame/mangata-support" } -substrate-test-client = { path = "../substrate/test-utils/client" } -sp-offchain = { path = "../substrate/primitives/offchain" } -sp-keystore = { path = "../substrate/primitives/keystore" } -sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } -sp-keyring = { path = "../substrate/primitives/keyring" } -sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } -sp-state-machine = { path = "../substrate/primitives/state-machine" } -sp-session = { path = "../substrate/primitives/session" } -sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } -ver-api = { path = "../substrate/primitives/ver-api" } -sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } -sp-api = { path = "../substrate/primitives/api" } -sp-externalities = { path = "../substrate/primitives/externalities" } -sp-std = { path = "../substrate/primitives/std" } -sp-trie = { path = "../substrate/primitives/trie" } -sp-block-builder = { path = "../substrate/primitives/block-builder" } -sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } -sp-tracing = { path = "../substrate/primitives/tracing" } -sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } -sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } -sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } -sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } -sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } -sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } -sp-consensus = { path = "../substrate/primitives/consensus/common" } -sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } -sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } -sp-io = { path = "../substrate/primitives/io" } -sp-timestamp = { path = "../substrate/primitives/timestamp" } -sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } -sp-core-hashing = { path = "../substrate/primitives/core/hashing" } -sp-core = { path = "../substrate/primitives/core" } -sp-panic-handler = { path = "../substrate/primitives/panic-handler" } -sp-database = { path = "../substrate/primitives/database" } -sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } -sp-version = { path = "../substrate/primitives/version" } -extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } -mangata-types = { path = "../substrate/primitives/mangata-types" } -sp-rpc = { path = "../substrate/primitives/rpc" } -sp-ver = { path = "../substrate/primitives/ver" } -sp-blockchain = { path = "../substrate/primitives/blockchain" } -sp-application-crypto = { path = "../substrate/primitives/application-crypto" } -sp-runtime = { path = "../substrate/primitives/runtime" } -sp-debug-derive = { path = "../substrate/primitives/debug-derive" } -sp-staking = { path = "../substrate/primitives/staking" } -sp-weights = { path = "../substrate/primitives/weights" } -sp-arithmetic = { path = "../substrate/primitives/arithmetic" } -sp-npos-elections = { path = "../substrate/primitives/npos-elections" } -sp-authorship = { path = "../substrate/primitives/authorship" } -sp-storage = { path = "../substrate/primitives/storage" } -sp-inherents = { path = "../substrate/primitives/inherents" } -frame-system-benchmarking = { path = "../substrate/frame/system/benchmarking" } -sp-consensus-beefy = { path = "../substrate/primitives/consensus/beefy" } -sc-consensus-beefy = { path = "../substrate/client/consensus/beefy" } -sp-consensus-grandpa = { path = "../substrate/primitives/consensus/grandpa" } -sc-consensus-grandpa = { path = "../substrate/client/consensus/grandpa" } -pallet-root-testing = { path = "../substrate/frame/root-testing" } +sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } -# patch generated by ./scripts/dev_manifest.sh +# patch generated by ./scripts/dev-0.9.29_manifest.sh [patch."https://github.com/paritytech/substrate"] -sc-offchain = { path = "../substrate/client/offchain" } -sc-keystore = { path = "../substrate/client/keystore" } -mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } -mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } -sc-informant = { path = "../substrate/client/informant" } -sc-client-db = { path = "../substrate/client/db" } -sc-rpc-api = { path = "../substrate/client/rpc-api" } -sc-client-api = { path = "../substrate/client/api" } -sc-block-builder = { path = "../substrate/client/block-builder" } -sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } -sc-transaction-pool = { path = "../substrate/client/transaction-pool" } -sc-utils = { path = "../substrate/client/utils" } -sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } -sc-tracing = { path = "../substrate/client/tracing" } -sc-state-db = { path = "../substrate/client/state-db" } -sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } -sc-authority-discovery = { path = "../substrate/client/authority-discovery" } -sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } -sc-consensus-babe = { path = "../substrate/client/consensus/babe" } -sc-consensus-slots = { path = "../substrate/client/consensus/slots" } -sc-consensus = { path = "../substrate/client/consensus/common" } -sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } -sc-consensus-aura = { path = "../substrate/client/consensus/aura" } -sc-basic-authorship = { path = "../substrate/client/basic-authorship" } -sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } -sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } -sc-executor = { path = "../substrate/client/executor" } -sc-executor-common = { path = "../substrate/client/executor/common" } -sc-cli = { path = "../substrate/client/cli" } -sc-peerset = { path = "../substrate/client/peerset" } -sc-telemetry = { path = "../substrate/client/telemetry" } -sc-allocator = { path = "../substrate/client/allocator" } -sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } -sc-network-gossip = { path = "../substrate/client/network-gossip" } -sc-sysinfo = { path = "../substrate/client/sysinfo" } -sc-rpc-server = { path = "../substrate/client/rpc-servers" } -sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } -sc-rpc = { path = "../substrate/client/rpc" } -sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } -sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } -sc-chain-spec = { path = "../substrate/client/chain-spec" } -sc-network-sync = { path = "../substrate/client/network/sync" } -sc-network-bitswap = { path = "../substrate/client/network/bitswap" } -sc-network-light = { path = "../substrate/client/network/light" } -sc-network-transactions = { path = "../substrate/client/network/transactions" } -sc-network = { path = "../substrate/client/network" } -sc-network-common = { path = "../substrate/client/network/common" } -sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } -sc-service = { path = "../substrate/client/service" } -substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } -fork-tree = { path = "../substrate/utils/fork-tree" } -frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } -try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } -frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } -substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } -substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } -substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } -substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } -substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } -pallet-referenda = { path = "../substrate/frame/referenda" } -pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } -pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } -pallet-utility = { path = "../substrate/frame/utility" } -pallet-session = { path = "../substrate/frame/session" } -pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } -pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } -pallet-treasury = { path = "../substrate/frame/treasury" } -pallet-sudo = { path = "../substrate/frame/sudo" } -pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } -pallet-membership = { path = "../substrate/frame/membership" } -pallet-recovery = { path = "../substrate/frame/recovery" } -pallet-tips = { path = "../substrate/frame/tips" } -pallet-balances = { path = "../substrate/frame/balances" } -pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } -frame-executive = { path = "../substrate/frame/executive" } -pallet-timestamp = { path = "../substrate/frame/timestamp" } -pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } -pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } -pallet-preimage = { path = "../substrate/frame/preimage" } -frame-try-runtime = { path = "../substrate/frame/try-runtime" } -pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } -pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } -pallet-society = { path = "../substrate/frame/society" } -pallet-identity = { path = "../substrate/frame/identity" } -pallet-babe = { path = "../substrate/frame/babe" } -pallet-child-bounties = { path = "../substrate/frame/child-bounties" } -pallet-vesting = { path = "../substrate/frame/vesting" } -pallet-bounties = { path = "../substrate/frame/bounties" } -frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } -frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } -pallet-indices = { path = "../substrate/frame/indices" } -pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } -pallet-collective = { path = "../substrate/frame/collective" } -pallet-multisig = { path = "../substrate/frame/multisig" } -pallet-offences = { path = "../substrate/frame/offences" } -pallet-scheduler = { path = "../substrate/frame/scheduler" } -pallet-nis = { path = "../substrate/frame/nis" } -frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } -frame-system = { path = "../substrate/frame/system" } -frame-benchmarking = { path = "../substrate/frame/benchmarking" } -pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } -pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } -pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } -pallet-proxy = { path = "../substrate/frame/proxy" } -pallet-whitelist = { path = "../substrate/frame/whitelist" } -pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } -pallet-bags-list = { path = "../substrate/frame/bags-list" } -pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } -pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } -pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } -pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } -frame-support = { path = "../substrate/frame/support" } -frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } -frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } -frame-support-procedural = { path = "../substrate/frame/support/procedural" } -pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } -pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } -pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } -pallet-staking = { path = "../substrate/frame/staking" } -pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } -pallet-grandpa = { path = "../substrate/frame/grandpa" } -pallet-democracy = { path = "../substrate/frame/democracy" } -pallet-beefy = { path = "../substrate/frame/beefy" } -pallet-aura = { path = "../substrate/frame/aura" } -pallet-authorship = { path = "../substrate/frame/authorship" } -pallet-im-online = { path = "../substrate/frame/im-online" } -mangata-support = { path = "../substrate/frame/mangata-support" } -substrate-test-client = { path = "../substrate/test-utils/client" } -sp-offchain = { path = "../substrate/primitives/offchain" } -sp-keystore = { path = "../substrate/primitives/keystore" } -sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } -sp-keyring = { path = "../substrate/primitives/keyring" } -sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } -sp-state-machine = { path = "../substrate/primitives/state-machine" } -sp-session = { path = "../substrate/primitives/session" } -sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } -ver-api = { path = "../substrate/primitives/ver-api" } -sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } -sp-api = { path = "../substrate/primitives/api" } -sp-externalities = { path = "../substrate/primitives/externalities" } -sp-std = { path = "../substrate/primitives/std" } -sp-trie = { path = "../substrate/primitives/trie" } -sp-block-builder = { path = "../substrate/primitives/block-builder" } -sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } -sp-tracing = { path = "../substrate/primitives/tracing" } -sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } -sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } -sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } -sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } -sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } -sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } -sp-consensus = { path = "../substrate/primitives/consensus/common" } -sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } -sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } -sp-io = { path = "../substrate/primitives/io" } -sp-timestamp = { path = "../substrate/primitives/timestamp" } -sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } -sp-core-hashing = { path = "../substrate/primitives/core/hashing" } -sp-core = { path = "../substrate/primitives/core" } -sp-panic-handler = { path = "../substrate/primitives/panic-handler" } -sp-database = { path = "../substrate/primitives/database" } -sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } -sp-version = { path = "../substrate/primitives/version" } -extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } -mangata-types = { path = "../substrate/primitives/mangata-types" } -sp-rpc = { path = "../substrate/primitives/rpc" } -sp-ver = { path = "../substrate/primitives/ver" } -sp-blockchain = { path = "../substrate/primitives/blockchain" } -sp-application-crypto = { path = "../substrate/primitives/application-crypto" } -sp-runtime = { path = "../substrate/primitives/runtime" } -sp-debug-derive = { path = "../substrate/primitives/debug-derive" } -sp-staking = { path = "../substrate/primitives/staking" } -sp-weights = { path = "../substrate/primitives/weights" } -sp-arithmetic = { path = "../substrate/primitives/arithmetic" } -sp-npos-elections = { path = "../substrate/primitives/npos-elections" } -sp-authorship = { path = "../substrate/primitives/authorship" } -sp-storage = { path = "../substrate/primitives/storage" } -sp-inherents = { path = "../substrate/primitives/inherents" } -frame-system-benchmarking = { path = "../substrate/frame/system/benchmarking" } -sp-consensus-beefy = { path = "../substrate/primitives/consensus/beefy" } -sc-consensus-beefy = { path = "../substrate/client/consensus/beefy" } -sp-consensus-grandpa = { path = "../substrate/primitives/consensus/grandpa" } -sc-consensus-grandpa = { path = "../substrate/client/consensus/grandpa" } -pallet-root-testing = { path = "../substrate/frame/root-testing" } +sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } + sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } -# patch generated by ./scripts/dev_manifest.sh +# patch generated by ./scripts/dev-0.9.29_manifest.sh [patch."https://github.com/PureStake/substrate"] -sc-offchain = { path = "../substrate/client/offchain" } -sc-keystore = { path = "../substrate/client/keystore" } -mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } -mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } -sc-informant = { path = "../substrate/client/informant" } -sc-client-db = { path = "../substrate/client/db" } -sc-rpc-api = { path = "../substrate/client/rpc-api" } -sc-client-api = { path = "../substrate/client/api" } -sc-block-builder = { path = "../substrate/client/block-builder" } -sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } -sc-transaction-pool = { path = "../substrate/client/transaction-pool" } -sc-utils = { path = "../substrate/client/utils" } -sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } -sc-tracing = { path = "../substrate/client/tracing" } -sc-state-db = { path = "../substrate/client/state-db" } -sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } -sc-authority-discovery = { path = "../substrate/client/authority-discovery" } -sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } -sc-consensus-babe = { path = "../substrate/client/consensus/babe" } -sc-consensus-slots = { path = "../substrate/client/consensus/slots" } -sc-consensus = { path = "../substrate/client/consensus/common" } -sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } -sc-consensus-aura = { path = "../substrate/client/consensus/aura" } -sc-basic-authorship = { path = "../substrate/client/basic-authorship" } -sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } -sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } -sc-executor = { path = "../substrate/client/executor" } -sc-executor-common = { path = "../substrate/client/executor/common" } -sc-cli = { path = "../substrate/client/cli" } -sc-peerset = { path = "../substrate/client/peerset" } -sc-telemetry = { path = "../substrate/client/telemetry" } -sc-allocator = { path = "../substrate/client/allocator" } -sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } -sc-network-gossip = { path = "../substrate/client/network-gossip" } -sc-sysinfo = { path = "../substrate/client/sysinfo" } -sc-rpc-server = { path = "../substrate/client/rpc-servers" } -sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } -sc-rpc = { path = "../substrate/client/rpc" } -sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } -sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } -sc-chain-spec = { path = "../substrate/client/chain-spec" } -sc-network-sync = { path = "../substrate/client/network/sync" } -sc-network-bitswap = { path = "../substrate/client/network/bitswap" } -sc-network-light = { path = "../substrate/client/network/light" } -sc-network-transactions = { path = "../substrate/client/network/transactions" } -sc-network = { path = "../substrate/client/network" } -sc-network-common = { path = "../substrate/client/network/common" } -sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } -sc-service = { path = "../substrate/client/service" } -substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } -fork-tree = { path = "../substrate/utils/fork-tree" } -frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } -try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } -frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } -substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } -substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } -substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } -substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } -substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } -pallet-referenda = { path = "../substrate/frame/referenda" } -pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } -pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } -pallet-utility = { path = "../substrate/frame/utility" } -pallet-session = { path = "../substrate/frame/session" } -pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } -pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } -pallet-treasury = { path = "../substrate/frame/treasury" } -pallet-sudo = { path = "../substrate/frame/sudo" } -pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } -pallet-membership = { path = "../substrate/frame/membership" } -pallet-recovery = { path = "../substrate/frame/recovery" } -pallet-tips = { path = "../substrate/frame/tips" } -pallet-balances = { path = "../substrate/frame/balances" } -pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } -frame-executive = { path = "../substrate/frame/executive" } -pallet-timestamp = { path = "../substrate/frame/timestamp" } -pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } -pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } -pallet-preimage = { path = "../substrate/frame/preimage" } -frame-try-runtime = { path = "../substrate/frame/try-runtime" } -pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } -pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } -pallet-society = { path = "../substrate/frame/society" } -pallet-identity = { path = "../substrate/frame/identity" } -pallet-babe = { path = "../substrate/frame/babe" } -pallet-child-bounties = { path = "../substrate/frame/child-bounties" } -pallet-vesting = { path = "../substrate/frame/vesting" } -pallet-bounties = { path = "../substrate/frame/bounties" } -frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } -frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } -pallet-indices = { path = "../substrate/frame/indices" } -pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } -pallet-collective = { path = "../substrate/frame/collective" } -pallet-multisig = { path = "../substrate/frame/multisig" } -pallet-offences = { path = "../substrate/frame/offences" } -pallet-scheduler = { path = "../substrate/frame/scheduler" } -pallet-nis = { path = "../substrate/frame/nis" } -frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } -frame-system = { path = "../substrate/frame/system" } -frame-benchmarking = { path = "../substrate/frame/benchmarking" } -pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } -pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } -pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } -pallet-proxy = { path = "../substrate/frame/proxy" } -pallet-whitelist = { path = "../substrate/frame/whitelist" } -pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } -pallet-bags-list = { path = "../substrate/frame/bags-list" } -pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } -pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } -pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } -pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } -frame-support = { path = "../substrate/frame/support" } -frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } -frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } -frame-support-procedural = { path = "../substrate/frame/support/procedural" } -pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } -pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } -pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } -pallet-staking = { path = "../substrate/frame/staking" } -pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } -pallet-grandpa = { path = "../substrate/frame/grandpa" } -pallet-democracy = { path = "../substrate/frame/democracy" } -pallet-beefy = { path = "../substrate/frame/beefy" } -pallet-aura = { path = "../substrate/frame/aura" } -pallet-authorship = { path = "../substrate/frame/authorship" } -pallet-im-online = { path = "../substrate/frame/im-online" } -mangata-support = { path = "../substrate/frame/mangata-support" } -substrate-test-client = { path = "../substrate/test-utils/client" } -sp-offchain = { path = "../substrate/primitives/offchain" } -sp-keystore = { path = "../substrate/primitives/keystore" } -sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } -sp-keyring = { path = "../substrate/primitives/keyring" } -sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } -sp-state-machine = { path = "../substrate/primitives/state-machine" } -sp-session = { path = "../substrate/primitives/session" } -sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } -ver-api = { path = "../substrate/primitives/ver-api" } -sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } -sp-api = { path = "../substrate/primitives/api" } -sp-externalities = { path = "../substrate/primitives/externalities" } -sp-std = { path = "../substrate/primitives/std" } -sp-trie = { path = "../substrate/primitives/trie" } -sp-block-builder = { path = "../substrate/primitives/block-builder" } -sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } -sp-tracing = { path = "../substrate/primitives/tracing" } -sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } -sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } -sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } -sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } -sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } -sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } -sp-consensus = { path = "../substrate/primitives/consensus/common" } -sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } -sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } -sp-io = { path = "../substrate/primitives/io" } -sp-timestamp = { path = "../substrate/primitives/timestamp" } -sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } -sp-core-hashing = { path = "../substrate/primitives/core/hashing" } -sp-core = { path = "../substrate/primitives/core" } -sp-panic-handler = { path = "../substrate/primitives/panic-handler" } -sp-database = { path = "../substrate/primitives/database" } -sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } -sp-version = { path = "../substrate/primitives/version" } -extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } -mangata-types = { path = "../substrate/primitives/mangata-types" } -sp-rpc = { path = "../substrate/primitives/rpc" } -sp-ver = { path = "../substrate/primitives/ver" } -sp-blockchain = { path = "../substrate/primitives/blockchain" } -sp-application-crypto = { path = "../substrate/primitives/application-crypto" } -sp-runtime = { path = "../substrate/primitives/runtime" } -sp-debug-derive = { path = "../substrate/primitives/debug-derive" } -sp-staking = { path = "../substrate/primitives/staking" } -sp-weights = { path = "../substrate/primitives/weights" } -sp-arithmetic = { path = "../substrate/primitives/arithmetic" } -sp-npos-elections = { path = "../substrate/primitives/npos-elections" } -sp-authorship = { path = "../substrate/primitives/authorship" } -sp-storage = { path = "../substrate/primitives/storage" } -sp-inherents = { path = "../substrate/primitives/inherents" } -frame-system-benchmarking = { path = "../substrate/frame/system/benchmarking" } -sc-consensus-beefy = { path = "../substrate/client/consensus/beefy" } -sp-consensus-beefy = { path = "../substrate/primitives/consensus/beefy" } -sp-consensus-grandpa = { path = "../substrate/primitives/consensus/grandpa" } -sc-consensus-grandpa = { path = "../substrate/client/consensus/grandpa" } -pallet-root-testing = { path = "../substrate/frame/root-testing" } +sc-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mmr-gadget = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-informant = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-client-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-state-db = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-epochs = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-basic-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmi = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-wasmtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-executor-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-peerset = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-telemetry = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-allocator = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-proposer-metrics = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-gossip = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sysinfo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-server = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-block-builder-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-chain-spec = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-sync = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-bitswap = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-light = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-transactions = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-network-common = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-sync-state-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-service = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-wasm-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +fork-tree = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-remote-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +try-runtime-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking-cli = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-rpc-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-build-script-utils = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-referenda = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-fast-unstake = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-ranked-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-treasury = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-membership = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-recovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-tips = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-balances = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-executive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-elections-phragmen = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy-mmr = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-preimage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-try-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-society = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-identity = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-child-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bounties = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-election-provider-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-indices = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-sudo-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-collective = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-multisig = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-offences = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-scheduler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-nis = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-system = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-benchmarking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-proxy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-whitelist = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-state-trie-migration = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-bags-list = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-utility-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +frame-support-procedural = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-vesting-mangata = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-curve = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-conviction-voting = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-democracy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +pallet-im-online = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-support = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +substrate-test-client = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-offchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keystore = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-keyring = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-mmr-primitives = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-state-machine = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-session = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +ver-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-api = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-externalities = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-std = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-trie = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-block-builder = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-transaction-pool = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-tracing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-wasm-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-authority-discovery = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime-interface = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-babe = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-slots = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-vrf = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-aura = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-beefy = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-io = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-timestamp = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core-hashing = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-core = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-panic-handler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-database = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version-proc-macro = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-version = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +extrinsic-shuffler = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +mangata-types = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-rpc = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-ver = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-blockchain = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-application-crypto = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-runtime = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-debug-derive = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } + + +# # patch generated by ./scripts/dev_manifest.sh +# [patch."https://github.com/mangata-finance/substrate"] +# sc-offchain = { path = "../substrate/client/offchain" } +# sc-keystore = { path = "../substrate/client/keystore" } +# mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } +# mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } +# sc-informant = { path = "../substrate/client/informant" } +# sc-client-db = { path = "../substrate/client/db" } +# sc-rpc-api = { path = "../substrate/client/rpc-api" } +# sc-client-api = { path = "../substrate/client/api" } +# sc-block-builder = { path = "../substrate/client/block-builder" } +# sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } +# sc-transaction-pool = { path = "../substrate/client/transaction-pool" } +# sc-utils = { path = "../substrate/client/utils" } +# sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } +# sc-tracing = { path = "../substrate/client/tracing" } +# sc-state-db = { path = "../substrate/client/state-db" } +# sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } +# sc-authority-discovery = { path = "../substrate/client/authority-discovery" } +# sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } +# sc-consensus-babe = { path = "../substrate/client/consensus/babe" } +# sc-consensus-slots = { path = "../substrate/client/consensus/slots" } +# sc-consensus = { path = "../substrate/client/consensus/common" } +# sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } +# sc-consensus-aura = { path = "../substrate/client/consensus/aura" } +# sc-basic-authorship = { path = "../substrate/client/basic-authorship" } +# sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } +# sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } +# sc-executor = { path = "../substrate/client/executor" } +# sc-executor-common = { path = "../substrate/client/executor/common" } +# sc-cli = { path = "../substrate/client/cli" } +# sc-peerset = { path = "../substrate/client/peerset" } +# sc-telemetry = { path = "../substrate/client/telemetry" } +# sc-allocator = { path = "../substrate/client/allocator" } +# sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } +# sc-network-gossip = { path = "../substrate/client/network-gossip" } +# sc-sysinfo = { path = "../substrate/client/sysinfo" } +# sc-rpc-server = { path = "../substrate/client/rpc-servers" } +# sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } +# sc-rpc = { path = "../substrate/client/rpc" } +# sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } +# sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } +# sc-chain-spec = { path = "../substrate/client/chain-spec" } +# sc-network-sync = { path = "../substrate/client/network/sync" } +# sc-network-bitswap = { path = "../substrate/client/network/bitswap" } +# sc-network-light = { path = "../substrate/client/network/light" } +# sc-network-transactions = { path = "../substrate/client/network/transactions" } +# sc-network = { path = "../substrate/client/network" } +# sc-network-common = { path = "../substrate/client/network/common" } +# sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } +# sc-service = { path = "../substrate/client/service" } +# substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } +# fork-tree = { path = "../substrate/utils/fork-tree" } +# frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } +# try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } +# frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } +# substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } +# substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } +# substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } +# substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } +# substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } +# pallet-referenda = { path = "../substrate/frame/referenda" } +# pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } +# pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } +# pallet-utility = { path = "../substrate/frame/utility" } +# pallet-session = { path = "../substrate/frame/session" } +# pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } +# pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } +# pallet-treasury = { path = "../substrate/frame/treasury" } +# pallet-sudo = { path = "../substrate/frame/sudo" } +# pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } +# pallet-membership = { path = "../substrate/frame/membership" } +# pallet-recovery = { path = "../substrate/frame/recovery" } +# pallet-tips = { path = "../substrate/frame/tips" } +# pallet-balances = { path = "../substrate/frame/balances" } +# pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } +# frame-executive = { path = "../substrate/frame/executive" } +# pallet-timestamp = { path = "../substrate/frame/timestamp" } +# pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } +# pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } +# pallet-preimage = { path = "../substrate/frame/preimage" } +# frame-try-runtime = { path = "../substrate/frame/try-runtime" } +# pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } +# pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } +# pallet-society = { path = "../substrate/frame/society" } +# pallet-identity = { path = "../substrate/frame/identity" } +# pallet-babe = { path = "../substrate/frame/babe" } +# pallet-child-bounties = { path = "../substrate/frame/child-bounties" } +# pallet-vesting = { path = "../substrate/frame/vesting" } +# pallet-bounties = { path = "../substrate/frame/bounties" } +# frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } +# frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } +# pallet-indices = { path = "../substrate/frame/indices" } +# pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } +# pallet-collective = { path = "../substrate/frame/collective" } +# pallet-multisig = { path = "../substrate/frame/multisig" } +# pallet-offences = { path = "../substrate/frame/offences" } +# pallet-scheduler = { path = "../substrate/frame/scheduler" } +# pallet-nis = { path = "../substrate/frame/nis" } +# frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } +# frame-system = { path = "../substrate/frame/system" } +# frame-benchmarking = { path = "../substrate/frame/benchmarking" } +# pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } +# pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } +# pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } +# pallet-proxy = { path = "../substrate/frame/proxy" } +# pallet-whitelist = { path = "../substrate/frame/whitelist" } +# pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } +# pallet-bags-list = { path = "../substrate/frame/bags-list" } +# pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } +# pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } +# pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } +# pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } +# frame-support = { path = "../substrate/frame/support" } +# frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } +# frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } +# frame-support-procedural = { path = "../substrate/frame/support/procedural" } +# pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } +# pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } +# pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } +# pallet-staking = { path = "../substrate/frame/staking" } +# pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } +# pallet-grandpa = { path = "../substrate/frame/grandpa" } +# pallet-democracy = { path = "../substrate/frame/democracy" } +# pallet-beefy = { path = "../substrate/frame/beefy" } +# pallet-aura = { path = "../substrate/frame/aura" } +# pallet-authorship = { path = "../substrate/frame/authorship" } +# pallet-im-online = { path = "../substrate/frame/im-online" } +# mangata-support = { path = "../substrate/frame/mangata-support" } +# substrate-test-client = { path = "../substrate/test-utils/client" } +# sp-offchain = { path = "../substrate/primitives/offchain" } +# sp-keystore = { path = "../substrate/primitives/keystore" } +# sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } +# sp-keyring = { path = "../substrate/primitives/keyring" } +# sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } +# sp-state-machine = { path = "../substrate/primitives/state-machine" } +# sp-session = { path = "../substrate/primitives/session" } +# sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } +# ver-api = { path = "../substrate/primitives/ver-api" } +# sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } +# sp-api = { path = "../substrate/primitives/api" } +# sp-externalities = { path = "../substrate/primitives/externalities" } +# sp-std = { path = "../substrate/primitives/std" } +# sp-trie = { path = "../substrate/primitives/trie" } +# sp-block-builder = { path = "../substrate/primitives/block-builder" } +# sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } +# sp-tracing = { path = "../substrate/primitives/tracing" } +# sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } +# sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } +# sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } +# sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } +# sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } +# sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } +# sp-consensus = { path = "../substrate/primitives/consensus/common" } +# sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } +# sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } +# sp-io = { path = "../substrate/primitives/io" } +# sp-timestamp = { path = "../substrate/primitives/timestamp" } +# sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } +# sp-core-hashing = { path = "../substrate/primitives/core/hashing" } +# sp-core = { path = "../substrate/primitives/core" } +# sp-panic-handler = { path = "../substrate/primitives/panic-handler" } +# sp-database = { path = "../substrate/primitives/database" } +# sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } +# sp-version = { path = "../substrate/primitives/version" } +# extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } +# mangata-types = { path = "../substrate/primitives/mangata-types" } +# sp-rpc = { path = "../substrate/primitives/rpc" } +# sp-ver = { path = "../substrate/primitives/ver" } +# sp-blockchain = { path = "../substrate/primitives/blockchain" } +# sp-application-crypto = { path = "../substrate/primitives/application-crypto" } +# sp-runtime = { path = "../substrate/primitives/runtime" } +# sp-debug-derive = { path = "../substrate/primitives/debug-derive" } +# sp-staking = { path = "../substrate/primitives/staking" } +# sp-weights = { path = "../substrate/primitives/weights" } +# sp-arithmetic = { path = "../substrate/primitives/arithmetic" } +# sp-npos-elections = { path = "../substrate/primitives/npos-elections" } +# sp-authorship = { path = "../substrate/primitives/authorship" } +# sp-storage = { path = "../substrate/primitives/storage" } +# sp-inherents = { path = "../substrate/primitives/inherents" } + +# # # patch generated by ./scripts/dev_manifest.sh +# # [patch."https://github.com/paritytech/substrate"] +# sc-offchain = { path = "../substrate/client/offchain" } +# sc-keystore = { path = "../substrate/client/keystore" } +# mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } +# mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } +# sc-informant = { path = "../substrate/client/informant" } +# sc-client-db = { path = "../substrate/client/db" } +# sc-rpc-api = { path = "../substrate/client/rpc-api" } +# sc-client-api = { path = "../substrate/client/api" } +# sc-block-builder = { path = "../substrate/client/block-builder" } +# sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } +# sc-transaction-pool = { path = "../substrate/client/transaction-pool" } +# sc-utils = { path = "../substrate/client/utils" } +# sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } +# sc-tracing = { path = "../substrate/client/tracing" } +# sc-state-db = { path = "../substrate/client/state-db" } +# sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } +# sc-authority-discovery = { path = "../substrate/client/authority-discovery" } +# sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } +# sc-consensus-babe = { path = "../substrate/client/consensus/babe" } +# sc-consensus-slots = { path = "../substrate/client/consensus/slots" } +# sc-consensus = { path = "../substrate/client/consensus/common" } +# sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } +# sc-consensus-aura = { path = "../substrate/client/consensus/aura" } +# sc-basic-authorship = { path = "../substrate/client/basic-authorship" } +# sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } +# sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } +# sc-executor = { path = "../substrate/client/executor" } +# sc-executor-common = { path = "../substrate/client/executor/common" } +# sc-cli = { path = "../substrate/client/cli" } +# sc-peerset = { path = "../substrate/client/peerset" } +# sc-telemetry = { path = "../substrate/client/telemetry" } +# sc-allocator = { path = "../substrate/client/allocator" } +# sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } +# sc-network-gossip = { path = "../substrate/client/network-gossip" } +# sc-sysinfo = { path = "../substrate/client/sysinfo" } +# sc-rpc-server = { path = "../substrate/client/rpc-servers" } +# sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } +# sc-rpc = { path = "../substrate/client/rpc" } +# sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } +# sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } +# sc-chain-spec = { path = "../substrate/client/chain-spec" } +# sc-network-sync = { path = "../substrate/client/network/sync" } +# sc-network-bitswap = { path = "../substrate/client/network/bitswap" } +# sc-network-light = { path = "../substrate/client/network/light" } +# sc-network-transactions = { path = "../substrate/client/network/transactions" } +# sc-network = { path = "../substrate/client/network" } +# sc-network-common = { path = "../substrate/client/network/common" } +# sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } +# sc-service = { path = "../substrate/client/service" } +# substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } +# fork-tree = { path = "../substrate/utils/fork-tree" } +# frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } +# try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } +# frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } +# substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } +# substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } +# substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } +# substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } +# substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } +# pallet-referenda = { path = "../substrate/frame/referenda" } +# pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } +# pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } +# pallet-utility = { path = "../substrate/frame/utility" } +# pallet-session = { path = "../substrate/frame/session" } +# pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } +# pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } +# pallet-treasury = { path = "../substrate/frame/treasury" } +# pallet-sudo = { path = "../substrate/frame/sudo" } +# pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } +# pallet-membership = { path = "../substrate/frame/membership" } +# pallet-recovery = { path = "../substrate/frame/recovery" } +# pallet-tips = { path = "../substrate/frame/tips" } +# pallet-balances = { path = "../substrate/frame/balances" } +# pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } +# frame-executive = { path = "../substrate/frame/executive" } +# pallet-timestamp = { path = "../substrate/frame/timestamp" } +# pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } +# pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } +# pallet-preimage = { path = "../substrate/frame/preimage" } +# frame-try-runtime = { path = "../substrate/frame/try-runtime" } +# pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } +# pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } +# pallet-society = { path = "../substrate/frame/society" } +# pallet-identity = { path = "../substrate/frame/identity" } +# pallet-babe = { path = "../substrate/frame/babe" } +# pallet-child-bounties = { path = "../substrate/frame/child-bounties" } +# pallet-vesting = { path = "../substrate/frame/vesting" } +# pallet-bounties = { path = "../substrate/frame/bounties" } +# frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } +# frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } +# pallet-indices = { path = "../substrate/frame/indices" } +# pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } +# pallet-collective = { path = "../substrate/frame/collective" } +# pallet-multisig = { path = "../substrate/frame/multisig" } +# pallet-offences = { path = "../substrate/frame/offences" } +# pallet-scheduler = { path = "../substrate/frame/scheduler" } +# pallet-nis = { path = "../substrate/frame/nis" } +# frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } +# frame-system = { path = "../substrate/frame/system" } +# frame-benchmarking = { path = "../substrate/frame/benchmarking" } +# pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } +# pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } +# pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } +# pallet-proxy = { path = "../substrate/frame/proxy" } +# pallet-whitelist = { path = "../substrate/frame/whitelist" } +# pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } +# pallet-bags-list = { path = "../substrate/frame/bags-list" } +# pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } +# pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } +# pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } +# pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } +# frame-support = { path = "../substrate/frame/support" } +# frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } +# frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } +# frame-support-procedural = { path = "../substrate/frame/support/procedural" } +# pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } +# pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } +# pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } +# pallet-staking = { path = "../substrate/frame/staking" } +# pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } +# pallet-grandpa = { path = "../substrate/frame/grandpa" } +# pallet-democracy = { path = "../substrate/frame/democracy" } +# pallet-beefy = { path = "../substrate/frame/beefy" } +# pallet-aura = { path = "../substrate/frame/aura" } +# pallet-authorship = { path = "../substrate/frame/authorship" } +# pallet-im-online = { path = "../substrate/frame/im-online" } +# mangata-support = { path = "../substrate/frame/mangata-support" } +# substrate-test-client = { path = "../substrate/test-utils/client" } +# sp-offchain = { path = "../substrate/primitives/offchain" } +# sp-keystore = { path = "../substrate/primitives/keystore" } +# sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } +# sp-keyring = { path = "../substrate/primitives/keyring" } +# sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } +# sp-state-machine = { path = "../substrate/primitives/state-machine" } +# sp-session = { path = "../substrate/primitives/session" } +# sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } +# ver-api = { path = "../substrate/primitives/ver-api" } +# sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } +# sp-api = { path = "../substrate/primitives/api" } +# sp-externalities = { path = "../substrate/primitives/externalities" } +# sp-std = { path = "../substrate/primitives/std" } +# sp-trie = { path = "../substrate/primitives/trie" } +# sp-block-builder = { path = "../substrate/primitives/block-builder" } +# sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } +# sp-tracing = { path = "../substrate/primitives/tracing" } +# sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } +# sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } +# sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } +# sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } +# sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } +# sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } +# sp-consensus = { path = "../substrate/primitives/consensus/common" } +# sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } +# sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } +# sp-io = { path = "../substrate/primitives/io" } +# sp-timestamp = { path = "../substrate/primitives/timestamp" } +# sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } +# sp-core-hashing = { path = "../substrate/primitives/core/hashing" } +# sp-core = { path = "../substrate/primitives/core" } +# sp-panic-handler = { path = "../substrate/primitives/panic-handler" } +# sp-database = { path = "../substrate/primitives/database" } +# sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } +# sp-version = { path = "../substrate/primitives/version" } +# extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } +# mangata-types = { path = "../substrate/primitives/mangata-types" } +# sp-rpc = { path = "../substrate/primitives/rpc" } +# sp-ver = { path = "../substrate/primitives/ver" } +# sp-blockchain = { path = "../substrate/primitives/blockchain" } +# sp-application-crypto = { path = "../substrate/primitives/application-crypto" } +# sp-runtime = { path = "../substrate/primitives/runtime" } +# sp-debug-derive = { path = "../substrate/primitives/debug-derive" } +# sp-staking = { path = "../substrate/primitives/staking" } +# sp-weights = { path = "../substrate/primitives/weights" } +# sp-arithmetic = { path = "../substrate/primitives/arithmetic" } +# sp-npos-elections = { path = "../substrate/primitives/npos-elections" } +# sp-authorship = { path = "../substrate/primitives/authorship" } +# sp-storage = { path = "../substrate/primitives/storage" } +# sp-inherents = { path = "../substrate/primitives/inherents" } + +# # patch generated by ./scripts/dev_manifest.sh +# [patch."https://github.com/PureStake/substrate"] +# sc-offchain = { path = "../substrate/client/offchain" } +# sc-keystore = { path = "../substrate/client/keystore" } +# mmr-rpc = { path = "../substrate/client/merkle-mountain-range/rpc" } +# mmr-gadget = { path = "../substrate/client/merkle-mountain-range" } +# sc-informant = { path = "../substrate/client/informant" } +# sc-client-db = { path = "../substrate/client/db" } +# sc-rpc-api = { path = "../substrate/client/rpc-api" } +# sc-client-api = { path = "../substrate/client/api" } +# sc-block-builder = { path = "../substrate/client/block-builder" } +# sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } +# sc-transaction-pool = { path = "../substrate/client/transaction-pool" } +# sc-utils = { path = "../substrate/client/utils" } +# sc-tracing-proc-macro = { path = "../substrate/client/tracing/proc-macro" } +# sc-tracing = { path = "../substrate/client/tracing" } +# sc-state-db = { path = "../substrate/client/state-db" } +# sc-basic-authorship-ver = { path = "../substrate/client/basic-authorship-ver" } +# sc-authority-discovery = { path = "../substrate/client/authority-discovery" } +# sc-consensus-babe-rpc = { path = "../substrate/client/consensus/babe/rpc" } +# sc-consensus-babe = { path = "../substrate/client/consensus/babe" } +# sc-consensus-slots = { path = "../substrate/client/consensus/slots" } +# sc-consensus = { path = "../substrate/client/consensus/common" } +# sc-consensus-epochs = { path = "../substrate/client/consensus/epochs" } +# sc-consensus-aura = { path = "../substrate/client/consensus/aura" } +# sc-basic-authorship = { path = "../substrate/client/basic-authorship" } +# sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } +# sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } +# sc-executor = { path = "../substrate/client/executor" } +# sc-executor-common = { path = "../substrate/client/executor/common" } +# sc-cli = { path = "../substrate/client/cli" } +# sc-peerset = { path = "../substrate/client/peerset" } +# sc-telemetry = { path = "../substrate/client/telemetry" } +# sc-allocator = { path = "../substrate/client/allocator" } +# sc-proposer-metrics = { path = "../substrate/client/proposer-metrics" } +# sc-network-gossip = { path = "../substrate/client/network-gossip" } +# sc-sysinfo = { path = "../substrate/client/sysinfo" } +# sc-rpc-server = { path = "../substrate/client/rpc-servers" } +# sc-rpc-spec-v2 = { path = "../substrate/client/rpc-spec-v2" } +# sc-rpc = { path = "../substrate/client/rpc" } +# sc-block-builder-ver = { path = "../substrate/client/block-builder-ver" } +# sc-chain-spec-derive = { path = "../substrate/client/chain-spec/derive" } +# sc-chain-spec = { path = "../substrate/client/chain-spec" } +# sc-network-sync = { path = "../substrate/client/network/sync" } +# sc-network-bitswap = { path = "../substrate/client/network/bitswap" } +# sc-network-light = { path = "../substrate/client/network/light" } +# sc-network-transactions = { path = "../substrate/client/network/transactions" } +# sc-network = { path = "../substrate/client/network" } +# sc-network-common = { path = "../substrate/client/network/common" } +# sc-sync-state-rpc = { path = "../substrate/client/sync-state-rpc" } +# sc-service = { path = "../substrate/client/service" } +# substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } +# fork-tree = { path = "../substrate/utils/fork-tree" } +# frame-remote-externalities = { path = "../substrate/utils/frame/remote-externalities" } +# try-runtime-cli = { path = "../substrate/utils/frame/try-runtime/cli" } +# frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } +# substrate-state-trie-migration-rpc = { path = "../substrate/utils/frame/rpc/state-trie-migration-rpc" } +# substrate-rpc-client = { path = "../substrate/utils/frame/rpc/client" } +# substrate-frame-rpc-system = { path = "../substrate/utils/frame/rpc/system" } +# substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } +# substrate-build-script-utils = { path = "../substrate/utils/build-script-utils" } +# pallet-referenda = { path = "../substrate/frame/referenda" } +# pallet-fast-unstake = { path = "../substrate/frame/fast-unstake" } +# pallet-mmr = { path = "../substrate/frame/merkle-mountain-range" } +# pallet-utility = { path = "../substrate/frame/utility" } +# pallet-session = { path = "../substrate/frame/session" } +# pallet-ranked-collective = { path = "../substrate/frame/ranked-collective" } +# pallet-collective-mangata = { path = "../substrate/frame/collective-mangata" } +# pallet-treasury = { path = "../substrate/frame/treasury" } +# pallet-sudo = { path = "../substrate/frame/sudo" } +# pallet-election-provider-multi-phase = { path = "../substrate/frame/election-provider-multi-phase" } +# pallet-membership = { path = "../substrate/frame/membership" } +# pallet-recovery = { path = "../substrate/frame/recovery" } +# pallet-tips = { path = "../substrate/frame/tips" } +# pallet-balances = { path = "../substrate/frame/balances" } +# pallet-authority-discovery = { path = "../substrate/frame/authority-discovery" } +# frame-executive = { path = "../substrate/frame/executive" } +# pallet-timestamp = { path = "../substrate/frame/timestamp" } +# pallet-elections-phragmen = { path = "../substrate/frame/elections-phragmen" } +# pallet-beefy-mmr = { path = "../substrate/frame/beefy-mmr" } +# pallet-preimage = { path = "../substrate/frame/preimage" } +# frame-try-runtime = { path = "../substrate/frame/try-runtime" } +# pallet-nomination-pools-runtime-api = { path = "../substrate/frame/nomination-pools/runtime-api" } +# pallet-nomination-pools = { path = "../substrate/frame/nomination-pools" } +# pallet-society = { path = "../substrate/frame/society" } +# pallet-identity = { path = "../substrate/frame/identity" } +# pallet-babe = { path = "../substrate/frame/babe" } +# pallet-child-bounties = { path = "../substrate/frame/child-bounties" } +# pallet-vesting = { path = "../substrate/frame/vesting" } +# pallet-bounties = { path = "../substrate/frame/bounties" } +# frame-election-provider-solution-type = { path = "../substrate/frame/election-provider-support/solution-type" } +# frame-election-provider-support = { path = "../substrate/frame/election-provider-support" } +# pallet-indices = { path = "../substrate/frame/indices" } +# pallet-sudo-mangata = { path = "../substrate/frame/sudo-mangata" } +# pallet-collective = { path = "../substrate/frame/collective" } +# pallet-multisig = { path = "../substrate/frame/multisig" } +# pallet-offences = { path = "../substrate/frame/offences" } +# pallet-scheduler = { path = "../substrate/frame/scheduler" } +# pallet-nis = { path = "../substrate/frame/nis" } +# frame-system-rpc-runtime-api = { path = "../substrate/frame/system/rpc/runtime-api" } +# frame-system = { path = "../substrate/frame/system" } +# frame-benchmarking = { path = "../substrate/frame/benchmarking" } +# pallet-transaction-payment-rpc-runtime-api = { path = "../substrate/frame/transaction-payment/rpc/runtime-api" } +# pallet-transaction-payment-rpc = { path = "../substrate/frame/transaction-payment/rpc" } +# pallet-transaction-payment = { path = "../substrate/frame/transaction-payment" } +# pallet-proxy = { path = "../substrate/frame/proxy" } +# pallet-whitelist = { path = "../substrate/frame/whitelist" } +# pallet-state-trie-migration = { path = "../substrate/frame/state-trie-migration" } +# pallet-bags-list = { path = "../substrate/frame/bags-list" } +# pallet-transaction-payment-mangata-rpc-runtime-api = { path = "../substrate/frame/transaction-payment-mangata/rpc/runtime-api" } +# pallet-transaction-payment-mangata-rpc = { path = "../substrate/frame/transaction-payment-mangata/rpc" } +# pallet-transaction-payment-mangata = { path = "../substrate/frame/transaction-payment-mangata" } +# pallet-utility-mangata = { path = "../substrate/frame/utility-mangata" } +# frame-support = { path = "../substrate/frame/support" } +# frame-support-procedural-tools-derive = { path = "../substrate/frame/support/procedural/tools/derive" } +# frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } +# frame-support-procedural = { path = "../substrate/frame/support/procedural" } +# pallet-vesting-mangata = { path = "../substrate/frame/vesting-mangata" } +# pallet-staking-reward-curve = { path = "../substrate/frame/staking/reward-curve" } +# pallet-staking-reward-fn = { path = "../substrate/frame/staking/reward-fn" } +# pallet-staking = { path = "../substrate/frame/staking" } +# pallet-conviction-voting = { path = "../substrate/frame/conviction-voting" } +# pallet-grandpa = { path = "../substrate/frame/grandpa" } +# pallet-democracy = { path = "../substrate/frame/democracy" } +# pallet-beefy = { path = "../substrate/frame/beefy" } +# pallet-aura = { path = "../substrate/frame/aura" } +# pallet-authorship = { path = "../substrate/frame/authorship" } +# pallet-im-online = { path = "../substrate/frame/im-online" } +# mangata-support = { path = "../substrate/frame/mangata-support" } +# substrate-test-client = { path = "../substrate/test-utils/client" } +# sp-offchain = { path = "../substrate/primitives/offchain" } +# sp-keystore = { path = "../substrate/primitives/keystore" } +# sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } +# sp-keyring = { path = "../substrate/primitives/keyring" } +# sp-mmr-primitives = { path = "../substrate/primitives/merkle-mountain-range" } +# sp-state-machine = { path = "../substrate/primitives/state-machine" } +# sp-session = { path = "../substrate/primitives/session" } +# sp-transaction-storage-proof = { path = "../substrate/primitives/transaction-storage-proof" } +# ver-api = { path = "../substrate/primitives/ver-api" } +# sp-api-proc-macro = { path = "../substrate/primitives/api/proc-macro" } +# sp-api = { path = "../substrate/primitives/api" } +# sp-externalities = { path = "../substrate/primitives/externalities" } +# sp-std = { path = "../substrate/primitives/std" } +# sp-trie = { path = "../substrate/primitives/trie" } +# sp-block-builder = { path = "../substrate/primitives/block-builder" } +# sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } +# sp-tracing = { path = "../substrate/primitives/tracing" } +# sp-wasm-interface = { path = "../substrate/primitives/wasm-interface" } +# sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } +# sp-runtime-interface-proc-macro = { path = "../substrate/primitives/runtime-interface/proc-macro" } +# sp-runtime-interface = { path = "../substrate/primitives/runtime-interface" } +# sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } +# sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } +# sp-consensus = { path = "../substrate/primitives/consensus/common" } +# sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } +# sp-consensus-aura = { path = "../substrate/primitives/consensus/aura" } +# sp-io = { path = "../substrate/primitives/io" } +# sp-timestamp = { path = "../substrate/primitives/timestamp" } +# sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } +# sp-core-hashing = { path = "../substrate/primitives/core/hashing" } +# sp-core = { path = "../substrate/primitives/core" } +# sp-panic-handler = { path = "../substrate/primitives/panic-handler" } +# sp-database = { path = "../substrate/primitives/database" } +# sp-version-proc-macro = { path = "../substrate/primitives/version/proc-macro" } +# sp-version = { path = "../substrate/primitives/version" } +# extrinsic-shuffler = { path = "../substrate/primitives/shuffler" } +# mangata-types = { path = "../substrate/primitives/mangata-types" } +# sp-rpc = { path = "../substrate/primitives/rpc" } +# sp-ver = { path = "../substrate/primitives/ver" } +# sp-blockchain = { path = "../substrate/primitives/blockchain" } +# sp-application-crypto = { path = "../substrate/primitives/application-crypto" } +# sp-runtime = { path = "../substrate/primitives/runtime" } +# sp-debug-derive = { path = "../substrate/primitives/debug-derive" } +# sp-staking = { path = "../substrate/primitives/staking" } +# sp-weights = { path = "../substrate/primitives/weights" } +# sp-arithmetic = { path = "../substrate/primitives/arithmetic" } +# sp-npos-elections = { path = "../substrate/primitives/npos-elections" } +# sp-authorship = { path = "../substrate/primitives/authorship" } +# sp-storage = { path = "../substrate/primitives/storage" } +# sp-inherents = { path = "../substrate/primitives/inherents" } # # patch generated by ./scripts/dev_manifest.sh # [patch."https://github.com/mangata-finance/cumulus"] From a51e09a9beccaef1a5c52af5a1a2e85a5106a8d2 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 2 Nov 2023 12:57:56 +0100 Subject: [PATCH 079/125] compiles --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c7d642702b..c8cbae16cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15041,11 +15041,11 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" [[patch.unused]] -name = "sp-authorship" +name = "pallet-vesting-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" +source = "git+https://github.com/mangata-finance/substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" [[patch.unused]] -name = "pallet-vesting-mangata" +name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" From d0ff567b46a2be35ad06c6ff4c03dff93bdc8ec2 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 2 Nov 2023 20:43:51 +0100 Subject: [PATCH 080/125] fix manifest --- Cargo.lock | 9 +++++---- Cargo.toml | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2375f05164..29613b05cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6379,6 +6379,7 @@ dependencies = [ [[package]] name = "pallet-crowdloan-rewards" version = "0.6.0" +source = "git+https://github.com/mangata-finance//crowdloan-rewards?branch=feature/3rdparty-rewards#0ad74b0080bc823cb488eca35d72718e9406c5a8" dependencies = [ "ed25519-dalek", "frame-benchmarking", @@ -15044,11 +15045,11 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" [[patch.unused]] -name = "pallet-vesting-mangata" +name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" +source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" [[patch.unused]] -name = "sp-authorship" +name = "pallet-vesting-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" +source = "git+https://github.com/mangata-finance/substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" diff --git a/Cargo.toml b/Cargo.toml index e79c889cdc..6e39801bfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,8 +59,8 @@ parachain-staking = { git = "https://github.com/mangata-finance//moonbeam", bran # parachain-staking = { path = "../moonbeam/pallets/parachain-staking" } [patch."https://github.com/mangata-finance/crowdloan-rewards"] -# pallet-crowdloan-rewards = { git = "https://github.com/mangata-finance//crowdloan-rewards", branch = "fr-dev" } -pallet-crowdloan-rewards = { path = "../crowdloan-rewards" } +pallet-crowdloan-rewards = { git = "https://github.com/mangata-finance//crowdloan-rewards", branch = "feature/3rdparty-rewards" } +# pallet-crowdloan-rewards = { path = "../crowdloan-rewards" } # patch generated by ./scripts/dev_manifest.sh [patch."https://github.com/paritytech/cumulus"] From be10ab43e7a1f7aeff227bf4339c5c74d0341866 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 2 Nov 2023 21:22:03 +0100 Subject: [PATCH 081/125] remove unused patches --- Cargo.lock | 15 --------------- Cargo.toml | 6 +++--- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 29613b05cd..7a1974e40c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15034,21 +15034,6 @@ dependencies = [ "pkg-config", ] -[[patch.unused]] -name = "sp-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" - -[[patch.unused]] -name = "sp-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" - -[[patch.unused]] -name = "sp-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//substrate?branch=feature/3rdparty-rewards#deb4623a00fa59f6cbbd0114bc0c0485ca500eae" - [[patch.unused]] name = "pallet-vesting-mangata" version = "4.0.0-dev" diff --git a/Cargo.toml b/Cargo.toml index 6e39801bfe..594fb89de6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -552,7 +552,7 @@ sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = " sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } -sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } @@ -735,7 +735,7 @@ sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = " sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } -sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } @@ -919,7 +919,7 @@ sp-staking = { git = "https://github.com/mangata-finance//substrate", branch = " sp-weights = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-arithmetic = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-npos-elections = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } -sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } +# sp-authorship = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-storage = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sp-inherents = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } sc-consensus-grandpa = { git = "https://github.com/mangata-finance//substrate", branch = "feature/3rdparty-rewards" } From 810e34f6454b2fbda71a04b7979d9df38cc0825b Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 2 Nov 2023 21:59:04 +0100 Subject: [PATCH 082/125] impl missing fn --- pallets/fee-lock/src/mock.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pallets/fee-lock/src/mock.rs b/pallets/fee-lock/src/mock.rs index aa39313d10..22632c8737 100644 --- a/pallets/fee-lock/src/mock.rs +++ b/pallets/fee-lock/src/mock.rs @@ -163,6 +163,13 @@ impl Valuate for MockPoolReservesProvider { _ => Err(pallet_fee_lock::Error::::UnexpectedFailure.into()), } } + + fn valuate_non_liquidity_token( + liquidity_token_id: Self::CurrencyId, + liquidity_token_amount: Self::Balance, + ) -> Self::Balance { + unimplemented!() + } } parameter_types! { From 5f47e65b55297669496edb9b8c3345e9bfc99d09 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 8 Nov 2023 20:29:28 +0100 Subject: [PATCH 083/125] fix RPC 'calculate_3rdparty_rewards_all' --- pallets/proof-of-stake/rpc/src/lib.rs | 18 +++++++++--------- pallets/proof-of-stake/runtime-api/src/lib.rs | 1 - runtime/mangata-kusama/src/lib.rs | 1 - runtime/mangata-rococo/src/lib.rs | 1 - 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/pallets/proof-of-stake/rpc/src/lib.rs b/pallets/proof-of-stake/rpc/src/lib.rs index 2e3798352a..a3832a91d1 100644 --- a/pallets/proof-of-stake/rpc/src/lib.rs +++ b/pallets/proof-of-stake/rpc/src/lib.rs @@ -120,14 +120,14 @@ where let api = self.client.runtime_api(); let at = self.client.info().best_hash; - todo!(); - // api.calculate_3rdparty_rewards_all(at, account) - // .map_err(|e| { - // JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( - // 1, - // "Unable to serve the request", - // Some(format!("{:?}", e)), - // ))) - // }) + api.calculate_3rdparty_rewards_all(at, account) + .map(|vec| vec.into_iter().map(|(token1, token2, balance)| (token1, token2, Into::::into(balance))).collect()) + .map_err(|e| { + JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( + 1, + "Unable to serve the request", + Some(format!("{:?}", e)), + ))) + }) } } diff --git a/pallets/proof-of-stake/runtime-api/src/lib.rs b/pallets/proof-of-stake/runtime-api/src/lib.rs index a81e86b9c2..217cd6e479 100644 --- a/pallets/proof-of-stake/runtime-api/src/lib.rs +++ b/pallets/proof-of-stake/runtime-api/src/lib.rs @@ -23,7 +23,6 @@ sp_api::decl_runtime_apis! { fn calculate_3rdparty_rewards_all( user: AccountId, - liquidity_asset_id: TokenId, ) -> Vec<(TokenId, TokenId, Balance)>; } } diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index 256ac26ff7..142e7c38f4 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -790,7 +790,6 @@ impl_runtime_apis! { fn calculate_3rdparty_rewards_all( user: AccountId, - liquidity_asset_id: TokenId, ) -> Vec<(TokenId, TokenId, Balance)>{ pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_all(user) .unwrap_or_default() diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index ed87cc5c95..e31a12b60c 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -806,7 +806,6 @@ impl_runtime_apis! { fn calculate_3rdparty_rewards_all( user: AccountId, - liquidity_asset_id: TokenId, ) -> Vec<(TokenId, TokenId, Balance)>{ pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_all(user) .unwrap_or_default() From 5b72a54bb8308795dbeee8e673ec2ab504546848 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 9 Nov 2023 20:17:12 +0100 Subject: [PATCH 084/125] [WIP] make 3rd party rewards types generic over T --- Cargo.lock | 4516 ++++++++++------- Cargo.toml | 554 +- pallets/proof-of-stake/src/lib.rs | 231 +- pallets/proof-of-stake/src/reward_info.rs | 68 +- .../src/schedule_rewards_calculator.rs | 31 +- 5 files changed, 3245 insertions(+), 2155 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c71a2d1acf..e537a18aa4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,15 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +dependencies = [ + "gimli 0.26.2", +] + [[package]] name = "addr2line" version = "0.19.0" @@ -497,6 +506,12 @@ dependencies = [ "sha3", ] +[[package]] +name = "array-bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + [[package]] name = "array-bytes" version = "6.2.0" @@ -871,6 +886,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base58" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" + [[package]] name = "base64" version = "0.13.1" @@ -901,7 +922,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "hash-db", "log", @@ -1276,6 +1297,15 @@ dependencies = [ "nom", ] +[[package]] +name = "cfg-expr" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +dependencies = [ + "smallvec", +] + [[package]] name = "cfg-expr" version = "0.15.5" @@ -1543,15 +1573,15 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal 0.3.4", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -1592,26 +1622,26 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-api", - "sp-block-builder", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-offchain", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", - "sp-ver", - "sp-version", - "sp-weights", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-version 22.0.0", + "sp-weights 20.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "ver-api", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "xyk-runtime-api", ] @@ -1740,7 +1770,7 @@ version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ - "cranelift-entity", + "cranelift-entity 0.95.1", ] [[package]] @@ -1753,7 +1783,7 @@ dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", - "cranelift-entity", + "cranelift-entity 0.95.1", "cranelift-isle", "gimli 0.27.3", "hashbrown 0.13.2", @@ -1778,6 +1808,15 @@ version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" +[[package]] +name = "cranelift-entity" +version = "0.93.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" +dependencies = [ + "serde", +] + [[package]] name = "cranelift-entity" version = "0.95.1" @@ -1823,13 +1862,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", - "cranelift-entity", + "cranelift-entity 0.95.1", "cranelift-frontend", "itertools 0.10.5", "log", "smallvec", - "wasmparser", - "wasmtime-types", + "wasmparser 0.102.0", + "wasmtime-types 8.0.1", ] [[package]] @@ -1981,7 +2020,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "clap", "parity-scale-codec", @@ -1989,15 +2028,15 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-service", - "sp-core", - "sp-runtime", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "url", ] [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -2010,17 +2049,17 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-client-api", - "sp-api", - "sp-consensus", - "sp-core", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "tracing", ] [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "cumulus-client-collator", @@ -2043,19 +2082,19 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "schnellru", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-keystore", - "sp-runtime", - "sp-state-machine", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", "sp-timestamp", - "sp-ver", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "substrate-prometheus-endpoint", "tracing", ] @@ -2063,7 +2102,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -2078,13 +2117,13 @@ dependencies = [ "sc-consensus", "sc-consensus-babe", "schnellru", - "sp-blockchain", - "sp-consensus", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-slots", - "sp-core", - "sp-runtime", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "sp-timestamp", - "sp-trie", + "sp-trie 22.0.0", "substrate-prometheus-endpoint", "tracing", ] @@ -2092,22 +2131,22 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "anyhow", "async-trait", "cumulus-primitives-parachain-inherent", - "sp-consensus", - "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", "thiserror", ] [[package]] name = "cumulus-client-consensus-relay-chain" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -2116,13 +2155,13 @@ dependencies = [ "futures", "parking_lot 0.12.1", "sc-consensus", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-inherents", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", "tracing", ] @@ -2130,7 +2169,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -2142,18 +2181,18 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "sc-client-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", "tracing", ] [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2168,16 +2207,16 @@ dependencies = [ "rand 0.8.5", "sc-client-api", "sc-consensus", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-maybe-compressed-blob", - "sp-runtime", + "sp-runtime 24.0.0", "tracing", ] [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -2201,77 +2240,77 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool", "sc-utils", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "sp-transaction-pool", ] [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-pallet-parachain-system", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "pallet-aura", "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 23.0.0", "sp-consensus-aura", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "mangata-support", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "environmental", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", "log", "mangata-support", "parity-scale-codec", "polkadot-parachain-primitives", "scale-info", - "sp-core", - "sp-externalities", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "sp-version", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "sp-std 8.0.0", + "sp-trie 22.0.0", + "sp-version 22.0.0", "staging-xcm", "trie-db", ] @@ -2279,7 +2318,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2290,51 +2329,51 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "pallet-session", "parity-scale-codec", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "mangata-support", "parity-scale-codec", "polkadot-runtime-common", "rand_chacha 0.3.1", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -2342,38 +2381,38 @@ dependencies = [ [[package]] name = "cumulus-primitives-aura" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-primitives", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-aura", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-primitives", "scale-info", - "sp-api", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-trie 22.0.0", "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2382,43 +2421,43 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "scale-info", - "sp-api", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-storage", - "sp-trie", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-trie 22.0.0", "tracing", ] [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", "futures", "parity-scale-codec", - "sp-inherents", - "sp-std", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "polkadot-runtime-common", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2427,7 +2466,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2441,17 +2480,17 @@ dependencies = [ "sc-sysinfo", "sc-telemetry", "sc-tracing", - "sp-api", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", ] [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2460,18 +2499,18 @@ dependencies = [ "parity-scale-codec", "polkadot-overseer", "sc-client-api", - "sp-api", - "sp-blockchain", - "sp-state-machine", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-state-machine 0.28.0", "thiserror", ] [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -2494,17 +2533,17 @@ dependencies = [ "sc-tracing", "sc-utils", "schnellru", - "sp-api", - "sp-consensus", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-babe", - "sp-runtime", + "sp-runtime 24.0.0", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2525,13 +2564,13 @@ dependencies = [ "serde_json", "smoldot", "smoldot-light", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-authority-discovery", "sp-consensus-babe", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-storage", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "sp-storage 13.0.0", "thiserror", "tokio", "tokio-util", @@ -2542,15 +2581,15 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "sp-std 8.0.0", + "sp-trie 22.0.0", ] [[package]] @@ -3331,6 +3370,19 @@ dependencies = [ "quote", ] +[[package]] +name = "expander" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" +dependencies = [ + "blake2", + "fs-err", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "expander" version = "2.0.0" @@ -3347,17 +3399,33 @@ dependencies = [ [[package]] name = "extrinsic-shuffler" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" +dependencies = [ + "derive_more", + "log", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", +] + +[[package]] +name = "extrinsic-shuffler" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "derive_more", "log", - "sp-api", - "sp-block-builder", - "sp-core", - "sp-runtime", - "sp-std", - "sp-ver", - "ver-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-core 7.0.0", + "sp-runtime 7.0.0", + "sp-std 5.0.0", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", ] [[package]] @@ -3444,7 +3512,7 @@ dependencies = [ [[package]] name = "fflonk" version = "0.1.0" -source = "git+https://github.com/w3f/fflonk#e141d4b6f42fb481aefe1b479788694945b6940d" +source = "git+https://github.com/w3f/fflonk#1beb0585e1c8488956fac7f05da061f9b41e8948" dependencies = [ "ark-ec", "ark-ff", @@ -3545,7 +3613,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", ] @@ -3568,41 +3636,41 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-support-procedural", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support-procedural 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "linregress", "log", "parity-scale-codec", "paste", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "Inflector", - "array-bytes", + "array-bytes 6.2.0", "chrono", "clap", "comfy-table", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "futures", "gethostname", "handlebars", @@ -3624,30 +3692,30 @@ dependencies = [ "sc-sysinfo", "serde", "serde_json", - "sp-api", - "sp-blockchain", - "sp-consensus", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-aura", - "sp-core", - "sp-database", - "sp-externalities", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "sp-trie", - "sp-wasm-interface", + "sp-core 21.0.0", + "sp-database 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-externalities 0.19.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "sp-storage 13.0.0", + "sp-trie 22.0.0", + "sp-wasm-interface 14.0.0", "thiserror", "thousands", - "ver-api", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", ] [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3658,40 +3726,52 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-election-provider-solution-type", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", "sp-npos-elections", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "aquamarine 0.1.12", - "extrinsic-shuffler", - "frame-support", - "frame-system", + "extrinsic-shuffler 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-try-runtime", "log", "merlin 2.0.1", "parity-scale-codec", "scale-info", "schnorrkel 0.9.1", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-tracing 10.0.0", +] + +[[package]] +name = "frame-metadata" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", + "serde", ] [[package]] @@ -3709,7 +3789,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-recursion", "futures", @@ -3718,10 +3798,10 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", "spinners", "substrate-rpc-client", "tokio", @@ -3731,54 +3811,88 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "aquamarine 0.3.2", "bitflags 1.3.2", "docify", "environmental", - "frame-metadata", - "frame-support-procedural", + "frame-metadata 16.0.0", + "frame-support-procedural 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", - "k256", + "k256 0.13.1", "log", "macro_magic", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "paste", "scale-info", "serde", "serde_json", "smallvec", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-core-hashing-proc-macro", - "sp-debug-derive", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-core-hashing-proc-macro 9.0.0", + "sp-debug-derive 8.0.0", "sp-genesis-builder", - "sp-inherents", - "sp-io", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-metadata-ir", - "sp-runtime", - "sp-staking", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-weights", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-state-machine 0.28.0", + "sp-std 8.0.0", + "sp-tracing 10.0.0", + "sp-weights 20.0.0", "static_assertions", "tt-call", ] +[[package]] +name = "frame-support" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "bitflags 1.3.2", + "environmental", + "frame-metadata 15.1.0", + "frame-support-procedural 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "impl-trait-for-tuples", + "k256 0.11.6", + "log", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "once_cell", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "smallvec", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-arithmetic 6.0.0", + "sp-core 7.0.0", + "sp-core-hashing-proc-macro 5.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-io 7.0.0", + "sp-runtime 7.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-state-machine 0.13.0", + "sp-std 5.0.0", + "sp-tracing 6.0.0", + "sp-weights 4.0.0", + "tt-call", +] + [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "Inflector", - "cfg-expr", + "cfg-expr 0.15.5", "derive-syn-parse", "expander 2.0.0", - "frame-support-procedural-tools", + "frame-support-procedural-tools 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "itertools 0.10.5", "macro_magic", "proc-macro-warning", @@ -3787,83 +3901,140 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "frame-support-procedural" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "Inflector", + "cfg-expr 0.10.3", + "derive-syn-parse", + "frame-support-procedural-tools 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support-procedural-tools-derive", + "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.39", ] +[[package]] +name = "frame-support-procedural-tools" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "proc-macro2", "quote", "syn 2.0.39", ] +[[package]] +name = "frame-support-procedural-tools-derive" +version = "3.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cfg-if", - "extrinsic-shuffler", - "frame-support", + "extrinsic-shuffler 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-version 22.0.0", + "sp-weights 20.0.0", +] + +[[package]] +name = "frame-system" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "extrinsic-shuffler 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-ver", - "sp-version", - "sp-weights", + "sp-core 7.0.0", + "sp-io 7.0.0", + "sp-runtime 7.0.0", + "sp-std 5.0.0", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-version 5.0.0", + "sp-weights 4.0.0", ] [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", ] [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -4011,6 +4182,10 @@ name = "futures-timer" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper", +] [[package]] name = "futures-util" @@ -4111,6 +4286,16 @@ dependencies = [ "polyval 0.6.1", ] +[[package]] +name = "gimli" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] + [[package]] name = "gimli" version = "0.27.3" @@ -4147,6 +4332,51 @@ dependencies = [ "regex", ] +[[package]] +name = "gloo-net" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "group" version = "0.12.1" @@ -4772,11 +5002,13 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ + "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-http-client", "jsonrpsee-proc-macros", "jsonrpsee-server", "jsonrpsee-types", + "jsonrpsee-wasm-client", "jsonrpsee-ws-client", "tracing", ] @@ -4787,7 +5019,11 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ + "anyhow", + "futures-channel", + "futures-timer", "futures-util", + "gloo-net", "http", "jsonrpsee-core", "jsonrpsee-types", @@ -4828,6 +5064,7 @@ dependencies = [ "thiserror", "tokio", "tracing", + "wasm-bindgen-futures", ] [[package]] @@ -4898,6 +5135,17 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-wasm-client" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5df77c8f625d36e4cfb583c5a674eccebe32403fcfe42f7ceff7fac9324dd" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + [[package]] name = "jsonrpsee-ws-client" version = "0.16.3" @@ -4910,6 +5158,18 @@ dependencies = [ "jsonrpsee-types", ] +[[package]] +name = "k256" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +dependencies = [ + "cfg-if", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.8", +] + [[package]] name = "k256" version = "0.13.1" @@ -4935,15 +5195,15 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-weights 20.0.0", ] [[package]] @@ -5606,6 +5866,15 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +[[package]] +name = "lru" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" +dependencies = [ + "hashbrown 0.12.3", +] + [[package]] name = "lru" version = "0.10.1" @@ -5723,15 +5992,15 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal 0.3.4", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -5769,30 +6038,31 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", + "proof-of-stake-runtime-api", "scale-info", "serde", "smallvec", - "sp-api", - "sp-block-builder", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-offchain", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", - "sp-ver", - "sp-version", - "sp-weights", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-version 22.0.0", + "sp-weights 20.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "ver-api", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "xyk-runtime-api", ] @@ -5815,7 +6085,7 @@ dependencies = [ "cumulus-relay-chain-interface", "frame-benchmarking", "frame-benchmarking-cli", - "frame-system", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "futures", "hex", "jsonrpsee", @@ -5827,6 +6097,8 @@ dependencies = [ "parity-scale-codec", "polkadot-cli", "polkadot-primitives", + "proof-of-stake-rpc", + "proof-of-stake-runtime-api", "sc-basic-authorship-ver", "sc-chain-spec", "sc-cli", @@ -5845,27 +6117,27 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-api", - "sp-block-builder", - "sp-blockchain", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-keyring", - "sp-keystore", + "sp-keystore 0.27.0", "sp-offchain", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", "sp-timestamp", "sp-transaction-pool", - "sp-ver", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "staging-xcm", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", "tempfile", - "ver-api", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "xyk-rpc", "xyk-runtime-api", ] @@ -5886,15 +6158,15 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal 0.3.4", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -5932,30 +6204,31 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", + "proof-of-stake-runtime-api", "scale-info", "serde", "smallvec", - "sp-api", - "sp-block-builder", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-offchain", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", - "sp-ver", - "sp-version", - "sp-weights", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-version 22.0.0", + "sp-weights 20.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "ver-api", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "xyk-runtime-api", ] @@ -5971,37 +6244,49 @@ dependencies = [ "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-runtime", - "ver-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", ] [[package]] name = "mangata-support" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" +dependencies = [ + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "parity-scale-codec", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "mangata-types" +version = "0.1.0" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "mangata-types", "parity-scale-codec", - "sp-core", - "sp-runtime", - "sp-std", + "scale-info", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "mangata-types" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 7.0.0", + "sp-runtime 7.0.0", + "sp-std 5.0.0", ] [[package]] @@ -6111,6 +6396,12 @@ dependencies = [ "hash-db", ] +[[package]] +name = "memory_units" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" + [[package]] name = "merlin" version = "2.0.1" @@ -6175,36 +6466,36 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "log", "parity-scale-codec", "sc-client-api", "sc-offchain", - "sp-api", - "sp-blockchain", - "sp-consensus", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-beefy", - "sp-core", + "sp-core 21.0.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 24.0.0", ] [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "anyhow", "jsonrpsee", "parity-scale-codec", "serde", - "sp-api", - "sp-blockchain", - "sp-core", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 24.0.0", ] [[package]] @@ -6546,6 +6837,18 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +[[package]] +name = "object" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +dependencies = [ + "crc32fast", + "hashbrown 0.12.3", + "indexmap 1.9.3", + "memchr", +] + [[package]] name = "object" version = "0.30.4" @@ -6656,17 +6959,17 @@ version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "orml-traits", "pallet-xcm", "parity-scale-codec", "scale-info", "serde", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -6678,17 +6981,17 @@ version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "orml-traits", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6696,7 +6999,7 @@ name = "orml-traits" version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", "num-traits", "orml-utilities", @@ -6704,10 +7007,10 @@ dependencies = [ "paste", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", ] @@ -6716,13 +7019,13 @@ name = "orml-unknown-tokens" version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-xcm-support", "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0", "staging-xcm", ] @@ -6731,14 +7034,14 @@ name = "orml-utilities" version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6746,12 +7049,12 @@ name = "orml-xcm" version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "pallet-xcm", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 8.0.0", "staging-xcm", ] @@ -6760,11 +7063,11 @@ name = "orml-xcm-support" version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-traits", "parity-scale-codec", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -6775,8 +7078,8 @@ version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ "cumulus-primitives-core", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "orml-traits", "orml-xcm-support", @@ -6784,9 +7087,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -6816,152 +7119,152 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "pallet-transaction-payment", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 23.0.0", "sp-consensus-aura", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 23.0.0", "sp-authority-discovery", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-authorship", "pallet-session", "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 23.0.0", "sp-consensus-babe", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", "sp-session", - "sp-staking", - "sp-std", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "aquamarine 0.3.2", "docify", "frame-benchmarking", "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-authorship", "pallet-session", @@ -6969,21 +7272,21 @@ dependencies = [ "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-staking", - "sp-std", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "binary-merkle-tree", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-beefy", "pallet-mmr", @@ -6991,13 +7294,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-beefy", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "sp-std 8.0.0", ] [[package]] @@ -7006,13 +7309,13 @@ version = "0.1.0" dependencies = [ "frame-benchmarking", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-try-runtime", "lazy_static", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "mockall", "orml-tokens", "orml-traits", @@ -7024,119 +7327,119 @@ dependencies = [ "scale-info", "serde", "serial_test", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "test-case", ] [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-bounties", "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-collator-selection" version = "3.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-authorship", "pallet-session", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-collective-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "assert_matches", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", "serde", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -7146,114 +7449,114 @@ source = "git+https://github.com/mangata-finance/crowdloan-rewards?branch=upgrad dependencies = [ "ed25519-dalek 1.0.1", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-tokens", "pallet-utility", "pallet-vesting-mangata", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-trie 22.0.0", ] [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-election-provider-support-benchmarking", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", "sp-npos-elections", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "strum 0.24.1", ] [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", "frame-election-provider-support", - "frame-system", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "sp-npos-elections", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", + "sp-core 21.0.0", + "sp-io 23.0.0", "sp-npos-elections", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "docify", "frame-benchmarking", "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] @@ -7262,13 +7565,13 @@ version = "0.1.0" dependencies = [ "env_logger 0.9.3", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "hex-literal 0.3.4", "lazy_static", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-tokens", "orml-traits", "pallet-xyk", @@ -7277,88 +7580,88 @@ dependencies = [ "scale-info", "serde", "serial_test", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "test-case", ] [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-authorship", "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 23.0.0", "sp-consensus-grandpa", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", "sp-session", - "sp-staking", - "sp-std", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "enumflags2", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-authorship", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-application-crypto 23.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", + "sp-core 21.0.0", + "sp-io 23.0.0", "sp-keyring", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -7368,23 +7671,23 @@ dependencies = [ "cfg-if", "frame-benchmarking", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-try-runtime", "lazy_static", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-tokens", "orml-traits", "pallet-vesting-mangata", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -7393,13 +7696,13 @@ version = "0.1.0" dependencies = [ "env_logger 0.9.3", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "hex-literal 0.3.4", "lazy_static", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-tokens", "orml-traits", "parity-scale-codec", @@ -7407,64 +7710,64 @@ dependencies = [ "scale-info", "serde", "serial_test", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-weights 20.0.0", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", + "sp-core 21.0.0", + "sp-io 23.0.0", "sp-mmr-primitives", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -7474,14 +7777,14 @@ dependencies = [ "env_logger 0.9.3", "frame-benchmarking", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-try-runtime", "hex-literal 0.3.4", "lazy_static", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-tokens", "orml-traits", "pallet-vesting-mangata", @@ -7491,120 +7794,120 @@ dependencies = [ "scale-info", "serde", "serial_test", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", - "sp-tracing", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "pallet-bags-list", "pallet-nomination-pools", "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-runtime-interface", - "sp-staking", - "sp-std", + "sp-runtime 24.0.0", + "sp-runtime-interface 17.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", - "sp-api", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-babe", "pallet-balances", @@ -7615,26 +7918,26 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -7644,200 +7947,202 @@ dependencies = [ "env_logger 0.9.3", "frame-benchmarking", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-try-runtime", "hex-literal 0.3.4", "lazy_static", "libm 0.2.1", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mockall", "orml-tokens", "orml-traits", "pallet-bootstrap", "pallet-issuance", "pallet-vesting-mangata", + "pallet-xyk", "parity-scale-codec", "rustc-hex", "scale-info", "serde", "serial_test", "similar-asserts", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "test-case", ] [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "assert_matches", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-root-testing" version = "1.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "docify", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-weights 20.0.0", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", "log", "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", "sp-session", - "sp-staking", - "sp-state-machine", - "sp-std", - "sp-trie", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-state-machine 0.28.0", + "sp-std 8.0.0", + "sp-trie 22.0.0", ] [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "pallet-session", "pallet-staking", "parity-scale-codec", "rand 0.8.5", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-authorship", "pallet-session", @@ -7845,17 +8150,17 @@ dependencies = [ "rand_chacha 0.2.2", "scale-info", "serde", - "sp-application-crypto", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-application-crypto 23.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7866,67 +8171,67 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "log", - "sp-arithmetic", + "sp-arithmetic 16.0.0", ] [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", ] [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-sudo-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -7934,255 +8239,255 @@ name = "pallet-sudo-origin" version = "4.0.0-dev" dependencies = [ "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-try-runtime", "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-storage", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-timestamp", ] [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "pallet-treasury", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-transaction-payment-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-transaction-payment-mangata-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "jsonrpsee", "pallet-transaction-payment-mangata-rpc-runtime-api", "parity-scale-codec", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-weights", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-weights 20.0.0", ] [[package]] name = "pallet-transaction-payment-mangata-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "pallet-transaction-payment-mangata", "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-weights", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-weights 20.0.0", ] [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-weights", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-weights 20.0.0", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-weights", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-weights 20.0.0", ] [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-utility-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-vesting-mangata" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-xcm" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bounded-collections", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -8190,17 +8495,17 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -8213,15 +8518,15 @@ dependencies = [ "env_logger 0.9.3", "frame-benchmarking", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-try-runtime", "hex-literal 0.3.4", "lazy_static", "libm 0.2.1", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-tokens", "orml-traits", "pallet-bootstrap", @@ -8234,26 +8539,26 @@ dependencies = [ "serde", "serial_test", "similar-asserts", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "test-case", ] [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -8262,12 +8567,12 @@ version = "3.0.0" dependencies = [ "aquamarine 0.1.12", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "itertools 0.10.5", "log", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-tokens", "orml-traits", "pallet-authorship", @@ -8279,23 +8584,23 @@ dependencies = [ "scale-info", "serde", "similar-asserts", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "parachains-common" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "kusama-runtime-constants", "log", "num-traits", @@ -8312,10 +8617,10 @@ dependencies = [ "scale-info", "smallvec", "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -8669,7 +8974,7 @@ checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "polkadot-approval-distribution" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "futures-timer", @@ -8687,7 +8992,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "always-assert", "futures", @@ -8703,7 +9008,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "derive_more", "fatality", @@ -8717,8 +9022,8 @@ dependencies = [ "polkadot-primitives", "rand 0.8.5", "schnellru", - "sp-core", - "sp-keystore", + "sp-core 21.0.0", + "sp-keystore 0.27.0", "thiserror", "tracing-gum", ] @@ -8726,7 +9031,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "fatality", "futures", @@ -8747,7 +9052,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "clap", "frame-benchmarking-cli", @@ -8762,8 +9067,8 @@ dependencies = [ "sc-storage-monitor", "sc-sysinfo", "sc-tracing", - "sp-core", - "sp-io", + "sp-core 21.0.0", + "sp-io 23.0.0", "sp-keyring", "sp-maybe-compressed-blob", "substrate-build-script-utils", @@ -8774,7 +9079,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bitvec", "fatality", @@ -8785,9 +9090,9 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 21.0.0", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", "thiserror", "tokio-util", "tracing-gum", @@ -8796,19 +9101,19 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "polkadot-dispute-distribution" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "derive_more", "fatality", @@ -8824,8 +9129,8 @@ dependencies = [ "polkadot-primitives", "sc-network", "schnellru", - "sp-application-crypto", - "sp-keystore", + "sp-application-crypto 23.0.0", + "sp-keystore 0.27.0", "thiserror", "tracing-gum", ] @@ -8833,21 +9138,21 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", "polkadot-primitives", "reed-solomon-novelpoly", - "sp-core", - "sp-trie", + "sp-core 21.0.0", + "sp-trie 22.0.0", "thiserror", ] [[package]] name = "polkadot-gossip-support" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "futures-timer", @@ -8859,16 +9164,16 @@ dependencies = [ "rand_chacha 0.3.1", "sc-network", "sc-network-common", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 23.0.0", + "sp-core 21.0.0", + "sp-keystore 0.27.0", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "always-assert", "async-trait", @@ -8883,7 +9188,7 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-network", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "thiserror", "tracing-gum", ] @@ -8891,7 +9196,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "parity-scale-codec", @@ -8900,7 +9205,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core", + "sp-core 21.0.0", "sp-maybe-compressed-blob", "thiserror", "tracing-gum", @@ -8909,7 +9214,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bitvec", "derive_more", @@ -8927,10 +9232,10 @@ dependencies = [ "sc-keystore", "schnellru", "schnorrkel 0.9.1", - "sp-application-crypto", - "sp-consensus", + "sp-application-crypto 23.0.0", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-slots", - "sp-runtime", + "sp-runtime 24.0.0", "thiserror", "tracing-gum", ] @@ -8938,7 +9243,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bitvec", "futures", @@ -8952,7 +9257,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "thiserror", "tracing-gum", ] @@ -8960,7 +9265,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bitvec", "fatality", @@ -8971,7 +9276,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-statement-table", - "sp-keystore", + "sp-keystore 0.27.0", "thiserror", "tracing-gum", ] @@ -8979,13 +9284,13 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-keystore", + "sp-keystore 0.27.0", "thiserror", "tracing-gum", "wasm-timer", @@ -8994,7 +9299,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "futures", @@ -9015,7 +9320,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "polkadot-node-metrics", @@ -9023,14 +9328,14 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sc-consensus-babe", - "sp-blockchain", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-selection" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "futures-timer", @@ -9047,7 +9352,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "fatality", "futures", @@ -9066,7 +9371,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "futures", @@ -9074,8 +9379,8 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-overseer", "polkadot-primitives", - "sp-blockchain", - "sp-inherents", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "thiserror", "tracing-gum", ] @@ -9083,7 +9388,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bitvec", "fatality", @@ -9100,7 +9405,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bitvec", "fatality", @@ -9117,7 +9422,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "always-assert", "futures", @@ -9133,9 +9438,9 @@ dependencies = [ "polkadot-primitives", "rand 0.8.5", "slotmap", - "sp-core", + "sp-core 21.0.0", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "substrate-build-script-utils", "tempfile", "tokio", @@ -9145,7 +9450,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "polkadot-node-primitives", @@ -9153,7 +9458,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", - "sp-keystore", + "sp-keystore 0.27.0", "thiserror", "tracing-gum", ] @@ -9161,7 +9466,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cpu-time", "futures", @@ -9173,10 +9478,10 @@ dependencies = [ "sc-executor", "sc-executor-common", "sc-executor-wasmtime", - "sp-core", - "sp-externalities", - "sp-io", - "sp-tracing", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-io 23.0.0", + "sp-tracing 10.0.0", "tokio", "tracing-gum", ] @@ -9184,7 +9489,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-prepare-worker" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "libc", @@ -9196,9 +9501,9 @@ dependencies = [ "sc-executor", "sc-executor-common", "sc-executor-wasmtime", - "sp-io", + "sp-io 23.0.0", "sp-maybe-compressed-blob", - "sp-tracing", + "sp-tracing 10.0.0", "tikv-jemalloc-ctl", "tokio", "tracing-gum", @@ -9207,7 +9512,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "polkadot-node-metrics", @@ -9222,7 +9527,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "lazy_static", "log", @@ -9232,7 +9537,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "sc-network", - "sp-core", + "sp-core 21.0.0", "thiserror", "tokio", ] @@ -9240,7 +9545,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bs58 0.5.0", "futures", @@ -9259,7 +9564,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-channel", "async-trait", @@ -9283,7 +9588,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bounded-vec", "futures", @@ -9292,12 +9597,12 @@ dependencies = [ "polkadot-primitives", "schnorrkel 0.9.1", "serde", - "sp-application-crypto", + "sp-application-crypto 23.0.0", "sp-consensus-babe", - "sp-core", - "sp-keystore", + "sp-core 21.0.0", + "sp-keystore 0.27.0", "sp-maybe-compressed-blob", - "sp-runtime", + "sp-runtime 24.0.0", "thiserror", "zstd 0.12.4", ] @@ -9305,7 +9610,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -9315,7 +9620,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "derive_more", @@ -9329,7 +9634,7 @@ dependencies = [ "sc-network", "sc-transaction-pool-api", "smallvec", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-authority-discovery", "sp-consensus-babe", "substrate-prometheus-endpoint", @@ -9339,7 +9644,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "derive_more", @@ -9362,9 +9667,9 @@ dependencies = [ "prioritized-metered-channel", "rand 0.8.5", "schnellru", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 23.0.0", + "sp-core 21.0.0", + "sp-keystore 0.27.0", "thiserror", "tracing-gum", ] @@ -9372,7 +9677,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "futures", @@ -9386,8 +9691,8 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "schnellru", - "sp-api", - "sp-core", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", "tikv-jemalloc-ctl", "tracing-gum", ] @@ -9395,24 +9700,24 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bounded-collections", "derive_more", - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "polkadot-core-primitives", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "polkadot-performance-test" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "env_logger 0.9.3", "log", @@ -9430,7 +9735,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bitvec", "hex-literal 0.4.1", @@ -9439,24 +9744,24 @@ dependencies = [ "polkadot-parachain-primitives", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-arithmetic 16.0.0", "sp-authority-discovery", "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "polkadot-rpc" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -9474,13 +9779,13 @@ dependencies = [ "sc-rpc", "sc-sync-state-rpc", "sc-transaction-pool-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-babe", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", ] @@ -9488,14 +9793,14 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -9556,25 +9861,25 @@ dependencies = [ "serde", "serde_derive", "smallvec", - "sp-api", - "sp-arithmetic", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-arithmetic 16.0.0", "sp-authority-discovery", - "sp-block-builder", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-staking", - "sp-std", - "sp-storage", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", - "sp-version", + "sp-version 22.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9585,13 +9890,13 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bitvec", "frame-benchmarking", "frame-election-provider-support", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", "libsecp256k1", "log", @@ -9615,15 +9920,15 @@ dependencies = [ "serde", "serde_derive", "slot-range-helper", - "sp-api", - "sp-core", - "sp-inherents", - "sp-io", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-npos-elections", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-staking", - "sp-std", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", "staging-xcm", "static_assertions", ] @@ -9631,41 +9936,41 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-weights 20.0.0", ] [[package]] name = "polkadot-runtime-metrics" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bs58 0.5.0", "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "polkadot-runtime-parachains" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bitflags 1.3.2", "bitvec", "derive_more", "frame-benchmarking", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", "log", "pallet-authority-discovery", @@ -9686,16 +9991,16 @@ dependencies = [ "rustc-hex", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", "sp-session", - "sp-staking", - "sp-std", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -9704,13 +10009,13 @@ dependencies = [ [[package]] name = "polkadot-service" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "frame-benchmarking", "frame-benchmarking-cli", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-system-rpc-runtime-api", "futures", "hex-literal 0.4.1", @@ -9792,29 +10097,29 @@ dependencies = [ "schnellru", "serde", "serde_json", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-authority-discovery", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core", - "sp-inherents", - "sp-io", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-keyring", - "sp-keystore", + "sp-keystore 0.27.0", "sp-mmr-primitives", "sp-offchain", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-state-machine", - "sp-storage", + "sp-state-machine 0.28.0", + "sp-storage 13.0.0", "sp-timestamp", "sp-transaction-pool", - "sp-version", - "sp-weights", + "sp-version 22.0.0", + "sp-weights 20.0.0", "staging-kusama-runtime", "substrate-prometheus-endpoint", "thiserror", @@ -9825,7 +10130,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -9840,8 +10145,8 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-keystore", - "sp-staking", + "sp-keystore 0.27.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "thiserror", "tracing-gum", ] @@ -9849,11 +10154,11 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "polkadot-primitives", - "sp-core", + "sp-core 21.0.0", ] [[package]] @@ -10120,6 +10425,38 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "proof-of-stake-rpc" +version = "2.0.0" +dependencies = [ + "jsonrpsee", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "parity-scale-codec", + "proof-of-stake-runtime-api", + "serde", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-core 7.0.0", + "sp-rpc 6.0.0 (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-runtime 7.0.0", + "sp-std 5.0.0", +] + +[[package]] +name = "proof-of-stake-runtime-api" +version = "2.0.0" +dependencies = [ + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "parity-scale-codec", + "serde", + "serde_json", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-core 7.0.0", + "sp-runtime 7.0.0", + "sp-std 5.0.0", +] + [[package]] name = "prost" version = "0.11.9" @@ -10601,13 +10938,13 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "binary-merkle-tree", "frame-benchmarking", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -10662,23 +10999,23 @@ dependencies = [ "serde", "serde_derive", "smallvec", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-authority-discovery", - "sp-block-builder", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-mmr-primitives", "sp-offchain", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-staking", - "sp-std", - "sp-storage", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", - "sp-version", + "sp-version 22.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -10689,15 +11026,15 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-weights 20.0.0", ] [[package]] @@ -10769,13 +11106,13 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", "env_logger 0.9.3", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "kusama-runtime-constants", "log", "mangata-kusama-runtime", "mangata-support", - "mangata-types", + "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -10799,9 +11136,9 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", - "sp-io", - "sp-runtime", - "sp-storage", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-storage 13.0.0", "staging-kusama-runtime", "staging-xcm", "staging-xcm-builder", @@ -11010,18 +11347,18 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "log", - "sp-core", - "sp-wasm-interface", + "sp-core 21.0.0", + "sp-wasm-interface 14.0.0", "thiserror", ] [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "futures", @@ -11036,12 +11373,12 @@ dependencies = [ "rand 0.8.5", "sc-client-api", "sc-network", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-authority-discovery", - "sp-blockchain", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11049,7 +11386,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "futures-timer", @@ -11060,19 +11397,19 @@ dependencies = [ "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-inherents", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", ] [[package]] name = "sc-basic-authorship-ver" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "aquamarine 0.3.2", "futures", @@ -11084,56 +11421,56 @@ dependencies = [ "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-ver", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "substrate-prometheus-endpoint", - "ver-api", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", ] [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "sc-client-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-inherents", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", ] [[package]] name = "sc-block-builder-ver" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "aquamarine 0.1.12", - "extrinsic-shuffler", + "extrinsic-shuffler 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "log", "parity-scale-codec", "sc-client-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-ver", - "ver-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -11143,16 +11480,16 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", ] [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11163,9 +11500,9 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "chrono", "clap", "fdlimit", @@ -11187,13 +11524,13 @@ dependencies = [ "sc-utils", "serde", "serde_json", - "sp-blockchain", - "sp-core", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", "sp-keyring", - "sp-keystore", - "sp-panic-handler", - "sp-runtime", - "sp-version", + "sp-keystore 0.27.0", + "sp-panic-handler 8.0.0", + "sp-runtime 24.0.0", + "sp-version 22.0.0", "thiserror", "tiny-bip39", "tokio", @@ -11202,7 +11539,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "fnv", "futures", @@ -11212,23 +11549,23 @@ dependencies = [ "sc-executor", "sc-transaction-pool-api", "sc-utils", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-database", - "sp-externalities", - "sp-runtime", - "sp-state-machine", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-database 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-externalities 0.19.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", "sp-statement-store", - "sp-storage", + "sp-storage 13.0.0", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "hash-db", "kvdb", @@ -11242,19 +11579,19 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic", - "sp-blockchain", - "sp-core", - "sp-database", - "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-arithmetic 16.0.0", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-database 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "sp-trie 22.0.0", ] [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "futures", @@ -11266,12 +11603,12 @@ dependencies = [ "sc-client-api", "sc-utils", "serde", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11279,7 +11616,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "futures", @@ -11290,17 +11627,17 @@ dependencies = [ "sc-consensus", "sc-consensus-slots", "sc-telemetry", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-aura", "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-keystore", - "sp-runtime", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11308,7 +11645,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "fork-tree", @@ -11326,17 +11663,17 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool-api", "scale-info", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-babe", "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-keystore", - "sp-runtime", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11344,7 +11681,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "jsonrpsee", @@ -11352,23 +11689,23 @@ dependencies = [ "sc-consensus-epochs", "sc-rpc-api", "serde", - "sp-api", - "sp-application-crypto", - "sp-blockchain", - "sp-consensus", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-babe", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 21.0.0", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", "thiserror", ] [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "async-channel", "async-trait", "fnv", @@ -11382,16 +11719,16 @@ dependencies = [ "sc-network-gossip", "sc-network-sync", "sc-utils", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-arithmetic 16.0.0", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-beefy", - "sp-core", - "sp-keystore", + "sp-core 21.0.0", + "sp-keystore 0.27.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", "thiserror", "wasm-timer", @@ -11400,7 +11737,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "jsonrpsee", @@ -11411,31 +11748,31 @@ dependencies = [ "sc-rpc", "serde", "sp-consensus-beefy", - "sp-core", - "sp-runtime", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "thiserror", ] [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "fork-tree", "parity-scale-codec", "sc-client-api", "sc-consensus", - "sp-blockchain", - "sp-runtime", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", ] [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "ahash 0.8.6", - "array-bytes", + "array-bytes 6.2.0", "async-trait", "dyn-clone", "finality-grandpa", @@ -11457,15 +11794,15 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-arithmetic 16.0.0", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-grandpa", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 21.0.0", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11473,7 +11810,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "finality-grandpa", "futures", @@ -11484,16 +11821,16 @@ dependencies = [ "sc-consensus-grandpa", "sc-rpc", "serde", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "thiserror", ] [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "futures", @@ -11503,48 +11840,48 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", + "sp-arithmetic 16.0.0", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-ver", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", ] [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmtime", "schnellru", - "sp-api", - "sp-core", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", - "sp-trie", - "sp-version", - "sp-wasm-interface", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-io 23.0.0", + "sp-panic-handler 8.0.0", + "sp-runtime-interface 17.0.0", + "sp-trie 22.0.0", + "sp-version 22.0.0", + "sp-wasm-interface 14.0.0", "tracing", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "thiserror", "wasm-instrument", ] @@ -11552,7 +11889,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "anyhow", "cfg-if", @@ -11561,15 +11898,15 @@ dependencies = [ "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmtime", + "sp-runtime-interface 17.0.0", + "sp-wasm-interface 14.0.0", + "wasmtime 8.0.1", ] [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "ansi_term", "futures", @@ -11578,30 +11915,30 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", - "sp-blockchain", - "sp-runtime", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", ] [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "parking_lot 0.12.1", "serde_json", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 23.0.0", + "sp-core 21.0.0", + "sp-keystore 0.27.0", "thiserror", ] [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "async-channel", "async-trait", "asynchronous-codec", @@ -11626,10 +11963,10 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-arithmetic 16.0.0", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", @@ -11640,7 +11977,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-channel", "cid", @@ -11651,8 +11988,8 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sp-blockchain", - "sp-runtime", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", "thiserror", "unsigned-varint", ] @@ -11660,7 +11997,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -11669,15 +12006,15 @@ dependencies = [ "parity-scale-codec", "prost-build", "sc-consensus", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-grandpa", - "sp-runtime", + "sp-runtime 24.0.0", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "ahash 0.8.6", "futures", @@ -11687,7 +12024,7 @@ dependencies = [ "sc-network", "sc-network-common", "schnellru", - "sp-runtime", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", "tracing", ] @@ -11695,9 +12032,9 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "async-channel", "futures", "libp2p-identity", @@ -11707,18 +12044,18 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "thiserror", ] [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "async-channel", "async-trait", "fork-tree", @@ -11737,12 +12074,12 @@ dependencies = [ "sc-utils", "schnellru", "smallvec", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", + "sp-arithmetic 16.0.0", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11750,9 +12087,9 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "futures", "libp2p", "log", @@ -11760,17 +12097,17 @@ dependencies = [ "sc-network", "sc-network-common", "sc-utils", - "sp-consensus", - "sp-runtime", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", "substrate-prometheus-endpoint", ] [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "bytes", "fnv", "futures", @@ -11789,12 +12126,12 @@ dependencies = [ "sc-network-common", "sc-transaction-pool-api", "sc-utils", - "sp-api", - "sp-core", - "sp-externalities", - "sp-keystore", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-keystore 0.27.0", "sp-offchain", - "sp-runtime", + "sp-runtime 24.0.0", "threadpool", "tracing", ] @@ -11802,7 +12139,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -11811,7 +12148,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "jsonrpsee", @@ -11826,23 +12163,23 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-keystore", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-keystore 0.27.0", "sp-offchain", - "sp-rpc", - "sp-runtime", + "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", "sp-session", "sp-statement-store", - "sp-version", + "sp-version 22.0.0", "tokio", ] [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -11851,17 +12188,17 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-version", + "sp-core 21.0.0", + "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-version 22.0.0", "thiserror", ] [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "http", "jsonrpsee", @@ -11876,9 +12213,9 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "futures", "futures-util", "hex", @@ -11891,11 +12228,11 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-version", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-version 22.0.0", "thiserror", "tokio", "tokio-stream", @@ -11904,7 +12241,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "directories", @@ -11943,20 +12280,20 @@ dependencies = [ "sc-utils", "serde", "serde_json", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", "sp-session", - "sp-state-machine", - "sp-storage", + "sp-state-machine 0.28.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie", - "sp-version", + "sp-trie 22.0.0", + "sp-version 22.0.0", "static_init", "substrate-prometheus-endpoint", "tempfile", @@ -11964,30 +12301,30 @@ dependencies = [ "tokio", "tracing", "tracing-futures", - "ver-api", + "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", ] [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", + "sp-core 21.0.0", ] [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "clap", "fs4", "log", "sc-client-db", - "sp-core", + "sp-core 21.0.0", "thiserror", "tokio", ] @@ -11995,7 +12332,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -12006,15 +12343,15 @@ dependencies = [ "sc-consensus-grandpa", "serde", "serde_json", - "sp-blockchain", - "sp-runtime", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", "thiserror", ] [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "libc", @@ -12025,15 +12362,15 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core", - "sp-io", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-std 8.0.0", ] [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "chrono", "futures", @@ -12052,7 +12389,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "ansi_term", "atty", @@ -12066,12 +12403,12 @@ dependencies = [ "sc-client-api", "sc-tracing-proc-macro", "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-tracing", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-tracing 10.0.0", "thiserror", "tracing", "tracing-log", @@ -12081,7 +12418,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12092,7 +12429,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "futures", @@ -12105,11 +12442,11 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-tracing", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-tracing 10.0.0", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -12118,23 +12455,23 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "futures", "log", "parity-scale-codec", "serde", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "thiserror", ] [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-channel", "futures", @@ -12143,7 +12480,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic", + "sp-arithmetic 16.0.0", ] [[package]] @@ -12372,6 +12709,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "serde" version = "1.0.192" @@ -12607,13 +12950,13 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] @@ -12697,7 +13040,7 @@ dependencies = [ "smallvec", "soketto", "twox-hash", - "wasmi", + "wasmi 0.31.0", "x25519-dalek 2.0.0", "zeroize", ] @@ -12801,28 +13144,46 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "hash-db", "log", "parity-scale-codec", "scale-info", - "sp-api-proc-macro", - "sp-core", - "sp-externalities", + "sp-api-proc-macro 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-externalities 0.19.0", "sp-metadata-ir", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "sp-version", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "sp-std 8.0.0", + "sp-trie 22.0.0", + "sp-version 22.0.0", + "thiserror", +] + +[[package]] +name = "sp-api" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "sp-api-proc-macro 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-core 7.0.0", + "sp-runtime 7.0.0", + "sp-state-machine 0.13.0", + "sp-std 5.0.0", + "sp-trie 7.0.0", + "sp-version 5.0.0", "thiserror", ] [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "Inflector", "blake2", @@ -12834,180 +13195,310 @@ dependencies = [ ] [[package]] -name = "sp-application-crypto" -version = "23.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +name = "sp-api-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "Inflector", + "blake2", + "expander 1.0.0", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp-application-crypto" +version = "7.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 7.0.0", + "sp-io 7.0.0", + "sp-std 5.0.0", +] + +[[package]] +name = "sp-application-crypto" +version = "23.0.0" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-arithmetic" +version = "6.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 5.0.0", + "static_assertions", ] [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0", "static_assertions", ] [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api", - "sp-application-crypto", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-block-builder" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" +dependencies = [ + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", + "parity-scale-codec", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-runtime 7.0.0", + "sp-std 5.0.0", ] [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "futures", "log", "parity-scale-codec", "parking_lot 0.12.1", "schnellru", - "sp-api", - "sp-consensus", - "sp-database", - "sp-runtime", - "sp-state-machine", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-database 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "thiserror", +] + +[[package]] +name = "sp-blockchain" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "futures", + "log", + "lru 0.8.1", + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-database 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-runtime 7.0.0", + "sp-state-machine 0.13.0", "thiserror", ] [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "futures", "log", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "thiserror", +] + +[[package]] +name = "sp-consensus" +version = "0.10.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "async-trait", + "futures", + "log", + "sp-core 7.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-runtime 7.0.0", + "sp-state-machine 0.13.0", "thiserror", ] [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api", - "sp-application-crypto", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", "sp-consensus-slots", - "sp-inherents", - "sp-runtime", - "sp-std", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-application-crypto", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "lazy_static", "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", "sp-mmr-primitives", - "sp-runtime", - "sp-std", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "strum 0.24.1", ] [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "finality-grandpa", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-core 21.0.0", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] +[[package]] +name = "sp-core" +version = "7.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "array-bytes 4.2.0", + "base58", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "dyn-clonable", + "ed25519-zebra 3.1.0", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin 2.0.1", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.12.1", + "primitive-types", + "rand 0.8.5", + "regex", + "scale-info", + "schnorrkel 0.9.1", + "secp256k1", + "secrecy", + "serde", + "sp-core-hashing 5.0.0", + "sp-debug-derive 5.0.0", + "sp-externalities 0.13.0", + "sp-runtime-interface 7.0.0", + "sp-std 5.0.0", + "sp-storage 7.0.0", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tiny-bip39", + "zeroize", +] + [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "arrayvec 0.7.4", "bandersnatch_vrfs", "bitflags 1.3.2", @@ -13035,12 +13526,12 @@ dependencies = [ "secp256k1", "secrecy", "serde", - "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-core-hashing 9.0.0", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "ss58-registry", "substrate-bip39", "thiserror", @@ -13049,10 +13540,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-core-hashing" +version = "5.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.8", + "sha3", + "sp-std 5.0.0", + "twox-hash", +] + [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "blake2b_simd", "byteorder", @@ -13062,75 +13567,156 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "sp-core-hashing-proc-macro" +version = "5.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "proc-macro2", + "quote", + "sp-core-hashing 5.0.0", + "syn 1.0.109", +] + [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "quote", - "sp-core-hashing", + "sp-core-hashing 9.0.0", "syn 2.0.39", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" +dependencies = [ + "kvdb", + "parking_lot 0.12.1", +] + +[[package]] +name = "sp-database" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "kvdb", "parking_lot 0.12.1", ] +[[package]] +name = "sp-debug-derive" +version = "5.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "proc-macro2", "quote", "syn 2.0.39", ] +[[package]] +name = "sp-externalities" +version = "0.13.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 5.0.0", + "sp-storage 7.0.0", +] + [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", ] [[package]] name = "sp-genesis-builder" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "serde_json", - "sp-api", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-inherents" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "thiserror", ] [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-core 7.0.0", + "sp-runtime 7.0.0", + "sp-std 5.0.0", "thiserror", ] +[[package]] +name = "sp-io" +version = "7.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "bytes", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", + "futures", + "libsecp256k1", + "log", + "parity-scale-codec", + "secp256k1", + "sp-core 7.0.0", + "sp-externalities 0.13.0", + "sp-keystore 0.13.0", + "sp-runtime-interface 7.0.0", + "sp-state-machine 0.13.0", + "sp-std 5.0.0", + "sp-tracing 6.0.0", + "sp-trie 7.0.0", + "tracing", + "tracing-core", +] + [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bytes", "ed25519-dalek 2.0.0", @@ -13139,14 +13725,14 @@ dependencies = [ "parity-scale-codec", "rustversion", "secp256k1", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-trie", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-keystore 0.27.0", + "sp-runtime-interface 17.0.0", + "sp-state-machine 0.28.0", + "sp-std 8.0.0", + "sp-tracing 10.0.0", + "sp-trie 22.0.0", "tracing", "tracing-core", ] @@ -13154,30 +13740,47 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "lazy_static", - "sp-core", - "sp-runtime", + "sp-core 21.0.0", + "sp-runtime 24.0.0", "strum 0.24.1", ] +[[package]] +name = "sp-keystore" +version = "0.13.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "async-trait", + "futures", + "merlin 2.0.1", + "parity-scale-codec", + "parking_lot 0.12.1", + "schnorrkel 0.9.1", + "serde", + "sp-core 7.0.0", + "sp-externalities 0.13.0", + "thiserror", +] + [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", - "sp-externalities", + "sp-core 21.0.0", + "sp-externalities 0.19.0", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "thiserror", "zstd 0.12.4", @@ -13186,60 +13789,70 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "ckb-merkle-mountain-range", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-core", - "sp-debug-derive", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-debug-derive 8.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "sp-api", - "sp-core", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", +] + +[[package]] +name = "sp-panic-handler" +version = "5.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "backtrace", + "lazy_static", + "regex", ] [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "backtrace", "lazy_static", @@ -13249,17 +13862,50 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "rustc-hash", "serde", - "sp-core", + "sp-core 21.0.0", +] + +[[package]] +name = "sp-rpc" +version = "6.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "rustc-hash", + "serde", + "sp-core 7.0.0", +] + +[[package]] +name = "sp-runtime" +version = "7.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "parity-util-mem", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "sp-application-crypto 7.0.0", + "sp-arithmetic 6.0.0", + "sp-core 7.0.0", + "sp-io 7.0.0", + "sp-std 5.0.0", + "sp-weights 4.0.0", ] [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "either", "hash256-std-hasher", @@ -13271,36 +13917,66 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-std", - "sp-weights", + "sp-application-crypto 23.0.0", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-std 8.0.0", + "sp-weights 20.0.0", +] + +[[package]] +name = "sp-runtime-interface" +version = "7.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.13.0", + "sp-runtime-interface-proc-macro 6.0.0", + "sp-std 5.0.0", + "sp-storage 7.0.0", + "sp-tracing 6.0.0", + "sp-wasm-interface 7.0.0", + "static_assertions", ] [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.19.0", + "sp-runtime-interface-proc-macro 11.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", + "sp-wasm-interface 14.0.0", "static_assertions", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "6.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "Inflector", "proc-macro-crate", @@ -13312,36 +13988,68 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", ] [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-staking" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core 7.0.0", + "sp-runtime 7.0.0", + "sp-std 5.0.0", +] + +[[package]] +name = "sp-state-machine" +version = "0.13.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec", + "sp-core 7.0.0", + "sp-externalities 0.13.0", + "sp-panic-handler 5.0.0", + "sp-std 5.0.0", + "sp-trie 7.0.0", + "thiserror", + "tracing", ] [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "hash-db", "log", @@ -13349,11 +14057,11 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "smallvec", - "sp-core", - "sp-externalities", - "sp-panic-handler", - "sp-std", - "sp-trie", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-panic-handler 8.0.0", + "sp-std 8.0.0", + "sp-trie 22.0.0", "thiserror", "tracing", "trie-db", @@ -13362,7 +14070,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "aes-gcm 0.10.3", "curve25519-dalek 4.1.1", @@ -13372,55 +14080,85 @@ dependencies = [ "rand 0.8.5", "scale-info", "sha2 0.10.8", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-externalities", - "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-runtime 24.0.0", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", "thiserror", "x25519-dalek 2.0.0", ] +[[package]] +name = "sp-std" +version = "5.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" + [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" + +[[package]] +name = "sp-storage" +version = "7.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 5.0.0", + "sp-std 5.0.0", +] [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents", - "sp-runtime", - "sp-std", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "thiserror", ] +[[package]] +name = "sp-tracing" +version = "6.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "parity-scale-codec", + "sp-std 5.0.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 8.0.0", "tracing", "tracing-core", "tracing-subscriber", @@ -13429,31 +14167,54 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "sp-api", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", ] [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-trie 22.0.0", +] + +[[package]] +name = "sp-trie" +version = "7.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "ahash 0.8.6", + "hash-db", + "hashbrown 0.12.3", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "scale-info", + "schnellru", + "sp-core 7.0.0", + "sp-std 5.0.0", + "thiserror", + "tracing", + "trie-db", + "trie-root", ] [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "ahash 0.8.6", "hash-db", @@ -13465,8 +14226,8 @@ dependencies = [ "parking_lot 0.12.1", "scale-info", "schnellru", - "sp-core", - "sp-std", + "sp-core 21.0.0", + "sp-std 8.0.0", "thiserror", "tracing", "trie-db", @@ -13476,41 +14237,87 @@ dependencies = [ [[package]] name = "sp-ver" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "schnorrkel 0.9.1", "serde", - "sp-core", - "sp-inherents", - "sp-keystore", - "sp-runtime", - "sp-std", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-keystore 0.27.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-ver" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "async-trait", + "log", + "parity-scale-codec", + "scale-info", + "schnorrkel 0.9.1", + "serde", + "sp-core 7.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-keystore 0.13.0", + "sp-runtime 7.0.0", + "sp-std 5.0.0", +] + +[[package]] +name = "sp-version" +version = "5.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-core-hashing-proc-macro 5.0.0", + "sp-runtime 7.0.0", + "sp-std 5.0.0", + "sp-version-proc-macro 4.0.0-dev", + "thiserror", ] [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "impl-serde", "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro", - "sp-runtime", - "sp-std", - "sp-version-proc-macro", + "sp-core-hashing-proc-macro 9.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-version-proc-macro 8.0.0", "thiserror", ] +[[package]] +name = "sp-version-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -13518,32 +14325,61 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "sp-wasm-interface" +version = "7.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 5.0.0", + "wasmi 0.13.2", + "wasmtime 6.0.2", +] + [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", - "wasmtime", + "sp-std 8.0.0", + "wasmtime 8.0.1", +] + +[[package]] +name = "sp-weights" +version = "4.0.0" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 6.0.0", + "sp-core 7.0.0", + "sp-debug-derive 5.0.0", + "sp-std 5.0.0", ] [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", ] [[package]] @@ -13613,15 +14449,15 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-kusama-runtime" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "binary-merkle-tree", "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -13689,26 +14525,26 @@ dependencies = [ "serde", "serde_derive", "smallvec", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", + "sp-arithmetic 16.0.0", "sp-authority-discovery", - "sp-block-builder", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-staking", - "sp-std", - "sp-storage", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", - "sp-version", + "sp-version 22.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -13719,7 +14555,7 @@ dependencies = [ [[package]] name = "staging-xcm" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "bounded-collections", "derivative", @@ -13729,28 +14565,28 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights", + "sp-weights 20.0.0", "xcm-procedural", ] [[package]] name = "staging-xcm-builder" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", "log", "pallet-transaction-payment", "parity-scale-codec", "polkadot-parachain-primitives", "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", + "sp-arithmetic 16.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-weights 20.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -13758,20 +14594,20 @@ dependencies = [ [[package]] name = "staging-xcm-executor" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "environmental", "frame-benchmarking", - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-weights 20.0.0", "staging-xcm", ] @@ -13891,12 +14727,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -13905,17 +14741,17 @@ dependencies = [ "parity-scale-codec", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", ] [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "hyper", "log", @@ -13927,37 +14763,37 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "jsonrpsee", "log", "sc-rpc-api", "serde", - "sp-runtime", + "sp-runtime 24.0.0", ] [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "jsonrpsee", "parity-scale-codec", "sc-client-api", "sc-rpc-api", "serde", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", + "sp-trie 22.0.0", "trie-db", ] [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "ansi_term", "build-helper", @@ -14499,7 +15335,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "coarsetime", "polkadot-node-jaeger", @@ -14511,7 +15347,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "expander 2.0.0", "proc-macro-crate", @@ -14641,7 +15477,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "async-trait", "clap", @@ -14654,22 +15490,22 @@ dependencies = [ "sc-executor", "serde", "serde_json", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-aura", "sp-consensus-babe", - "sp-core", - "sp-debug-derive", - "sp-externalities", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-rpc", - "sp-runtime", - "sp-state-machine", + "sp-core 21.0.0", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", + "sp-keystore 0.27.0", + "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-state-machine 0.28.0", "sp-timestamp", "sp-transaction-storage-proof", - "sp-version", - "sp-weights", + "sp-version 22.0.0", + "sp-weights 20.0.0", "substrate-rpc-client", "zstd 0.12.4", ] @@ -14859,19 +15695,37 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "ver-api" version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "derive_more", "futures", "log", "parity-scale-codec", "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-std", - "sp-ver", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", +] + +[[package]] +name = "ver-api" +version = "4.0.0-dev" +source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +dependencies = [ + "derive_more", + "futures", + "log", + "parity-scale-codec", + "serde", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-core 7.0.0", + "sp-runtime 7.0.0", + "sp-std 5.0.0", + "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", ] [[package]] @@ -15062,6 +15916,17 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmi" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" +dependencies = [ + "parity-wasm", + "wasmi-validation", + "wasmi_core 0.2.1", +] + [[package]] name = "wasmi" version = "0.31.0" @@ -15071,16 +15936,38 @@ dependencies = [ "smallvec", "spin 0.9.8", "wasmi_arena", - "wasmi_core", + "wasmi_core 0.13.0", "wasmparser-nostd", ] +[[package]] +name = "wasmi-validation" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" +dependencies = [ + "parity-wasm", +] + [[package]] name = "wasmi_arena" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" +[[package]] +name = "wasmi_core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" +dependencies = [ + "downcast-rs", + "libm 0.2.8", + "memory_units", + "num-rational", + "num-traits", +] + [[package]] name = "wasmi_core" version = "0.13.0" @@ -15093,6 +15980,16 @@ dependencies = [ "paste", ] +[[package]] +name = "wasmparser" +version = "0.100.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" +dependencies = [ + "indexmap 1.9.3", + "url", +] + [[package]] name = "wasmparser" version = "0.102.0" @@ -15112,6 +16009,31 @@ dependencies = [ "indexmap-nostd", ] +[[package]] +name = "wasmtime" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" +dependencies = [ + "anyhow", + "bincode", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "object 0.29.0", + "once_cell", + "paste", + "psm", + "serde", + "target-lexicon", + "wasmparser 0.100.0", + "wasmtime-environ 6.0.2", + "wasmtime-jit 6.0.2", + "wasmtime-runtime 6.0.2", + "windows-sys 0.42.0", +] + [[package]] name = "wasmtime" version = "8.0.1" @@ -15131,15 +16053,24 @@ dependencies = [ "rayon", "serde", "target-lexicon", - "wasmparser", + "wasmparser 0.102.0", "wasmtime-cache", "wasmtime-cranelift", - "wasmtime-environ", - "wasmtime-jit", - "wasmtime-runtime", + "wasmtime-environ 8.0.1", + "wasmtime-jit 8.0.1", + "wasmtime-runtime 8.0.1", "windows-sys 0.45.0", ] +[[package]] +name = "wasmtime-asm-macros" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" +dependencies = [ + "cfg-if", +] + [[package]] name = "wasmtime-asm-macros" version = "8.0.1" @@ -15177,7 +16108,7 @@ checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", - "cranelift-entity", + "cranelift-entity 0.95.1", "cranelift-frontend", "cranelift-native", "cranelift-wasm", @@ -15186,9 +16117,9 @@ dependencies = [ "object 0.30.4", "target-lexicon", "thiserror", - "wasmparser", + "wasmparser 0.102.0", "wasmtime-cranelift-shared", - "wasmtime-environ", + "wasmtime-environ 8.0.1", ] [[package]] @@ -15203,7 +16134,26 @@ dependencies = [ "gimli 0.27.3", "object 0.30.4", "target-lexicon", - "wasmtime-environ", + "wasmtime-environ 8.0.1", +] + +[[package]] +name = "wasmtime-environ" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" +dependencies = [ + "anyhow", + "cranelift-entity 0.93.2", + "gimli 0.26.2", + "indexmap 1.9.3", + "log", + "object 0.29.0", + "serde", + "target-lexicon", + "thiserror", + "wasmparser 0.100.0", + "wasmtime-types 6.0.2", ] [[package]] @@ -15213,7 +16163,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", - "cranelift-entity", + "cranelift-entity 0.95.1", "gimli 0.27.3", "indexmap 1.9.3", "log", @@ -15221,8 +16171,31 @@ dependencies = [ "serde", "target-lexicon", "thiserror", - "wasmparser", - "wasmtime-types", + "wasmparser 0.102.0", + "wasmtime-types 8.0.1", +] + +[[package]] +name = "wasmtime-jit" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" +dependencies = [ + "addr2line 0.17.0", + "anyhow", + "bincode", + "cfg-if", + "cpp_demangle", + "gimli 0.26.2", + "log", + "object 0.29.0", + "rustc-demangle", + "serde", + "target-lexicon", + "wasmtime-environ 6.0.2", + "wasmtime-jit-icache-coherence 6.0.2", + "wasmtime-runtime 6.0.2", + "windows-sys 0.42.0", ] [[package]] @@ -15242,13 +16215,22 @@ dependencies = [ "rustc-demangle", "serde", "target-lexicon", - "wasmtime-environ", - "wasmtime-jit-debug", - "wasmtime-jit-icache-coherence", - "wasmtime-runtime", + "wasmtime-environ 8.0.1", + "wasmtime-jit-debug 8.0.1", + "wasmtime-jit-icache-coherence 8.0.1", + "wasmtime-runtime 8.0.1", "windows-sys 0.45.0", ] +[[package]] +name = "wasmtime-jit-debug" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" +dependencies = [ + "once_cell", +] + [[package]] name = "wasmtime-jit-debug" version = "8.0.1" @@ -15260,6 +16242,17 @@ dependencies = [ "rustix 0.36.17", ] +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.42.0", +] + [[package]] name = "wasmtime-jit-icache-coherence" version = "8.0.1" @@ -15271,6 +16264,30 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "wasmtime-runtime" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "mach", + "memfd", + "memoffset 0.6.5", + "paste", + "rand 0.8.5", + "rustix 0.36.17", + "wasmtime-asm-macros 6.0.2", + "wasmtime-environ 6.0.2", + "wasmtime-jit-debug 6.0.2", + "windows-sys 0.42.0", +] + [[package]] name = "wasmtime-runtime" version = "8.0.1" @@ -15289,22 +16306,34 @@ dependencies = [ "paste", "rand 0.8.5", "rustix 0.36.17", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-jit-debug", + "wasmtime-asm-macros 8.0.1", + "wasmtime-environ 8.0.1", + "wasmtime-jit-debug 8.0.1", "windows-sys 0.45.0", ] +[[package]] +name = "wasmtime-types" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" +dependencies = [ + "cranelift-entity 0.93.2", + "serde", + "thiserror", + "wasmparser 0.100.0", +] + [[package]] name = "wasmtime-types" version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ - "cranelift-entity", + "cranelift-entity 0.95.1", "serde", "thiserror", - "wasmparser", + "wasmparser 0.102.0", ] [[package]] @@ -15563,15 +16592,15 @@ dependencies = [ [[package]] name = "westend-runtime" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "binary-merkle-tree", "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -15633,25 +16662,25 @@ dependencies = [ "serde", "serde_derive", "smallvec", - "sp-api", - "sp-application-crypto", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto 23.0.0", "sp-authority-discovery", - "sp-block-builder", + "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", + "sp-core 21.0.0", + "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-io 23.0.0", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-runtime", + "sp-runtime 24.0.0", "sp-session", - "sp-staking", - "sp-std", - "sp-storage", + "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", - "sp-version", + "sp-version 22.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -15662,15 +16691,15 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-weights 20.0.0", ] [[package]] @@ -15751,6 +16780,21 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -15974,14 +17018,14 @@ dependencies = [ [[package]] name = "xcm-emulator" version = "0.1.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "impl-trait-for-tuples", "lazy_static", "log", @@ -15993,12 +17037,12 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -16006,7 +17050,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "1.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=develop#2efab3ddc56a2ed1cec346cd6f79e85e895e8444" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "Inflector", "proc-macro2", @@ -16021,12 +17065,12 @@ dependencies = [ "jsonrpsee", "parity-scale-codec", "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-runtime 24.0.0", + "sp-std 8.0.0", "xyk-runtime-api", ] @@ -16034,16 +17078,16 @@ dependencies = [ name = "xyk-runtime-api" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", "parity-scale-codec", "scale-info", "serde", "serde_json", - "sp-api", - "sp-core", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-std 8.0.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index b3d6632527..711622f154 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,280 +30,280 @@ members = [ # but mangata-node uses `polkadot-sdk/develop` so we need to patch to use the same refs # patch generated by './scripts/dev_manifest.sh ../polkadot-sdk' & replaced local path with `develop` branch on polkadot-sdk [patch."https://github.com/mangata-finance/polkadot-sdk"] -pallet-whitelist = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-referenda = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-indices = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-offences = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-transaction-payment = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-asset-tx-payment = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-collective-mangata = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-proxy = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-identity = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-conviction-voting = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-sudo-mangata = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -mangata-support = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-child-bounties = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-beefy-mmr = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-collective = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-recovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-preimage = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-multisig = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-scheduler = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-nomination-pools = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-society = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-utility-mangata = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-authorship = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-bounties = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-fast-unstake = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-grandpa = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-ranked-collective = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-vesting-mangata = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-system = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-system-benchmarking = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-mmr = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-vesting = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-support = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-support-procedural = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-support-procedural-tools = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-authority-discovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-im-online = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-staking = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-staking-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-bags-list = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-election-provider-support = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-tips = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-balances = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-message-queue = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-nis = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-state-trie-migration = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-beefy = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-aura = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-sudo = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-benchmarking = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-treasury = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-try-runtime = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-timestamp = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-babe = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-elections-phragmen = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-assets = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-democracy = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-membership = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-root-testing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-utility = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-executive = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-session = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -substrate-wasm-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -fork-tree = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -substrate-build-script-utils = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-remote-externalities = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -frame-benchmarking-cli = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -try-runtime-cli = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -substrate-rpc-client = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -binary-merkle-tree = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-database = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-runtime-interface = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-consensus-grandpa = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-consensus = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-consensus-beefy = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-consensus-aura = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-consensus-babe = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-consensus-slots = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-tracing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-ver = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-core = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-core-hashing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-state-machine = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-keystore = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-metadata-ir = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-statement-store = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-weights = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-io = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-runtime = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-inherents = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-transaction-pool = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-std = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-storage = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-panic-handler = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-debug-derive = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-blockchain = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-externalities = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-trie = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-mmr-primitives = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -mangata-types = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-version = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-version-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-authority-discovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-block-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-keyring = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-staking = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-wasm-interface = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -extrinsic-shuffler = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-arithmetic = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-api-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-offchain = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-timestamp = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-application-crypto = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -ver-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-npos-elections = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-genesis-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sp-session = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-consensus-grandpa = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-consensus-grandpa-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-consensus = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-consensus-epochs = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-consensus-beefy = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-consensus-beefy-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-consensus-aura = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-consensus-babe = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-consensus-slots = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-tracing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-state-db = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-proposer-metrics = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-keystore = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-rpc-server = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-network = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-network-bitswap = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-network-transactions = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-network-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-network-light = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-network-sync = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-informant = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-transaction-pool = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-transaction-pool-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-utils = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-cli = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-chain-spec = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-chain-spec-derive = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-sync-state-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-basic-authorship = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-block-builder-ver = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -mmr-gadget = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -mmr-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-storage-monitor = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-authority-discovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-block-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-allocator = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-network-gossip = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-client-db = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-client-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-sysinfo = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-executor = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-executor-wasmtime = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-executor-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-telemetry = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-offchain = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-service = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -sc-rpc-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -xcm-emulator = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-primitives-core = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-primitives-aura = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-primitives-timestamp = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-primitives-utility = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-pallet-xcm = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-pallet-dmp-queue = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-pallet-aura-ext = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-pallet-session-benchmarking = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-pallet-parachain-system = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-pallet-parachain-system-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-collator-selection = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-client-consensus-proposer = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-client-consensus-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-client-consensus-relay-chain = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-client-consensus-aura = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-relay-chain-minimal-node = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-relay-chain-interface = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-client-network = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-client-cli = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-client-pov-recovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-client-collator = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-client-service = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -parachains-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -parachain-info = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-parachain-primitives = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -staging-xcm = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -staging-xcm-executor = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -staging-xcm-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -xcm-procedural = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -pallet-xcm = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-statement-table = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-erasure-coding = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-runtime-metrics = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -rococo-runtime = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -rococo-runtime-constants = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -staging-kusama-runtime = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -kusama-runtime-constants = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-runtime-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -slot-range-helper = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -westend-runtime-constants = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-runtime-constants = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-runtime-parachains = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-cli = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-primitives = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-metrics = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -tracing-gum = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -tracing-gum-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-candidate-validation = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-prospective-parachains = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-parachains-inherent = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-av-store = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-approval-voting = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-pvf = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-pvf-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-dispute-coordinator = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-chain-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-backing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-provisioner = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-chain-selection = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-bitfield-signing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-core-pvf-checker = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-subsystem-types = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-collation-generation = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-jaeger = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-availability-bitfield-distribution = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-gossip-support = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-network-bridge = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-network-protocol = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-approval-distribution = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-statement-distribution = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-availability-distribution = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-availability-recovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-collator-protocol = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-dispute-distribution = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-primitives = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-subsystem = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-node-subsystem-util = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-service = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-overseer = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } -polkadot-core-primitives = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "develop" } +pallet-whitelist = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-referenda = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-indices = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-offences = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-asset-tx-payment = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-collective-mangata = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-proxy = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-identity = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-conviction-voting = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-sudo-mangata = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +mangata-support = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-child-bounties = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-beefy-mmr = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-collective = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-recovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-preimage = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-multisig = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-scheduler = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-society = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-utility-mangata = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-authorship = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-bounties = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-fast-unstake = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-transaction-payment-mangata-rpc-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-grandpa = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-ranked-collective = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-vesting-mangata = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-system = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-system-benchmarking = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-system-rpc-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-mmr = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-vesting = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-support = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-support-procedural = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-support-procedural-tools-derive = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-authority-discovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-im-online = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-staking = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-staking-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-staking-reward-fn = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-bags-list = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-election-provider-support = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-election-provider-solution-type = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-tips = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-balances = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-message-queue = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-nis = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-state-trie-migration = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-beefy = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-aura = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-sudo = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-benchmarking = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-treasury = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-try-runtime = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-timestamp = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-babe = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-elections-phragmen = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-assets = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-election-provider-multi-phase = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-democracy = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-membership = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-root-testing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-utility = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-executive = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-session = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +substrate-wasm-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +fork-tree = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +substrate-build-script-utils = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-remote-externalities = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +frame-benchmarking-cli = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +try-runtime-cli = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +substrate-frame-rpc-system = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +substrate-state-trie-migration-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +substrate-rpc-client = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +binary-merkle-tree = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-database = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-runtime-interface = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-runtime-interface-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-consensus-grandpa = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-consensus = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-consensus-beefy = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-consensus-aura = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-consensus-babe = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-consensus-slots = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-tracing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-ver = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-maybe-compressed-blob = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-core = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-core-hashing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-core-hashing-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-state-machine = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-keystore = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-metadata-ir = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-statement-store = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-weights = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-io = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-runtime = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-inherents = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-transaction-pool = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-std = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-storage = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-panic-handler = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-debug-derive = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-blockchain = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-externalities = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-trie = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-mmr-primitives = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +mangata-types = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-version = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-version-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-authority-discovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-block-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-keyring = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-staking = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-wasm-interface = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-transaction-storage-proof = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +extrinsic-shuffler = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-arithmetic = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-api-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-offchain = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-timestamp = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-application-crypto = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +ver-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-npos-elections = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-genesis-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sp-session = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-consensus-grandpa = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-consensus-grandpa-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-consensus = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-consensus-epochs = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-consensus-beefy = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-consensus-beefy-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-consensus-aura = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-consensus-babe = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-consensus-babe-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-consensus-slots = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-tracing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-tracing-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-rpc-spec-v2 = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-state-db = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-proposer-metrics = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-keystore = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-basic-authorship-ver = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-rpc-server = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-network = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-network-bitswap = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-network-transactions = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-network-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-network-light = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-network-sync = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-informant = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-transaction-pool = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-transaction-pool-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-utils = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-cli = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-chain-spec = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-chain-spec-derive = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-sync-state-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-basic-authorship = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-block-builder-ver = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +mmr-gadget = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +mmr-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-storage-monitor = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-authority-discovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-block-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-allocator = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-network-gossip = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-client-db = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-client-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-sysinfo = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-executor = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-executor-wasmtime = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-executor-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-telemetry = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-offchain = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-service = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +sc-rpc-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +xcm-emulator = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-primitives-core = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-primitives-aura = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-primitives-timestamp = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-primitives-utility = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-pallet-xcm = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-pallet-dmp-queue = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-pallet-aura-ext = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-pallet-session-benchmarking = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-pallet-parachain-system = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-pallet-parachain-system-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-collator-selection = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-client-consensus-proposer = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-client-consensus-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-client-consensus-relay-chain = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-client-consensus-aura = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-relay-chain-interface = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-client-network = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-client-cli = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-client-pov-recovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-client-collator = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-client-service = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +parachains-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +parachain-info = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-parachain-primitives = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +staging-xcm = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +staging-xcm-executor = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +staging-xcm-builder = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +xcm-procedural = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +pallet-xcm = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-statement-table = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-erasure-coding = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-runtime-metrics = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +rococo-runtime = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +rococo-runtime-constants = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +staging-kusama-runtime = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +kusama-runtime-constants = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-runtime-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +slot-range-helper = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +westend-runtime-constants = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-runtime-constants = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-runtime-parachains = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-cli = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-primitives = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-metrics = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +tracing-gum = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +tracing-gum-proc-macro = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-candidate-validation = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-prospective-parachains = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-runtime-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-parachains-inherent = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-av-store = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-approval-voting = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-pvf = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-pvf-common = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-dispute-coordinator = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-chain-api = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-backing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-provisioner = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-chain-selection = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-bitfield-signing = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-core-pvf-checker = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-subsystem-types = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-collation-generation = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-jaeger = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-availability-bitfield-distribution = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-gossip-support = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-network-bridge = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-network-protocol = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-approval-distribution = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-statement-distribution = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-availability-distribution = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-availability-recovery = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-collator-protocol = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-dispute-distribution = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-primitives = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-subsystem = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-node-subsystem-util = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-service = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-overseer = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-rpc = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } +polkadot-core-primitives = { git = "https://github.com/mangata-finance//polkadot-sdk", branch = "feature/3rdparty-rewards" } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 80da55b1ce..70617fd90d 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -96,17 +96,16 @@ use frame_support::pallet_prelude::*; pub type ScheduleId = u64; #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub struct Schedule { +pub struct Schedule { scheduled_at: u64, last_session: u64, - liq_token: TokenId, - reward_token: TokenId, - amount_per_session: Balance, + liq_token: CurrencyIdOf, + reward_token: CurrencyIdOf, + amount_per_session: BalanceOf, } -use frame_benchmarking::Zero; use frame_support::{ - dispatch::{DispatchError, DispatchErrorWithPostInfo, DispatchResult, PostDispatchInfo}, + dispatch::{DispatchErrorWithPostInfo, DispatchResult, PostDispatchInfo}, ensure, storage::bounded_btree_map::BoundedBTreeMap, traits::Nothing, @@ -121,6 +120,7 @@ use frame_support::{ traits::{tokens::currency::MultiTokenCurrency, ExistenceRequirement, Get}, transactional, }; + use frame_system::pallet_prelude::*; use mangata_support::traits::{ ActivationReservesProviderTrait, LiquidityMiningApi, ProofOfStakeRewardsApi, XykFunctionsTrait, @@ -174,23 +174,24 @@ pub use weights::WeightInfo; type AccountIdOf = ::AccountId; -type BalanceOf = <::Currency as MultiTokenCurrency< +type BalanceOf = <::Currency as MultiTokenCurrency< ::AccountId, >>::Balance; -type CurrencyIdOf = <::Currency as MultiTokenCurrency< +type CurrencyIdOf = <::Currency as MultiTokenCurrency< ::AccountId, >>::CurrencyId; + /// - `LiquidityMining` - already activated liquidity (for liquidity mining rewards) #[derive(Eq, PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] -pub enum ThirdPartyActivationKind { +pub enum ThirdPartyActivationKind { ActivateKind(Option), - ActivatedLiquidity(TokenId), + ActivatedLiquidity(CurrencyId), LiquidityMining, } ->>::CurrencyId; - +const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!"); +pub type SessionId = u64; #[frame_support::pallet] pub mod pallet { use frame_support::traits::Currency; @@ -202,8 +203,9 @@ pub mod pallet { pub struct Pallet(PhantomData); #[pallet::hooks] - impl Hooks for Pallet {} - fn on_initialize(_n: T::BlockNumber) -> Weight { + + impl Hooks> for Pallet { + fn on_initialize(_n: BlockNumberFor) -> Weight { let session_id = Self::session_index() as u64; // NOTE: 1R @@ -318,15 +320,11 @@ pub mod pallet { impl PoSBenchmarkingConfig for T {} #[cfg(not(feature = "runtime-benchmarks"))] - pub trait ValutationApiTrait: - Valuate - { - } + pub trait ValutationApiTrait: Valuate, CurrencyIdOf> {} #[cfg(feature = "runtime-benchmarks")] pub trait ValutationApiTrait: - Valuate - + XykFunctionsTrait + Valuate, CurrencyIdOf> + XykFunctionsTrait { } @@ -334,7 +332,7 @@ pub mod pallet { impl ValutationApiTrait for T where C: Config, - T: Valuate, + T: Valuate, CurrencyIdOf>, { } @@ -342,7 +340,7 @@ pub mod pallet { impl ValutationApiTrait for T where C: Config, - T: Valuate, + T: Valuate, CurrencyIdOf>, T: XykFunctionsTrait, { } @@ -461,20 +459,25 @@ pub mod pallet { Twox64Concat, AccountIdOf, Twox64Concat, - (TokenId, TokenId), - RewardInfo, + (CurrencyIdOf, CurrencyIdOf), + RewardInfo>, ValueQuery, >; /// How much scheduled rewards per single liquidty_token should be distribute_rewards /// the **value is multiplied by u128::MAX** to avoid floating point arithmetic #[pallet::storage] - pub type ScheduleRewardsTotal = - StorageMap<_, Twox64Concat, (TokenId, TokenId), ScheduleRewards, ValueQuery>; + pub type ScheduleRewardsTotal = StorageMap< + _, + Twox64Concat, + (CurrencyIdOf, CurrencyIdOf), + ScheduleRewards, + ValueQuery, + >; #[pallet::storage] pub type ScheduleRewardsPerLiquidity = - StorageMap<_, Twox64Concat, (TokenId, TokenId), (U256, u64), ValueQuery>; + StorageMap<_, Twox64Concat, (CurrencyIdOf, CurrencyIdOf), (U256, u64), ValueQuery>; /// List of activated schedules sorted by expiry date #[pallet::storage] @@ -482,7 +485,7 @@ pub mod pallet { pub type RewardsSchedules = StorageValue< _, BoundedBTreeMap< - (T::BlockNumber, TokenId, TokenId, Balance, u64), + (BlockNumberFor, CurrencyIdOf, CurrencyIdOf, BalanceOf, u64), (), T::RewardsSchedulesLimit, >, @@ -503,12 +506,20 @@ pub mod pallet { #[pallet::storage] pub type RewardsSchedulesList = - StorageMap<_, Twox64Concat, ScheduleId, (Schedule, Option), OptionQuery>; + StorageMap<_, Twox64Concat, ScheduleId, (Schedule, Option), OptionQuery>; /// Maps liquidity token to list of tokens that it ever was rewarded with #[pallet::storage] - pub type RewardTokensPerPool = - StorageDoubleMap<_, Twox64Concat, TokenId, Twox64Concat, TokenId, (), ValueQuery>; + + pub type RewardTokensPerPool = StorageDoubleMap< + _, + Twox64Concat, + CurrencyIdOf, + Twox64Concat, + CurrencyIdOf, + (), + ValueQuery, + >; /// Tracks number of activated liquidity per schedule. It is used for calculation of /// "cumulative rewrds amount" per 1 liquidity token. Therefore activation/deactivation needs @@ -517,9 +528,9 @@ pub mod pallet { pub type TotalActivatedLiquidityForSchedules = StorageDoubleMap< _, Twox64Concat, - TokenId, + CurrencyIdOf, Twox64Concat, - TokenId, + CurrencyIdOf, ActivatedLiquidityPerSchedule, ValueQuery, >; @@ -533,8 +544,8 @@ pub mod pallet { _, ( NMapKey>, - NMapKey, - NMapKey, + NMapKey>, + NMapKey>, ), u128, OptionQuery, @@ -544,15 +555,29 @@ pub mod pallet { /// liquidity mining rewards. That information is essential to properly handle token unlcocks /// when liquidity is deactivated. #[pallet::storage] - pub type ActivatedLockedLiquidityForSchedules = - StorageDoubleMap<_, Twox64Concat, AccountIdOf, Twox64Concat, TokenId, u128, ValueQuery>; + pub type ActivatedLockedLiquidityForSchedules = StorageDoubleMap< + _, + Twox64Concat, + AccountIdOf, + Twox64Concat, + CurrencyIdOf, + u128, + ValueQuery, + >; /// Tracks how much of the liquidity was activated for schedule rewards and not yet /// liquidity mining rewards. That information is essential to properly handle token unlcocks /// when liquidity is deactivated. #[pallet::storage] - pub type ActivatedNativeRewardsLiq = - StorageDoubleMap<_, Twox64Concat, AccountIdOf, Twox64Concat, TokenId, u128, ValueQuery>; + pub type ActivatedNativeRewardsLiq = StorageDoubleMap< + _, + Twox64Concat, + AccountIdOf, + Twox64Concat, + CurrencyIdOf, + u128, + ValueQuery, + >; #[pallet::call] impl Pallet { @@ -647,10 +672,10 @@ pub mod pallet { #[pallet::weight(<::WeightInfo>::reward_pool())] pub fn reward_pool( origin: OriginFor, - pool: (TokenId, TokenId), - token_id: TokenId, - amount: Balance, - schedule_end: T::BlockNumber, + pool: (CurrencyIdOf, CurrencyIdOf), + token_id: CurrencyIdOf, + amount: BalanceOf, + schedule_end: BlockNumberFor, ) -> DispatchResult { let sender = ensure_signed(origin)?; Self::reward_pool_impl(sender, pool, token_id, amount, schedule_end) @@ -668,10 +693,10 @@ pub mod pallet { #[pallet::weight(<::WeightInfo>::activate_liquidity_for_3rdparty_rewards())] pub fn activate_liquidity_for_3rdparty_rewards( origin: OriginFor, - liquidity_token_id: TokenId, - amount: Balance, - reward_token: TokenId, - use_balance_from: Option, + liquidity_token_id: CurrencyIdOf, + amount: BalanceOf, + reward_token: CurrencyIdOf, + use_balance_from: Option>>, ) -> DispatchResultWithPostInfo { let sender = ensure_signed(origin)?; @@ -685,7 +710,7 @@ pub mod pallet { .map_err(|err| DispatchErrorWithPostInfo { post_info: PostDispatchInfo { actual_weight: Some( - >::deactivate_liquidity( + <::WeightInfo>::activate_liquidity_for_3rdparty_rewards(), ), pays_fee: Pays::Yes, }, @@ -705,9 +730,10 @@ pub mod pallet { #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_3rdparty_rewards())] pub fn deactivate_liquidity_for_3rdparty_rewards( origin: OriginFor, - liquidity_token_id: TokenId, - amount: Balance, - reward_token: TokenId, + liquidity_token_id: CurrencyIdOf, + amount: BalanceOf, + + reward_token: CurrencyIdOf, ) -> DispatchResultWithPostInfo { let sender = ensure_signed(origin)?; @@ -738,8 +764,8 @@ pub mod pallet { #[pallet::weight(<::WeightInfo>::claim_3rdparty_rewards())] pub fn claim_3rdparty_rewards( origin: OriginFor, - liquidity_token_id: TokenId, - reward_token: TokenId, + liquidity_token_id: CurrencyIdOf, + reward_token: CurrencyIdOf, ) -> DispatchResult { let sender = ensure_signed(origin)?; @@ -762,8 +788,8 @@ pub mod pallet { #[pallet::weight(<::WeightInfo>::activate_liquidity_for_native_rewards())] pub fn activate_liquidity_for_native_rewards( origin: OriginFor, - liquidity_token_id: TokenId, - amount: Balance, + liquidity_token_id: CurrencyIdOf, + amount: BalanceOf, use_balance_from: Option, ) -> DispatchResult { let sender = ensure_signed(origin)?; @@ -782,8 +808,8 @@ pub mod pallet { #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_native_rewards())] pub fn deactivate_liquidity_for_native_rewards( origin: OriginFor, - liquidity_token_id: TokenId, - amount: Balance, + liquidity_token_id: CurrencyIdOf, + amount: BalanceOf, ) -> DispatchResult { let sender = ensure_signed(origin)?; @@ -796,7 +822,7 @@ pub mod pallet { #[deprecated(note = "claim_native_rewards should be used instead")] pub fn claim_native_rewards( origin: OriginFor, - liquidity_token_id: TokenId, + liquidity_token_id: CurrencyIdOf, ) -> DispatchResult { let sender = ensure_signed(origin)?; @@ -813,8 +839,8 @@ pub mod pallet { impl Pallet { fn activate_liquidity_for_native_rewards_impl( user: AccountIdOf, - liquidity_asset_id: TokenId, - amount: Balance, + liquidity_asset_id: CurrencyIdOf, + amount: BalanceOf, use_balance_from: Option, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; @@ -844,8 +870,8 @@ impl Pallet { pub fn calculate_native_rewards_amount( user: AccountIdOf, - liquidity_asset_id: TokenId, - ) -> Result { + liquidity_asset_id: CurrencyIdOf, + ) -> Result, DispatchError> { Self::ensure_is_promoted_pool(liquidity_asset_id)?; let rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; @@ -867,8 +893,8 @@ impl Pallet { fn deactivate_liquidity_for_native_rewards_impl( user: AccountIdOf, - liquidity_asset_id: TokenId, - amount: Balance, + liquidity_asset_id: CurrencyIdOf, + amount: BalanceOf, ) -> DispatchResult { ensure!( ActivatedNativeRewardsLiq::::get(user.clone(), liquidity_asset_id) == 0, @@ -888,10 +914,10 @@ impl Pallet { fn activate_liquidity_for_3rdparty_rewards_impl( user: AccountIdOf, - liquidity_asset_id: TokenId, - amount: Balance, - use_balance_from: ThirdPartyActivationKind, - reward_token: TokenId, + liquidity_asset_id: CurrencyIdOf, + amount: BalanceOf, + use_balance_from: ThirdPartyActivationKind>, + reward_token: CurrencyIdOf, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; @@ -974,9 +1000,9 @@ impl Pallet { fn deactivate_liquidity_for_3rdparty_rewards_impl( user: AccountIdOf, - liquidity_asset_id: TokenId, - amount: Balance, - rewards_asset_id: TokenId, + liquidity_asset_id: CurrencyIdOf, + amount: BalanceOf, + rewards_asset_id: CurrencyIdOf, ) -> DispatchResult { if amount > 0 { Self::set_liquidity_burning_checkpoint_for_schedule( @@ -996,7 +1022,7 @@ impl Pallet { pub fn calculate_3rdparty_rewards_all( user: AccountIdOf, - ) -> Result, DispatchError> { + ) -> Result, CurrencyIdOf, BalanceOf)>, DispatchError> { let mut result = RewardsInfoForScheduleRewards::::iter_prefix(user.clone()) .map(|((liq_token, reward_token), _)| { Self::calculate_3rdparty_rewards_amount(user.clone(), liq_token, reward_token) @@ -1009,9 +1035,9 @@ impl Pallet { pub fn calculate_3rdparty_rewards_amount( user: AccountIdOf, - liquidity_asset_id: TokenId, - rewards_asset_id: TokenId, - ) -> Result { + liquidity_asset_id: CurrencyIdOf, + rewards_asset_id: CurrencyIdOf, + ) -> Result, DispatchError> { Self::ensure_is_promoted_pool(liquidity_asset_id)?; if let Ok(info) = RewardsInfoForScheduleRewards::::try_get( @@ -1096,9 +1122,7 @@ impl Pallet { { let calc = RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; - activated_amount: BalanceOf::::zero(), - rewards_not_yet_claimed: BalanceOf::::zero(), - rewards_already_claimed: BalanceOf::::zero(), + let rewards_info = calc .activate_more(liquidity_assets_added) .map_err(|err| Into::>::into(err))?; @@ -1120,9 +1144,9 @@ impl Pallet { fn set_liquidity_minting_checkpoint_3rdparty( user: AccountIdOf, - liquidity_asset_id: TokenId, - liquidity_assets_added: Balance, - liquidity_assets_reward: TokenId, + liquidity_asset_id: CurrencyIdOf, + liquidity_assets_added: BalanceOf, + liquidity_assets_reward: CurrencyIdOf, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; @@ -1215,9 +1239,9 @@ impl Pallet { fn set_liquidity_burning_checkpoint_for_schedule( user: AccountIdOf, - liquidity_asset_id: TokenId, - liquidity_assets_burned: Balance, - reward_token: TokenId, + liquidity_asset_id: CurrencyIdOf, + liquidity_assets_burned: BalanceOf, + reward_token: CurrencyIdOf, ) -> DispatchResult { Self::ensure_is_promoted_pool(liquidity_asset_id)?; ScheduleRewardsCalculator::::update_cumulative_rewards(liquidity_asset_id, reward_token); @@ -1297,9 +1321,9 @@ impl Pallet { fn claim_schedule_rewards_all_impl( user: T::AccountId, - liquidity_asset_id: TokenId, - reward_token: TokenId, - ) -> Result { + liquidity_asset_id: CurrencyIdOf, + reward_token: CurrencyIdOf, + ) -> Result, DispatchError> { Self::ensure_is_promoted_pool(liquidity_asset_id)?; let calc = RewardsCalculator::schedule_rewards::( @@ -1335,10 +1359,11 @@ impl Pallet { pub(crate) fn reward_pool_impl( sender: T::AccountId, - pool: (TokenId, TokenId), - token_id: TokenId, - amount: Balance, - schedule_end: T::BlockNumber, + + pool: (CurrencyIdOf, CurrencyIdOf), + token_id: CurrencyIdOf, + amount: BalanceOf, + schedule_end: BlockNumberFor, ) -> DispatchResult { let liquidity_token_id = ::ValuationApi::get_liquidity_asset(pool.0, pool.1) .map_err(|_| Error::::PoolDoesNotExist)?; @@ -1404,7 +1429,10 @@ impl Pallet { Ok(()) } - fn verify_rewards_min_amount(token_id: TokenId, amount_per_session: Balance) -> bool { + fn verify_rewards_min_amount( + token_id: CurrencyIdOf, + amount_per_session: BalanceOf, + ) -> bool { if ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= T::Min3rdPartyRewardValutationPerSession::get() { @@ -1426,7 +1454,7 @@ impl Pallet { return false } - fn verify_rewards_min_volume(token_id: TokenId) -> bool { + fn verify_rewards_min_volume(token_id: CurrencyIdOf) -> bool { if token_id == Into::::into(Self::native_token_id()) { return true } @@ -1446,14 +1474,13 @@ impl Pallet { } impl ProofOfStakeRewardsApi, CurrencyIdOf> for Pallet { - #[cfg(feature = "runtime-benchmarks")] fn enable_3rdparty_rewards( account: T::AccountId, - pool: (Self::CurrencyId, Self::CurrencyId), - reward_token_id: Self::CurrencyId, + pool: (CurrencyIdOf, CurrencyIdOf), + reward_token_id: CurrencyIdOf, last_session: u32, - amount: Self::Balance, + amount: BalanceOf, ) { let liquidity_token_id = ::ValuationApi::get_liquidity_asset(pool.0, pool.1).expect("pool exist"); @@ -1470,9 +1497,9 @@ impl ProofOfStakeRewardsApi, CurrencyIdOf< #[cfg(feature = "runtime-benchmarks")] fn activate_liquidity_for_3rdparty_rewards( account: T::AccountId, - liquidity_token: Self::CurrencyId, - amount: Self::Balance, - reward_token_id: Self::CurrencyId, + liquidity_token: CurrencyIdOf, + amount: BalanceOf, + reward_token_id: CurrencyIdOf, ) { Pallet::::activate_liquidity_for_3rdparty_rewards_impl( account, @@ -1483,6 +1510,7 @@ impl ProofOfStakeRewardsApi, CurrencyIdOf< ) .expect("call should pass") } + fn enable(liquidity_token_id: CurrencyIdOf, weight: u8) { PromotedPoolRewards::::mutate(|promoted_pools| { promoted_pools @@ -1554,14 +1582,13 @@ impl ProofOfStakeRewardsApi, CurrencyIdOf< liquidity_asset_id: CurrencyIdOf, amount: BalanceOf, ) -> DispatchResult { - if amount > 0 { Self::deactivate_liquidity_for_native_rewards_impl(user, liquidity_asset_id, amount) } fn calculate_rewards_amount( user: AccountIdOf, liquidity_asset_id: CurrencyIdOf, - ) -> Result { + ) -> Result, DispatchError> { Self::calculate_native_rewards_amount(user, liquidity_asset_id) } } diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index f83555f762..92e8cdc985 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -2,7 +2,6 @@ use frame_support::dispatch::DispatchResult; use crate::{schedule_rewards_calculator::ScheduleRewardsCalculator, Config, Error, Pallet}; use frame_support::pallet_prelude::*; -use mangata_types::Balance; use sp_core::U256; use sp_std::{ convert::{TryFrom, TryInto}, @@ -36,27 +35,25 @@ pub struct RewardInfo { pub missing_at_last_checkpoint: U256, } - //impl RewardInfo //where // Balance: frame_support::traits::tokens::Balance + Into + TryFrom, - pub struct RewardsContext { pub current_time: u32, pub pool_ratio_current: U256, } -pub struct RewardsCalculator { +pub struct RewardsCalculator { rewards_context: RewardsContext, - rewards_info: RewardInfo, + rewards_info: RewardInfo, _curve: sp_std::marker::PhantomData, } -impl RewardsCalculator { +impl RewardsCalculator, Balance> { pub fn mining_rewards( user: T::AccountId, - asset_id: TokenId, + asset_id: crate::CurrencyIdOf, ) -> sp_std::result::Result { let current_time: u32 = Pallet::::get_current_rewards_time()?; let pool_ratio_current = Pallet::::get_pool_rewards(asset_id)?; @@ -83,11 +80,11 @@ impl RewardsCalculator { } } -impl RewardsCalculator { +impl RewardsCalculator, Balance> { pub fn schedule_rewards( user: T::AccountId, - asset_id: TokenId, - reward_asset_id: TokenId, + asset_id: crate::CurrencyIdOf, + reward_asset_id: crate::CurrencyIdOf, ) -> sp_std::result::Result { let current_time: u32 = Pallet::::get_current_rewards_time()?; ensure!( @@ -124,21 +121,35 @@ impl RewardsCalculator { } pub trait CurveRewards { - fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option; - fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option; + type Balance; + fn calculate_curve_position( + ctx: &RewardsContext, + user_info: &RewardInfo, + ) -> Option; + fn calculate_curve_rewards( + ctx: &RewardsContext, + user_info: &RewardInfo, + ) -> Option; } -pub struct ConstCurveRewards(RewardsContext, RewardInfo); -pub struct AsymptoticCurveRewards(RewardsContext, RewardInfo); +pub struct ConstCurveRewards(RewardsContext, RewardInfo); +pub struct AsymptoticCurveRewards(RewardsContext, RewardInfo); -impl CurveRewards for AsymptoticCurveRewards { - fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { +impl CurveRewards for AsymptoticCurveRewards { + type Balance = Balance; + fn calculate_curve_position( + ctx: &RewardsContext, + user_info: &RewardInfo, + ) -> Option { let time_passed = ctx.current_time.checked_sub(user_info.last_checkpoint).unwrap(); let q_pow = calculate_q_pow(Q, time_passed); Some(user_info.missing_at_last_checkpoint * U256::from(REWARDS_PRECISION) / q_pow) } - fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { + fn calculate_curve_rewards( + ctx: &RewardsContext, + user_info: &RewardInfo, + ) -> Option { let pool_rewards_ratio_new = ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; @@ -185,12 +196,19 @@ impl CurveRewards for AsymptoticCurveRewards { } } -impl CurveRewards for ConstCurveRewards { - fn calculate_curve_position(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { +impl CurveRewards for ConstCurveRewards { + type Balance = Balance; + fn calculate_curve_position( + ctx: &RewardsContext, + user_info: &RewardInfo, + ) -> Option { Some(U256::from(0)) } - fn calculate_curve_rewards(ctx: &RewardsContext, user_info: &RewardInfo) -> Option { + fn calculate_curve_rewards( + ctx: &RewardsContext, + user_info: &RewardInfo, + ) -> Option { let pool_rewards_ratio_new = ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; @@ -213,11 +231,11 @@ impl Into> for RewardsCalcError { } } -impl RewardsCalculator { +impl RewardsCalculator { pub fn activate_more( self, liquidity_assets_added: Balance, - ) -> sp_std::result::Result { + ) -> sp_std::result::Result, RewardsCalcError> { let activated_amount = self .rewards_info .activated_amount @@ -249,7 +267,7 @@ impl RewardsCalculator { pub fn activate_less( self, liquidity_assets_removed: Balance, - ) -> sp_std::result::Result { + ) -> sp_std::result::Result, RewardsCalcError> { let activated_amount = self .rewards_info .activated_amount @@ -287,7 +305,9 @@ impl RewardsCalculator { }) } - pub fn claim_rewards(self) -> sp_std::result::Result<(RewardInfo, Balance), RewardsCalcError> { + pub fn claim_rewards( + self, + ) -> sp_std::result::Result<(RewardInfo, Balance), RewardsCalcError> { let current_rewards = self.calculate_rewards_impl()?; let total_available_rewards = current_rewards diff --git a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs index 3922e74c0f..469b4769cb 100644 --- a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs +++ b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs @@ -1,10 +1,9 @@ use crate::{ - Config, Pallet, ScheduleRewardsPerLiquidity, ScheduleRewardsTotal, SessionId, - TotalActivatedLiquidityForSchedules, + BalanceOf, Config, CurrencyIdOf, Pallet, ScheduleRewardsPerLiquidity, ScheduleRewardsTotal, + SessionId, TotalActivatedLiquidityForSchedules, }; use core::marker::PhantomData; use frame_support::pallet_prelude::*; -use mangata_types::{Balance, TokenId}; use sp_core::U256; #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo)] @@ -111,8 +110,8 @@ impl ScheduleRewardsCalculator { /// updates cumulative number of rewards per 1 liquidity (mulipliedd by u128::MAX) because of /// precision. pub fn update_cumulative_rewards( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, + liquidity_asset_id: CurrencyIdOf, + liquidity_assets_reward: CurrencyIdOf, ) { let session_id = Pallet::::session_index() as u64; @@ -146,8 +145,8 @@ impl ScheduleRewardsCalculator { /// returns cumulative number of rewards per 1 liquidity (mulipliedd by u128::MAX) because of /// precision. pub fn total_rewards_for_liquidity( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, + liquidity_asset_id: CurrencyIdOf, + liquidity_assets_reward: CurrencyIdOf, ) -> U256 { let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); @@ -168,9 +167,9 @@ impl ScheduleRewardsCalculator { /// returns amount of schedule rewards that has been accumulated since last update of `ScheduleRewardsPerLiquidity` /// its beeing tracked only for purpose of `ScheduleRewardsPerLiquidity` calculations pub fn total_schedule_rewards( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - ) -> Balance { + liquidity_asset_id: CurrencyIdOf, + liquidity_assets_reward: CurrencyIdOf, + ) -> BalanceOf { ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)) .total_rewards(Pallet::::session_index() as u64) } @@ -178,9 +177,9 @@ impl ScheduleRewardsCalculator { /// returns amount of schedule rewards that has been accumulated since last update of `ScheduleRewardsPerLiquidity` /// its beeing tracked only for purpose of `ScheduleRewardsPerLiquidity` calculations pub fn update_total_activated_liqudity( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - diff: Balance, + liquidity_asset_id: CurrencyIdOf, + liquidity_assets_reward: CurrencyIdOf, + diff: BalanceOf, change: bool, ) { let session_id = Pallet::::session_index() as u64; @@ -195,9 +194,9 @@ impl ScheduleRewardsCalculator { /// returns info about total activated liquidity per schedule pub fn total_activated_liquidity( - liquidity_asset_id: TokenId, - liquidity_assets_reward: TokenId, - ) -> Balance { + liquidity_asset_id: CurrencyIdOf, + liquidity_assets_reward: CurrencyIdOf, + ) -> BalanceOf { let session_id = Pallet::::session_index() as u64; TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward) .total(session_id) From 3afced4040100e210e221560fc3e55d10e4d3c14 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sat, 11 Nov 2023 17:53:02 +0100 Subject: [PATCH 085/125] [wip] PoS tests works --- pallets/parachain-staking/src/mock.rs | 7 + pallets/proof-of-stake/Cargo.toml | 4 +- pallets/proof-of-stake/src/lib.rs | 120 ++++++------ pallets/proof-of-stake/src/mock.rs | 20 +- pallets/proof-of-stake/src/reward_info.rs | 172 ++++++++++++------ .../src/schedule_rewards_calculator.rs | 62 ++++--- pallets/proof-of-stake/src/tests.rs | 9 +- pallets/proof-of-stake/src/utils.rs | 13 +- pallets/xyk/src/lib.rs | 6 +- 9 files changed, 250 insertions(+), 163 deletions(-) diff --git a/pallets/parachain-staking/src/mock.rs b/pallets/parachain-staking/src/mock.rs index 13052b7e8f..ff51d3f052 100644 --- a/pallets/parachain-staking/src/mock.rs +++ b/pallets/parachain-staking/src/mock.rs @@ -361,6 +361,13 @@ impl Valuate for TestTokenValuator { ) -> Result<(Balance, Balance), DispatchError> { todo!() } + + fn valuate_non_liquidity_token( + liquidity_token_id: TokenId, + liquidity_token_amount: Balance, + ) -> Balance { + todo!() + } } pub(crate) struct ExtBuilder { diff --git a/pallets/proof-of-stake/Cargo.toml b/pallets/proof-of-stake/Cargo.toml index 2244e3ebd7..d58f9e3c05 100644 --- a/pallets/proof-of-stake/Cargo.toml +++ b/pallets/proof-of-stake/Cargo.toml @@ -13,7 +13,9 @@ hex = { package = "rustc-hex", version = "2.1.0", default-features = false } hex-literal = { version = "0.3.3", default-features = false } log = { version = "0.4.14", default-features = false } serde = { version = "1.0.126", optional = true } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.1", default-features = false, features = [ + "derive", +] } pallet-bootstrap = { default-features = false, path = "../bootstrap" } pallet-issuance = { default-features = false, path = "../issuance" } diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 70617fd90d..1914d81a26 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -96,6 +96,9 @@ use frame_support::pallet_prelude::*; pub type ScheduleId = u64; #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +#[codec(mel_bound(T: Config))] +#[scale_info(skip_type_params(T))] + pub struct Schedule { scheduled_at: u64, last_session: u64, @@ -113,7 +116,7 @@ use frame_support::{ use frame_system::ensure_signed; use mangata_support::traits::Valuate; use sp_core::U256; -use sp_runtime::traits::AccountIdConversion; +use sp_runtime::traits::{AccountIdConversion, AtLeast32BitUnsigned}; use frame_support::{ pallet_prelude::*, @@ -136,7 +139,7 @@ use sp_runtime::{ use sp_std::{convert::TryInto, prelude::*}; mod reward_info; -use reward_info::{RewardInfo, RewardsCalculator}; +use reward_info::{ConstCurveRewards, RewardInfo, RewardsCalculator}; mod schedule_rewards_calculator; use schedule_rewards_calculator::{ @@ -203,7 +206,6 @@ pub mod pallet { pub struct Pallet(PhantomData); #[pallet::hooks] - impl Hooks> for Pallet { fn on_initialize(_n: BlockNumberFor) -> Weight { let session_id = Self::session_index() as u64; @@ -471,7 +473,7 @@ pub mod pallet { _, Twox64Concat, (CurrencyIdOf, CurrencyIdOf), - ScheduleRewards, + ScheduleRewards>, ValueQuery, >; @@ -531,7 +533,7 @@ pub mod pallet { CurrencyIdOf, Twox64Concat, CurrencyIdOf, - ActivatedLiquidityPerSchedule, + ActivatedLiquidityPerSchedule>, ValueQuery, >; @@ -547,7 +549,7 @@ pub mod pallet { NMapKey>, NMapKey>, ), - u128, + BalanceOf, OptionQuery, >; @@ -561,7 +563,7 @@ pub mod pallet { AccountIdOf, Twox64Concat, CurrencyIdOf, - u128, + BalanceOf, ValueQuery, >; @@ -575,7 +577,7 @@ pub mod pallet { AccountIdOf, Twox64Concat, CurrencyIdOf, - u128, + BalanceOf, ValueQuery, >; @@ -639,12 +641,11 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - >::activate_liquidity( - sender, - liquidity_token_id, - amount, - use_balance_from, - ) + , + BalanceOf, + CurrencyIdOf, + >>::activate_liquidity(sender, liquidity_token_id, amount, use_balance_from) } /// Decreases number of tokens used for liquidity mining purposes @@ -826,7 +827,7 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - >::claim_rewards_all( + >::claim_rewards_all( sender, liquidity_token_id, )?; @@ -876,18 +877,19 @@ impl Pallet { let rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; - let current_rewards = match rewards_info.activated_amount { - 0 => 0u128, - _ => { - let calc = - RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; - calc.calculate_rewards().map_err(|err| Into::>::into(err))? - }, + let current_rewards = if rewards_info.activated_amount.is_zero() { + BalanceOf::::zero() + } else { + let calc = RewardsCalculator::<_, BalanceOf>::mining_rewards::( + user.clone(), + liquidity_asset_id, + )?; + calc.calculate_rewards().map_err(|err| Into::>::into(err))? }; Ok(current_rewards - .checked_add(rewards_info.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(rewards_info.rewards_already_claimed)) + .checked_add(&rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(&rewards_info.rewards_already_claimed)) .ok_or(Error::::CalculateRewardsMathError)?) } @@ -897,11 +899,11 @@ impl Pallet { amount: BalanceOf, ) -> DispatchResult { ensure!( - ActivatedNativeRewardsLiq::::get(user.clone(), liquidity_asset_id) == 0, + ActivatedNativeRewardsLiq::::get(user.clone(), liquidity_asset_id).is_zero(), Error::::LiquidityLockedIn3rdpartyRewards ); - if amount > 0 { + if amount > BalanceOf::::zero() { Self::set_liquidity_burning_checkpoint(user.clone(), liquidity_asset_id, amount)?; Pallet::::deposit_event(Event::LiquidityDeactivated( user, @@ -1004,7 +1006,7 @@ impl Pallet { amount: BalanceOf, rewards_asset_id: CurrencyIdOf, ) -> DispatchResult { - if amount > 0 { + if amount > BalanceOf::::zero() { Self::set_liquidity_burning_checkpoint_for_schedule( user.clone(), liquidity_asset_id, @@ -1044,24 +1046,23 @@ impl Pallet { user.clone(), (liquidity_asset_id, rewards_asset_id), ) { - let current_rewards = match info.activated_amount { - 0 => 0u128, - _ => { - let calc = RewardsCalculator::schedule_rewards::( - user.clone(), - liquidity_asset_id, - rewards_asset_id, - )?; - calc.calculate_rewards().map_err(|err| Into::>::into(err))? - }, + let current_rewards = if info.activated_amount == BalanceOf::::zero() { + BalanceOf::::zero() + } else { + let calc = RewardsCalculator::schedule_rewards::( + user.clone(), + liquidity_asset_id, + rewards_asset_id, + )?; + calc.calculate_rewards().map_err(|err| Into::>::into(err))? }; Ok(current_rewards - .checked_add(info.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(info.rewards_already_claimed)) + .checked_add(&info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(&info.rewards_already_claimed)) .ok_or(Error::::CalculateRewardsMathError)?) } else { - Ok(0u128) + Ok(BalanceOf::::zero()) } } @@ -1273,8 +1274,8 @@ impl Pallet { (user.clone(), liquidity_asset_id, reward_token), |v| { v.and_then(|a| { - a.checked_sub(liquidity_assets_burned).and_then(|val| { - if val > 0 { + a.checked_sub(&liquidity_assets_burned).and_then(|val| { + if val > BalanceOf::::zero() { *v = Some(val); } else { *v = None; @@ -1297,7 +1298,7 @@ impl Pallet { liquidity_asset_id, |val| { let prev = *val; - *val = 0; + *val = BalanceOf::::zero(); prev }, ); @@ -1311,7 +1312,7 @@ impl Pallet { let amount = ActivatedNativeRewardsLiq::::mutate(user.clone(), liquidity_asset_id, |val| { let prev = *val; - *val = 0; + *val = BalanceOf::::zero(); prev }); } @@ -1338,7 +1339,7 @@ impl Pallet { reward_token.into(), &Self::pallet_account(), &user, - total_available_rewards.into(), + total_available_rewards, ExistenceRequirement::KeepAlive, )?; @@ -1374,11 +1375,13 @@ impl Pallet { Error::::CannotScheduleRewardsInPast ); - let amount_per_session = schedule_end + let amount_per_session: BalanceOf = schedule_end .saturated_into::() .checked_sub(current_session) - .and_then(|v| amount.checked_div(v.into())) - .ok_or(Error::::MathOverflow)?; + .and_then(|v| Into::::into(amount).checked_div(v.into())) + .ok_or(Error::::MathOverflow)? + .try_into() + .or(Err(Error::::MathOverflow))?; ensure!( Self::verify_rewards_min_amount(token_id, amount_per_session), @@ -1393,7 +1396,7 @@ impl Pallet { token_id.into(), &sender, &Self::pallet_account(), - amount.into(), + amount, ExistenceRequirement::KeepAlive, )?; @@ -1433,20 +1436,20 @@ impl Pallet { token_id: CurrencyIdOf, amount_per_session: BalanceOf, ) -> bool { - if ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session) >= + if ::ValuationApi::valuate_liquidity_token(token_id, amount_per_session).into() >= T::Min3rdPartyRewardValutationPerSession::get() { return true } - if token_id == Into::::into(Self::native_token_id()) && - amount_per_session >= T::Min3rdPartyRewardValutationPerSession::get() + if token_id == Self::native_token_id() && + amount_per_session.into() >= T::Min3rdPartyRewardValutationPerSession::get() { return true } - if ::ValuationApi::valuate_non_liquidity_token(token_id, amount_per_session) >= - T::Min3rdPartyRewardValutationPerSession::get() + if ::ValuationApi::valuate_non_liquidity_token(token_id, amount_per_session) + .into() >= T::Min3rdPartyRewardValutationPerSession::get() { return true } @@ -1455,18 +1458,18 @@ impl Pallet { } fn verify_rewards_min_volume(token_id: CurrencyIdOf) -> bool { - if token_id == Into::::into(Self::native_token_id()) { + if token_id == Self::native_token_id() { return true } if let Some((mga_reserves, _)) = ::ValuationApi::get_pool_state(token_id) { - return mga_reserves >= T::Min3rdPartyRewardVolume::get() + return mga_reserves.into() >= T::Min3rdPartyRewardVolume::get() } if let Ok((mga_reserves, _)) = ::ValuationApi::get_reserves(Self::native_token_id(), token_id) { - return mga_reserves >= T::Min3rdPartyRewardVolume::get() + return mga_reserves.into() >= T::Min3rdPartyRewardVolume::get() } return false @@ -1641,3 +1644,6 @@ impl LiquidityMiningApi> for Pallet { }); } } +// TODO: use correct weights in on_initilize_hook +// TODO: limit amount of active schedules +// TODO: unwraps!!! diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 225ef442aa..0e0c273685 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -2,21 +2,25 @@ use super::*; use mangata_support::traits::GetMaintenanceStatusTrait; +use mangata_types::assets::CustomMetadata; use crate as pos; use core::convert::TryFrom; use frame_support::{ construct_runtime, parameter_types, traits::{ - tokens::currency::MultiTokenCurrency, ConstU32,ConstU128, Contains, Everything, WithdrawReasons, + tokens::currency::MultiTokenCurrency, ConstU128, ConstU32, Contains, Everything, + WithdrawReasons, }, PalletId, }; use frame_system as system; pub use mangata_support::traits::ProofOfStakeRewardsApi; use orml_tokens::{MultiTokenCurrencyAdapter, MultiTokenCurrencyExtended}; -use orml_traits::parameter_type_with_key; +use orml_traits::{asset_registry::AssetMetadata, parameter_type_with_key}; +use pallet_xyk::AssetMetadataMutationTrait; use sp_runtime::{traits::AccountIdConversion, BuildStorage, Perbill, Percent, Saturating}; +use std::{collections::hash_map::HashMap, sync::Mutex}; pub const NATIVE_CURRENCY_ID: u32 = 0; @@ -181,7 +185,7 @@ impl Contains<(TokenId, TokenId)> for DummyBlacklistedPool { pub struct MockAssetRegister; lazy_static::lazy_static! { - static ref ASSET_REGISTER: Mutex>> = { + static ref ASSET_REGISTER: Mutex>>> = { let m = HashMap::new(); Mutex::new(m) }; @@ -190,9 +194,7 @@ lazy_static::lazy_static! { mockall::mock! { pub ValuationApi {} - impl Valuate for ValuationApi { - type Balance = Balance; - type CurrencyId = TokenId; + impl Valuate for ValuationApi { fn get_liquidity_asset( first_asset_id: TokenId, @@ -229,7 +231,7 @@ mockall::mock! { } pub struct AssetMetadataMutation; -impl AssetMetadataMutationTrait for AssetMetadataMutation { +impl AssetMetadataMutationTrait for AssetMetadataMutation { fn set_asset_info( _asset: TokenId, _name: Vec, @@ -394,8 +396,8 @@ fn min_req_volume() -> u128 { impl ExtBuilder { pub fn new() -> Self { - let t = frame_system::GenesisConfig::default() - .build_storage::() + let t = frame_system::GenesisConfig::::default() + .build_storage() .expect("Frame system builds valid default genesis config"); let mut ext = sp_io::TestExternalities::new(t); diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 92e8cdc985..c9446971c3 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -1,6 +1,10 @@ -use frame_support::dispatch::DispatchResult; +use codec::FullCodec; +use frame_support::{dispatch::DispatchResult, traits::MultiTokenCurrency}; +use sp_arithmetic::traits::{AtLeast32BitUnsigned, Zero}; -use crate::{schedule_rewards_calculator::ScheduleRewardsCalculator, Config, Error, Pallet}; +use crate::{ + schedule_rewards_calculator::ScheduleRewardsCalculator, BalanceOf, Config, Error, Pallet, +}; use frame_support::pallet_prelude::*; use sp_core::U256; use sp_std::{ @@ -35,10 +39,6 @@ pub struct RewardInfo { pub missing_at_last_checkpoint: U256, } -//impl RewardInfo -//where -// Balance: frame_support::traits::tokens::Balance + Into + TryFrom, - pub struct RewardsContext { pub current_time: u32, pub pool_ratio_current: U256, @@ -50,20 +50,35 @@ pub struct RewardsCalculator { _curve: sp_std::marker::PhantomData, } -impl RewardsCalculator, Balance> { - pub fn mining_rewards( +impl RewardsCalculator, Balance> +where + Balance: 'static + + AtLeast32BitUnsigned + + FullCodec + + Copy + + Default + + sp_std::fmt::Debug + + scale_info::TypeInfo + + MaxEncodedLen + + Into + + TryFrom, +{ + // type Balance: Balance; + pub fn mining_rewards( user: T::AccountId, asset_id: crate::CurrencyIdOf, - ) -> sp_std::result::Result { + ) -> sp_std::result::Result + where + T: Config, + T::Currency: MultiTokenCurrency, + { let current_time: u32 = Pallet::::get_current_rewards_time()?; let pool_ratio_current = Pallet::::get_pool_rewards(asset_id)?; - let default_rewards = RewardInfo { - activated_amount: 0_u128, - rewards_not_yet_claimed: 0_u128, - rewards_already_claimed: 0_u128, + let default_rewards = RewardInfo::> { last_checkpoint: current_time, pool_ratio_at_last_checkpoint: pool_ratio_current, missing_at_last_checkpoint: U256::from(0u128), + ..Default::default() }; let rewards_info = @@ -75,17 +90,31 @@ impl RewardsCalculator, Balance> { pool_ratio_current: Pallet::::get_pool_rewards(asset_id)?, }, rewards_info, - _curve: PhantomData::, + _curve: PhantomData::>, }) } } -impl RewardsCalculator, Balance> { +impl RewardsCalculator, Balance> +where + Balance: 'static + + AtLeast32BitUnsigned + + FullCodec + + Copy + + Default + + sp_std::fmt::Debug + + scale_info::TypeInfo + + MaxEncodedLen, +{ pub fn schedule_rewards( user: T::AccountId, asset_id: crate::CurrencyIdOf, reward_asset_id: crate::CurrencyIdOf, - ) -> sp_std::result::Result { + ) -> sp_std::result::Result + where + T: Config, + T::Currency: MultiTokenCurrency, + { let current_time: u32 = Pallet::::get_current_rewards_time()?; ensure!( crate::RewardTokensPerPool::::try_get(asset_id, reward_asset_id).is_ok(), @@ -95,12 +124,10 @@ impl RewardsCalculator, Balance> { ScheduleRewardsCalculator::::total_rewards_for_liquidity(asset_id, reward_asset_id); let default_rewards = RewardInfo { - activated_amount: 0_u128, - rewards_not_yet_claimed: 0_u128, - rewards_already_claimed: 0_u128, last_checkpoint: current_time, pool_ratio_at_last_checkpoint: pool_ratio_current.into(), missing_at_last_checkpoint: U256::from(0u128), + ..Default::default() }; let rewards_info = crate::RewardsInfoForScheduleRewards::::try_get( @@ -115,13 +142,13 @@ impl RewardsCalculator, Balance> { pool_ratio_current: pool_ratio_current.into(), }, rewards_info, - _curve: PhantomData::, + _curve: PhantomData::>, }) } } pub trait CurveRewards { - type Balance; + type Balance: AtLeast32BitUnsigned + TryFrom + Into; fn calculate_curve_position( ctx: &RewardsContext, user_info: &RewardInfo, @@ -135,7 +162,10 @@ pub trait CurveRewards { pub struct ConstCurveRewards(RewardsContext, RewardInfo); pub struct AsymptoticCurveRewards(RewardsContext, RewardInfo); -impl CurveRewards for AsymptoticCurveRewards { +impl CurveRewards for AsymptoticCurveRewards +where + Balance: AtLeast32BitUnsigned + TryFrom + Into, +{ type Balance = Balance; fn calculate_curve_position( ctx: &RewardsContext, @@ -153,7 +183,7 @@ impl CurveRewards for AsymptoticCurveRewards { let pool_rewards_ratio_new = ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; - let rewards_base: U256 = U256::from(user_info.activated_amount) + let rewards_base: U256 = U256::from(user_info.activated_amount.clone().into()) .checked_mul(pool_rewards_ratio_new)? .checked_div(U256::from(u128::MAX))?; // always fit into u128 @@ -162,8 +192,9 @@ impl CurveRewards for AsymptoticCurveRewards { let mut cummulative_work = U256::from(0); let mut cummulative_work_max_possible_for_ratio = U256::from(1); - if time_passed != 0 && user_info.activated_amount != 0 { - let liquidity_assets_amount_u256: U256 = user_info.activated_amount.into(); + if time_passed != 0 && user_info.activated_amount != Balance::zero() { + let liquidity_assets_amount_u256: U256 = + U256::from(user_info.activated_amount.clone().into()); // whole formula: missing_at_last_checkpoint*106/6 - missing_at_last_checkpoint*106*precision/6/q_pow // q_pow is multiplied by precision, thus there needs to be *precision in numenator as well @@ -188,19 +219,24 @@ impl CurveRewards for AsymptoticCurveRewards { cummulative_work_max_possible_for_ratio.checked_sub(cummulative_missing_new)? } - rewards_base - .checked_mul(cummulative_work)? - .checked_div(cummulative_work_max_possible_for_ratio)? - .try_into() - .ok() + TryInto::::try_into( + rewards_base + .checked_mul(cummulative_work)? + .checked_div(cummulative_work_max_possible_for_ratio)?, + ) + .ok() + .and_then(|v| TryInto::try_into(v).ok()) } } -impl CurveRewards for ConstCurveRewards { +impl CurveRewards for ConstCurveRewards +where + Balance: AtLeast32BitUnsigned + TryFrom + Into, +{ type Balance = Balance; fn calculate_curve_position( - ctx: &RewardsContext, - user_info: &RewardInfo, + _ctx: &RewardsContext, + _user_info: &RewardInfo, ) -> Option { Some(U256::from(0)) } @@ -212,11 +248,13 @@ impl CurveRewards for ConstCurveRewards { let pool_rewards_ratio_new = ctx.pool_ratio_current.checked_sub(user_info.pool_ratio_at_last_checkpoint)?; - let rewards_base: U256 = U256::from(user_info.activated_amount) + let rewards_base: U256 = U256::from(user_info.activated_amount.clone().into()) .checked_mul(pool_rewards_ratio_new)? .checked_div(U256::from(u128::MAX))?; // always fit into u128 - rewards_base.try_into().ok() + TryInto::::try_into(rewards_base) + .ok() + .and_then(|v| TryInto::try_into(v).ok()) } } @@ -231,7 +269,32 @@ impl Into> for RewardsCalcError { } } -impl RewardsCalculator { +pub trait MyBalance: + TryFrom + + Into + + AtLeast32BitUnsigned + + FullCodec + + Copy + + Default + + sp_std::fmt::Debug + + scale_info::TypeInfo + + MaxEncodedLen +{ +} + +impl RewardsCalculator +where + T: CurveRewards, + Balance: TryFrom + + Into + + AtLeast32BitUnsigned + + FullCodec + + Copy + + Default + + sp_std::fmt::Debug + + scale_info::TypeInfo + + MaxEncodedLen, +{ pub fn activate_more( self, liquidity_assets_added: Balance, @@ -239,25 +302,27 @@ impl RewardsCalculator { let activated_amount = self .rewards_info .activated_amount - .checked_add(liquidity_assets_added) + .checked_add(&liquidity_assets_added) .ok_or(RewardsCalcError::CheckpointMathError)?; let missing_at_last_checkpoint = T::calculate_curve_position(&self.rewards_context, &self.rewards_info) - .and_then(|v| v.checked_add(U256::from(liquidity_assets_added))) + .and_then(|v| v.checked_add(U256::from(liquidity_assets_added.into()))) .ok_or(RewardsCalcError::CheckpointMathError)?; - let user_current_rewards = self.calculate_rewards_impl()?; + let user_current_rewards = Into::::into(self.calculate_rewards_impl()?); let rewards_not_yet_claimed = user_current_rewards - .checked_add(self.rewards_info.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) - .ok_or(RewardsCalcError::CheckpointMathError)?; + .checked_add(self.rewards_info.rewards_not_yet_claimed.into()) + .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed.into())) + .ok_or(RewardsCalcError::CheckpointMathError)? + .try_into() + .or(Err(RewardsCalcError::CheckpointMathError))?; Ok(RewardInfo { activated_amount, pool_ratio_at_last_checkpoint: self.rewards_context.pool_ratio_current, - rewards_already_claimed: 0_u128, + rewards_already_claimed: Balance::zero(), missing_at_last_checkpoint, rewards_not_yet_claimed, last_checkpoint: self.rewards_context.current_time, @@ -271,7 +336,7 @@ impl RewardsCalculator { let activated_amount = self .rewards_info .activated_amount - .checked_sub(liquidity_assets_removed) + .checked_sub(&liquidity_assets_removed) .ok_or(RewardsCalcError::CheckpointMathError)?; let missing_at_checkpoint_new = @@ -281,24 +346,25 @@ impl RewardsCalculator { let activated_amount_new = self .rewards_info .activated_amount - .checked_sub(liquidity_assets_removed) + .checked_sub(&liquidity_assets_removed) .ok_or(RewardsCalcError::CheckpointMathError)?; - let missing_at_checkpoint_after_burn = U256::from(activated_amount_new) + + let missing_at_checkpoint_after_burn = U256::from(activated_amount_new.clone().into()) .checked_mul(missing_at_checkpoint_new) - .and_then(|v| v.checked_div(self.rewards_info.activated_amount.into())) + .and_then(|v| v.checked_div(self.rewards_info.activated_amount.clone().into().into())) .ok_or(RewardsCalcError::CheckpointMathError)?; let user_current_rewards = self.calculate_rewards_impl()?; let total_available_rewards = user_current_rewards - .checked_add(self.rewards_info.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) + .checked_add(&self.rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(&self.rewards_info.rewards_already_claimed)) .ok_or(RewardsCalcError::CheckpointMathError)?; Ok(RewardInfo { activated_amount, pool_ratio_at_last_checkpoint: self.rewards_context.pool_ratio_current, - rewards_already_claimed: 0_u128, + rewards_already_claimed: Balance::zero(), missing_at_last_checkpoint: missing_at_checkpoint_after_burn, rewards_not_yet_claimed: total_available_rewards, last_checkpoint: self.rewards_context.current_time, @@ -311,13 +377,13 @@ impl RewardsCalculator { let current_rewards = self.calculate_rewards_impl()?; let total_available_rewards = current_rewards - .checked_add(self.rewards_info.rewards_not_yet_claimed) - .and_then(|v| v.checked_sub(self.rewards_info.rewards_already_claimed)) + .checked_add(&self.rewards_info.rewards_not_yet_claimed) + .and_then(|v| v.checked_sub(&self.rewards_info.rewards_already_claimed)) .ok_or(RewardsCalcError::CheckpointMathError)?; let mut info = self.rewards_info.clone(); - info.rewards_not_yet_claimed = 0_u128; + info.rewards_not_yet_claimed = Balance::zero(); info.rewards_already_claimed = current_rewards; Ok((info, total_available_rewards)) } diff --git a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs index 469b4769cb..d968c14246 100644 --- a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs +++ b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs @@ -4,14 +4,15 @@ use crate::{ }; use core::marker::PhantomData; use frame_support::pallet_prelude::*; +use sp_arithmetic::traits::{AtLeast32BitUnsigned, Zero}; use sp_core::U256; #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo)] -pub struct ActivatedLiquidityPerSchedule { - pending_positive: u128, - pending_negative: u128, +pub struct ActivatedLiquidityPerSchedule { + pending_positive: Balance, + pending_negative: Balance, pending_session_id: SessionId, - total: u128, + total: Balance, } #[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] @@ -20,16 +21,16 @@ pub enum LiquidityModification { Decrease, } -impl ActivatedLiquidityPerSchedule { - fn total(&self, now: SessionId) -> u128 { +impl ActivatedLiquidityPerSchedule { + fn total(&self, now: SessionId) -> Balance { if now <= self.pending_session_id { - self.total + self.total.clone() } else { - self.total + self.pending_positive - self.pending_negative + self.total.clone() + self.pending_positive.clone() - self.pending_negative.clone() } } - fn update(&mut self, now: SessionId, amount: u128, kind: LiquidityModification) { + fn update(&mut self, now: SessionId, amount: Balance, kind: LiquidityModification) { if now <= self.pending_session_id { if kind == LiquidityModification::Increase { self.pending_positive += amount; @@ -37,12 +38,13 @@ impl ActivatedLiquidityPerSchedule { self.pending_negative += amount; } } else { - self.total = self.total + self.pending_positive - self.pending_negative; + self.total = + self.total.clone() + self.pending_positive.clone() - self.pending_negative.clone(); if kind == LiquidityModification::Increase { self.pending_positive = amount; - self.pending_negative = 0u128; + self.pending_negative = Balance::zero(); } else { - self.pending_positive = 0u128; + self.pending_positive = Balance::zero(); self.pending_negative = amount; }; self.pending_session_id = now; @@ -54,48 +56,48 @@ impl ActivatedLiquidityPerSchedule { /// and once `pending_session_id < current_session` they are moved to `total` and become ready for /// distribution to end users #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq, TypeInfo)] -pub struct ScheduleRewards { +pub struct ScheduleRewards { // Accumulated rewards in current or past session. Once `now > pending_session_id` they // should be moved to total - pending: u128, + pending: Balance, // id of the session when pending_rewards were recently updated pending_session_id: SessionId, // total amount of rewards ready for distribution - total: u128, + total: Balance, } -impl ScheduleRewards { - pub fn provide_rewards(&mut self, now: SessionId, amount: u128) { +impl ScheduleRewards { + pub fn provide_rewards(&mut self, now: SessionId, amount: Balance) { if now <= self.pending_session_id { self.pending += amount; } else { - self.total += self.pending; + self.total += self.pending.clone(); self.pending = amount; self.pending_session_id = now; } } - pub fn total_rewards(&self, now: SessionId) -> u128 { + pub fn total_rewards(&self, now: SessionId) -> Balance { if now <= self.pending_session_id { - self.total + self.total.clone() } else { - self.total + self.pending + self.total.clone() + self.pending.clone() } } pub fn transfer_pending(&mut self, now: SessionId) { if now > self.pending_session_id { - self.total += self.pending; - self.pending = 0; + self.total += self.pending.clone(); + self.pending = Balance::zero(); self.pending_session_id = now; } } pub fn clear(&mut self, now: SessionId) { - self.total = 0; - self.pending = 0; + self.total = Balance::zero(); + self.pending = Balance::zero(); self.pending_session_id = now; } } @@ -123,7 +125,7 @@ impl ScheduleRewardsCalculator { Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); - if total_activated_liquidity > 0 { + if total_activated_liquidity > BalanceOf::::zero() { ScheduleRewardsTotal::::mutate( (liquidity_asset_id, liquidity_assets_reward), |schedule| { @@ -131,8 +133,8 @@ impl ScheduleRewardsCalculator { schedule.clear(session_id); }, ); - let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) - .checked_div(U256::from(total_activated_liquidity)) + let pending = (U256::from(total_schedule_rewards.into()) * U256::from(u128::MAX)) + .checked_div(U256::from(total_activated_liquidity.into())) .unwrap_or_default(); ScheduleRewardsPerLiquidity::::insert( (liquidity_asset_id, liquidity_assets_reward), @@ -157,8 +159,8 @@ impl ScheduleRewardsCalculator { Self::total_activated_liquidity(liquidity_asset_id, liquidity_assets_reward); let total_schedule_rewards = Self::total_schedule_rewards(liquidity_asset_id, liquidity_assets_reward); - let pending = (U256::from(total_schedule_rewards) * U256::from(u128::MAX)) - .checked_div(U256::from(total_activated_liquidity)) + let pending = (U256::from(total_schedule_rewards.into()) * U256::from(u128::MAX)) + .checked_div(U256::from(total_activated_liquidity.into())) .unwrap_or_default(); cumulative + pending } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 84f16ee5f5..1845e37e57 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1073,7 +1073,6 @@ fn liquidity_rewards_transfered_liq_tokens_produce_rewards_W() { }); } - session_issuance = ::get_all_issuance(session_number) #[test] #[serial] fn test_migrated_from_pallet_issuance() { @@ -1205,10 +1204,10 @@ const LIQUIDITY_TOKEN: u32 = 10; const FIRST_LIQUIDITY_TOKEN: u32 = 10; const SECOND_LIQUIDITY_TOKEN: u32 = 11; const TOKEN_PAIRED_WITH_MGX: u32 = 15; -const ALICE: u128 = 2; -const BOB: u128 = 3; -const CHARLIE: u128 = 4; -const EVE: u128 = 5; +const ALICE: u64 = 2; +const BOB: u64 = 3; +const CHARLIE: u64 = 4; +const EVE: u64 = 5; fn min_req_volume() -> u128 { <::Min3rdPartyRewardValutationPerSession as sp_core::Get>::get() diff --git a/pallets/proof-of-stake/src/utils.rs b/pallets/proof-of-stake/src/utils.rs index 552618d632..072ad3c254 100644 --- a/pallets/proof-of-stake/src/utils.rs +++ b/pallets/proof-of-stake/src/utils.rs @@ -1,7 +1,10 @@ +use core::convert::TryInto; + use crate as pos; use frame_support::traits::Hooks; -use frame_system::{Config, Pallet}; +use frame_system::{pallet_prelude::*, Config, Pallet}; use mangata_support::traits::LiquidityMiningApi; +use pos::BalanceOf; use sp_core::Get; use sp_runtime::Saturating; @@ -36,15 +39,15 @@ where } } -pub fn forward_to_block(n: T::BlockNumber) +pub fn forward_to_block(n: BlockNumberFor) where T: pos::Config, T: frame_system::Config, { - forward_to_block_with_custom_rewards::(n, 10000); + forward_to_block_with_custom_rewards::(n, 10000u128.try_into().unwrap_or_default()); } -pub fn forward_to_block_with_custom_rewards(n: T::BlockNumber, rewards: u128) +pub fn forward_to_block_with_custom_rewards(n: BlockNumberFor, rewards: BalanceOf) where T: pos::Config, T: frame_system::Config, @@ -61,7 +64,7 @@ where TokensOf::::mint( pos::Pallet::::native_token_id().into(), &::LiquidityMiningIssuanceVault::get().into(), - rewards.into(), + rewards, ) .unwrap(); diff --git a/pallets/xyk/src/lib.rs b/pallets/xyk/src/lib.rs index 9ccea0d776..5c0553d209 100644 --- a/pallets/xyk/src/lib.rs +++ b/pallets/xyk/src/lib.rs @@ -3567,9 +3567,9 @@ impl Valuate, CurrencyIdOf> for Pallet { } fn valuate_non_liquidity_token( - non_liquidity_token_id: Self::CurrencyId, - amount: Self::Balance, - ) -> Self::Balance { + non_liquidity_token_id: CurrencyIdOf, + amount: BalanceOf, + ) -> BalanceOf { let native_token_id = Pallet::::native_token_id(); let (native_reserves, token_reserves) = From e02fbb17b464c52f972d7e37bb374489e9d00851 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sat, 11 Nov 2023 17:59:43 +0100 Subject: [PATCH 086/125] Remove unwraps from production code --- pallets/proof-of-stake/src/lib.rs | 1 - pallets/proof-of-stake/src/reward_info.rs | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 1914d81a26..9892ab13c5 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -1646,4 +1646,3 @@ impl LiquidityMiningApi> for Pallet { } // TODO: use correct weights in on_initilize_hook // TODO: limit amount of active schedules -// TODO: unwraps!!! diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index c9446971c3..90047f30a9 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -171,7 +171,7 @@ where ctx: &RewardsContext, user_info: &RewardInfo, ) -> Option { - let time_passed = ctx.current_time.checked_sub(user_info.last_checkpoint).unwrap(); + let time_passed = ctx.current_time.checked_sub(user_info.last_checkpoint)?; let q_pow = calculate_q_pow(Q, time_passed); Some(user_info.missing_at_last_checkpoint * U256::from(REWARDS_PRECISION) / q_pow) } @@ -187,8 +187,7 @@ where .checked_mul(pool_rewards_ratio_new)? .checked_div(U256::from(u128::MAX))?; // always fit into u128 - let time_passed = ctx.current_time.checked_sub(user_info.last_checkpoint).unwrap(); - // .ok_or(Error::::PastTimeCalculation)?; + let time_passed = ctx.current_time.checked_sub(user_info.last_checkpoint)?; let mut cummulative_work = U256::from(0); let mut cummulative_work_max_possible_for_ratio = U256::from(1); From 2e3c71371a7fdbfaa6c73e5d6cb8b025a08a67af Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sat, 11 Nov 2023 18:00:57 +0100 Subject: [PATCH 087/125] add TODO --- pallets/proof-of-stake/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 9892ab13c5..afc4a07455 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -1646,3 +1646,4 @@ impl LiquidityMiningApi> for Pallet { } // TODO: use correct weights in on_initilize_hook // TODO: limit amount of active schedules +// TODO: STATIC ASSERT ON NUMBER OF ACTIVE SCHEDULES From b8071e419bf333990501efc6425723f22f1bf6ef Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sat, 11 Nov 2023 18:20:25 +0100 Subject: [PATCH 088/125] Const variable for limit of schedules per block --- pallets/proof-of-stake/src/lib.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index afc4a07455..e5d828a10b 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -216,9 +216,7 @@ pub mod pallet { return Default::default() } - const AMOUNT_PER_BLOCK: u64 = 5; - - for _ in 0..AMOUNT_PER_BLOCK { + for _ in 0..T::SchedulesPerBlock::get() { // READS PER ITERTION // // ON VALID SCHEDULE (AVERAGE) ====> 3R + 1 W + N*R + N*W @@ -307,7 +305,12 @@ pub mod pallet { break } } - Default::default() + + // always use same amount of block space even if no schedules were processed + T::DbWeight::get().reads(3) + + T::DbWeight::get().writes(1) + + T::DbWeight::get().reads(T::SchedulesPerBlock::get().into()) + + T::DbWeight::get().writes(T::SchedulesPerBlock::get().into()) } } @@ -368,6 +371,9 @@ pub mod pallet { /// The minimum number of rewards per session for schedule rewards type Min3rdPartyRewardValutationPerSession: Get; type Min3rdPartyRewardVolume: Get; + type ActiveSchedulesLimit: Get; + type SchedulesPerBlock: Get; + type WeightInfo: WeightInfo; type ValuationApi: ValutationApiTrait; } @@ -1644,6 +1650,5 @@ impl LiquidityMiningApi> for Pallet { }); } } -// TODO: use correct weights in on_initilize_hook // TODO: limit amount of active schedules // TODO: STATIC ASSERT ON NUMBER OF ACTIVE SCHEDULES From b230c7e5f6060a80a10a76e9f3f9bc3ada0af9a7 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sat, 11 Nov 2023 18:45:21 +0100 Subject: [PATCH 089/125] minor fixes --- pallets/bootstrap/src/mock.rs | 2 ++ pallets/fee-lock/src/mock.rs | 6 +++--- pallets/proof-of-stake/src/mock.rs | 2 ++ pallets/xyk/src/mock.rs | 2 ++ pallets/xyk/src/tests.rs | 10 ++++++++-- runtime/common/src/lib.rs | 2 ++ 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pallets/bootstrap/src/mock.rs b/pallets/bootstrap/src/mock.rs index f20e1e6be8..90086dd3c4 100644 --- a/pallets/bootstrap/src/mock.rs +++ b/pallets/bootstrap/src/mock.rs @@ -174,6 +174,8 @@ impl pallet_proof_of_stake::Config for Test { type Min3rdPartyRewardValutationPerSession = ConstU128<10>; type Min3rdPartyRewardVolume = ConstU128<10>; type ValuationApi = Xyk; + type ActiveSchedulesLimit = ConstU32<10>; + type SchedulesPerBlock = ConstU32<5>; } impl BootstrapBenchmarkingConfig for Test {} diff --git a/pallets/fee-lock/src/mock.rs b/pallets/fee-lock/src/mock.rs index 46866fae90..bdd0a6f6cb 100644 --- a/pallets/fee-lock/src/mock.rs +++ b/pallets/fee-lock/src/mock.rs @@ -149,9 +149,9 @@ impl Valuate for MockPoolReservesP } fn valuate_non_liquidity_token( - liquidity_token_id: Self::CurrencyId, - liquidity_token_amount: Self::Balance, - ) -> Self::Balance { + liquidity_token_id: TokenId, + liquidity_token_amount: Balance, + ) -> Balance { unimplemented!() } } diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index 0e0c273685..e5b08a1ebb 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -287,6 +287,8 @@ impl pos::Config for Test { type Min3rdPartyRewardVolume = ConstU128<10>; type WeightInfo = (); type ValuationApi = MockValuationApi; + type ActiveSchedulesLimit = ConstU32<10>; + type SchedulesPerBlock = ConstU32<5>; } #[cfg(feature = "runtime-benchmarks")] diff --git a/pallets/xyk/src/mock.rs b/pallets/xyk/src/mock.rs index 53ff2847b2..cf418bf204 100644 --- a/pallets/xyk/src/mock.rs +++ b/pallets/xyk/src/mock.rs @@ -326,6 +326,8 @@ impl pallet_proof_of_stake::Config for Test { type Min3rdPartyRewardValutationPerSession = ConstU128<10>; type Min3rdPartyRewardVolume = ConstU128<10>; type ValuationApi = XykStorage; + type ActiveSchedulesLimit = ConstU32<10>; + type SchedulesPerBlock = ConstU32<5>; } #[cfg(feature = "runtime-benchmarks")] diff --git a/pallets/xyk/src/tests.rs b/pallets/xyk/src/tests.rs index ab79c1d523..8f57a4cc89 100644 --- a/pallets/xyk/src/tests.rs +++ b/pallets/xyk/src/tests.rs @@ -2644,8 +2644,14 @@ fn valuate_token_paired_with_mgx() { ) .unwrap(); - assert_eq!( as Valuate>::valuate_non_liquidity_token(first_token, 100), 199); + assert_eq!( + as Valuate<_, _>>::valuate_non_liquidity_token(first_token, 100), + 199 + ); - assert_eq!( as Valuate>::valuate_non_liquidity_token(second_token, 100), 49); + assert_eq!( + as Valuate<_, _>>::valuate_non_liquidity_token(second_token, 100), + 49 + ); }); } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 71d9539678..366ad4df6c 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1481,6 +1481,8 @@ where // TODO: allign properly pub const Min3rdPartyRewardValutationPerSession: u128 = 100 * 30_000 * currency::DOLLARS; pub const Min3rdPartyRewardVolume: u128 = 100 * 30_000 * currency::DOLLARS; + pub const ActiveSchedulesLimit: u32 = 10_000; + pub const SchedulesPerBlock: u32 = 5; } } } From d33b25878ad978cb9e2003de9a34f4f4e72800f6 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sun, 12 Nov 2023 11:38:59 +0100 Subject: [PATCH 090/125] wip --- runtime/mangata-kusama/src/lib.rs | 2 ++ runtime/mangata-rococo/src/lib.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index d3144cd2ec..688755625f 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -272,6 +272,8 @@ impl pallet_proof_of_stake::Config for Runtime { type Min3rdPartyRewardValutationPerSession = cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; type Min3rdPartyRewardVolume = cfg::pallet_proof_of_stake::Min3rdPartyRewardVolume; + type ActiveSchedulesLimit = cfg::pallet_proof_of_stake::ActiveSchedulesLimit; + type SchedulesPerBlock = cfg::pallet_proof_of_stake::SchedulesPerBlock; type ValuationApi = Xyk; } diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index 3a7987ae0b..0b00cdf997 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -272,6 +272,8 @@ impl pallet_proof_of_stake::Config for Runtime { type Min3rdPartyRewardValutationPerSession = cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; type Min3rdPartyRewardVolume = cfg::pallet_proof_of_stake::Min3rdPartyRewardVolume; + type ActiveSchedulesLimit = cfg::pallet_proof_of_stake::ActiveSchedulesLimit; + type SchedulesPerBlock = cfg::pallet_proof_of_stake::SchedulesPerBlock; type ValuationApi = Xyk; } From ca42cfe544669197bf35001e61cebb75c39e3617 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sun, 12 Nov 2023 14:03:44 +0100 Subject: [PATCH 091/125] limit schedules list --- pallets/proof-of-stake/src/lib.rs | 82 +++++++---- pallets/proof-of-stake/src/mock.rs | 1 - pallets/proof-of-stake/src/tests.rs | 202 +++++++++++++++------------- pallets/xyk/src/mock.rs | 1 - runtime/common/src/lib.rs | 1 - runtime/mangata-kusama/src/lib.rs | 1 - runtime/mangata-rococo/src/lib.rs | 1 - 7 files changed, 165 insertions(+), 124 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index e5d828a10b..3714d85afc 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -107,6 +107,14 @@ pub struct Schedule { amount_per_session: BalanceOf, } +#[derive(Encode, Decode, Default, TypeInfo)] +pub struct SchedulesList { + pub head: Option, + pub tail: Option, + pub pos: Option, + pub count: u64, +} + use frame_support::{ dispatch::{DispatchErrorWithPostInfo, DispatchResult, PostDispatchInfo}, ensure, @@ -212,8 +220,8 @@ pub mod pallet { // NOTE: 1R if Self::is_new_session() { - ScheduleListPos::::kill(); - return Default::default() + SchedulesListMetadata::::mutate(|s| s.pos = None); + return Default::default(); } for _ in 0..T::SchedulesPerBlock::get() { @@ -236,9 +244,10 @@ pub mod pallet { // - 1 x WRITE update elem before last : ALWAYS (pesemisitic) // NOTE: 1R - let last_valid = ScheduleListPos::::get(); + let s = SchedulesListMetadata::::get(); + let last_valid = s.pos; // NOTE: 1R - let pos = match (last_valid, ScheduleListHead::::get()) { + let pos = match (last_valid, s.head) { (Some(pos), _) => { if let Some((_schedule, next)) = RewardsSchedulesList::::get(pos) { next @@ -262,25 +271,36 @@ pub mod pallet { ); } // NOTE: 1W - ScheduleListPos::::put(pos_val); + SchedulesListMetadata::::mutate(|s| s.pos = Some(pos_val)); } else { // NOTE: 2R - match (Self::head(), Self::tail()) { + // + let meta = Self::list_metadata(); + match (meta.head, meta.tail) { (Some(head), Some(tail)) if head == pos_val && head != tail => if let Some(next) = next { // NOTE: 1W - ScheduleListHead::::put(next); + SchedulesListMetadata::::mutate(|s| { + s.head = Some(next); + s.count -= 1; + }); }, (Some(head), Some(tail)) if tail == pos_val && head == tail => { // NOTE: 3W - ScheduleListTail::::kill(); - ScheduleListHead::::kill(); - ScheduleListPos::::kill(); + SchedulesListMetadata::::mutate(|s| { + s.tail = None; + s.head = None; + s.pos = None; + s.count = 0; + }); }, (Some(head), Some(tail)) if tail == pos_val && head != tail => if let Some(last_valid) = last_valid { // NOTE: 1W - ScheduleListTail::::put(last_valid); + SchedulesListMetadata::::mutate(|s| { + s.tail = Some(last_valid); + s.count -= 1; + }); // NOTE: 1R 1W RewardsSchedulesList::::mutate(last_valid, |data| { if let Some((_schedule, next)) = data.as_mut() { @@ -290,6 +310,9 @@ pub mod pallet { }, (Some(_head), Some(_tail)) => if let Some(last_valid) = last_valid { + SchedulesListMetadata::::mutate(|s| { + s.count -= 1; + }); // NOTE: 1R 1W RewardsSchedulesList::::mutate(last_valid, |data| { if let Some((_schedule, prev_next)) = data.as_mut() { @@ -371,7 +394,6 @@ pub mod pallet { /// The minimum number of rewards per session for schedule rewards type Min3rdPartyRewardValutationPerSession: Get; type Min3rdPartyRewardVolume: Get; - type ActiveSchedulesLimit: Get; type SchedulesPerBlock: Get; type WeightInfo: WeightInfo; @@ -501,16 +523,8 @@ pub mod pallet { >; #[pallet::storage] - #[pallet::getter(fn pos)] - pub type ScheduleListPos = StorageValue<_, ScheduleId, OptionQuery>; - - #[pallet::storage] - #[pallet::getter(fn head)] - pub type ScheduleListHead = StorageValue<_, ScheduleId, OptionQuery>; - - #[pallet::storage] - #[pallet::getter(fn tail)] - pub type ScheduleListTail = StorageValue<_, ScheduleId, OptionQuery>; + #[pallet::getter(fn list_metadata)] + pub type SchedulesListMetadata = StorageValue<_, SchedulesList, ValueQuery>; #[pallet::storage] pub type RewardsSchedulesList = @@ -518,7 +532,6 @@ pub mod pallet { /// Maps liquidity token to list of tokens that it ever was rewarded with #[pallet::storage] - pub type RewardTokensPerPool = StorageDoubleMap< _, Twox64Concat, @@ -1406,8 +1419,9 @@ impl Pallet { ExistenceRequirement::KeepAlive, )?; - let head = ScheduleListHead::::get(); - let tail = ScheduleListTail::::get(); + let head = SchedulesListMetadata::::get().head; + let tail = SchedulesListMetadata::::get().tail; + let schedule = Schedule { scheduled_at: Self::session_index() as u64, last_session: schedule_end.saturated_into::(), @@ -1420,8 +1434,11 @@ impl Pallet { (None, None) => { // first schedule RewardsSchedulesList::::insert(0, (schedule, None::)); - ScheduleListHead::::put(0); - ScheduleListTail::::put(0); + SchedulesListMetadata::::mutate(|s| { + s.head = Some(0); + s.tail = Some(0); + s.count = 1; + }); }, (Some(_head), Some(tail)) => { RewardsSchedulesList::::mutate(tail, |info| { @@ -1430,7 +1447,15 @@ impl Pallet { } }); RewardsSchedulesList::::insert(tail + 1, (schedule, None::)); - ScheduleListTail::::put(tail + 1); + SchedulesListMetadata::::try_mutate(|s| { + if s.count < T::RewardsSchedulesLimit::get().into() { + s.tail = Some(tail + 1); + s.count += 1; + Ok(s.count) + } else { + Err(Error::::TooManySchedules) + } + })?; }, _ => {}, // invariant assures this will never happen } @@ -1650,5 +1675,4 @@ impl LiquidityMiningApi> for Pallet { }); } } -// TODO: limit amount of active schedules // TODO: STATIC ASSERT ON NUMBER OF ACTIVE SCHEDULES diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index e5b08a1ebb..a9c8488f50 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -287,7 +287,6 @@ impl pos::Config for Test { type Min3rdPartyRewardVolume = ConstU128<10>; type WeightInfo = (); type ValuationApi = MockValuationApi; - type ActiveSchedulesLimit = ConstU32<10>; type SchedulesPerBlock = ConstU32<5>; } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 1845e37e57..451757f2de 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -47,7 +47,9 @@ fn process_all_schedules_in_current_session() { panic!("couldnt process all schedules within the session"); } - if !ProofOfStake::is_new_session() && ProofOfStake::pos() == ProofOfStake::tail() { + if !ProofOfStake::is_new_session() && + ProofOfStake::list_metadata().pos == ProofOfStake::list_metadata().tail + { break } roll_to_next_block::(); @@ -1370,8 +1372,8 @@ fn rewards_schedule_is_stored() { None ) ); - assert_eq!(ScheduleListTail::::get(), Some(0u64)); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); }); } @@ -1390,6 +1392,7 @@ fn rewards_linked_list_insert_multiple_schedules() { REWARD_AMOUNT, 1u32.into() ),); + assert_eq!(ProofOfStake::list_metadata().count, 1); assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1398,6 +1401,7 @@ fn rewards_linked_list_insert_multiple_schedules() { REWARD_AMOUNT, 2u32.into() ),); + assert_eq!(ProofOfStake::list_metadata().count, 2); assert_eq!( RewardsSchedulesList::::get(0).unwrap(), @@ -1427,9 +1431,9 @@ fn rewards_linked_list_insert_multiple_schedules() { ) ); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - - assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().count, 2); }); } @@ -1456,57 +1460,56 @@ fn rewards_linked_list_removes_outdated_schedule_automatically() { REWARD_AMOUNT, 2u32.into() ),); + assert_eq!(ProofOfStake::list_metadata().count, 2); assert_ok!(RewardsSchedulesList::::get(0).ok_or(())); assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListPos::::get(), None); - assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().tail, Some(1u64)); forward_to_block::(2); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(1u64)); - assert_eq!(ScheduleListPos::::get(), Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().pos, Some(1u64)); forward_to_block::(5); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(1u64)); - assert_eq!(ScheduleListPos::::get(), Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().pos, Some(1u64)); forward_to_block::(11); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(1u64)); - assert_eq!(ScheduleListPos::::get(), Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().pos, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().count, 2); forward_to_block::(21); - assert_eq!(ScheduleListHead::::get(), Some(1u64)); - assert_eq!(ScheduleListTail::::get(), Some(1u64)); - assert_eq!(ScheduleListPos::::get(), Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().count, 1); + assert_eq!(ProofOfStake::list_metadata().head, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().pos, Some(1u64)); forward_to_block::(25); - assert_eq!(ScheduleListHead::::get(), Some(1u64)); - assert_eq!(ScheduleListTail::::get(), Some(1u64)); - assert_eq!(ScheduleListPos::::get(), Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().pos, Some(1u64)); forward_to_block::(29); - assert_eq!(ScheduleListHead::::get(), Some(1u64)); - assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(1u64)); forward_to_block::(30); - assert_eq!(ScheduleListHead::::get(), None); - assert_eq!(ScheduleListTail::::get(), None); - assert_eq!(ScheduleListPos::::get(), None); + assert_eq!(ProofOfStake::list_metadata().head, None); + assert_eq!(ProofOfStake::list_metadata().tail, None); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().count, 0); }); } -// rewards_first_schedule_from_linked_list -// rewards_last_schedule_from_linked_list -// rewards_middle_schedule_from_linked_list -// rewards_multipleall_schedule_from_linked_list - fn insert_schedule_ending_at_session(n: u32) { assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1534,17 +1537,19 @@ fn rewards_first_schedule_from_linked_list_of_four() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListPos::::get(), None); - assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().tail, Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().count, 4); forward_to_block::(21); - assert_eq!(ScheduleListHead::::get(), Some(1u64)); - assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(3u64)); assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, Some(2u64)); assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); + assert_eq!(ProofOfStake::list_metadata().count, 3); }); } @@ -1565,17 +1570,19 @@ fn remove_last_schedule_from_linked_list() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListPos::::get(), None); - assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().tail, Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().count, 4); forward_to_block::(21); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(2u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(2u64)); assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, Some(2u64)); assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, None); + assert_eq!(ProofOfStake::list_metadata().count, 3); }); } @@ -1596,17 +1603,19 @@ fn remove_middle_schedule_from_linked_list() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListPos::::get(), None); - assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().tail, Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().count, 4); forward_to_block::(21); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(3u64)); assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(2u64)); assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); + assert_eq!(ProofOfStake::list_metadata().count, 3); }); } @@ -1627,16 +1636,18 @@ fn remove_first_few_elems_at_once_from_linked_list() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListPos::::get(), None); - assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().tail, Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().count, 4); forward_to_block::(20); - assert_eq!(ScheduleListHead::::get(), Some(2u64)); - assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(2u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(3u64)); assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(3u64)); assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); + assert_eq!(ProofOfStake::list_metadata().count, 2); }); } @@ -1657,16 +1668,18 @@ fn remove_few_last_elems_at_once_from_linked_list() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListPos::::get(), None); - assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().tail, Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().count, 4); forward_to_block::(21); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(1u64)); assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, None); + assert_eq!(ProofOfStake::list_metadata().count, 2); }); } @@ -1687,16 +1700,18 @@ fn remove_few_middle_elements_from_linkedd_list() { assert_ok!(RewardsSchedulesList::::get(1).ok_or(())); assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListPos::::get(), None); - assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().tail, Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().count, 4); forward_to_block::(21); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(3u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(3u64)); assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(3u64)); assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, None); + assert_eq!(ProofOfStake::list_metadata().count, 2); }); } @@ -1719,17 +1734,19 @@ fn remove_random_elements_from_linked_list() { assert_ok!(RewardsSchedulesList::::get(2).ok_or(())); assert_ok!(RewardsSchedulesList::::get(3).ok_or(())); assert_ok!(RewardsSchedulesList::::get(4).ok_or(())); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListPos::::get(), None); - assert_eq!(ScheduleListTail::::get(), Some(4u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().tail, Some(4u64)); + assert_eq!(ProofOfStake::list_metadata().count, 5); forward_to_block::(21); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(4u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(4u64)); assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(2u64)); assert_eq!(RewardsSchedulesList::::get(2u64).unwrap().1, Some(4u64)); assert_eq!(RewardsSchedulesList::::get(4u64).unwrap().1, None); + assert_eq!(ProofOfStake::list_metadata().count, 3); }); } @@ -1749,27 +1766,30 @@ fn remove_random_elements_from_linked_list_over_time() { insert_schedule_ending_at_session(1); // 5 insert_schedule_ending_at_session(3); // 6 - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListPos::::get(), None); - assert_eq!(ScheduleListTail::::get(), Some(6u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().tail, Some(6u64)); + assert_eq!(ProofOfStake::list_metadata().count, 7); roll_to_session::(2); process_all_schedules_in_current_session(); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(6u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(6u64)); assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(1u64)); assert_eq!(RewardsSchedulesList::::get(1u64).unwrap().1, Some(3u64)); assert_eq!(RewardsSchedulesList::::get(3u64).unwrap().1, Some(4u64)); assert_eq!(RewardsSchedulesList::::get(4u64).unwrap().1, Some(6u64)); assert_eq!(RewardsSchedulesList::::get(6u64).unwrap().1, None); + assert_eq!(ProofOfStake::list_metadata().count, 5); roll_to_session::(3); process_all_schedules_in_current_session(); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(6u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(6u64)); assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(6u64)); assert_eq!(RewardsSchedulesList::::get(6u64).unwrap().1, None); + assert_eq!(ProofOfStake::list_metadata().count, 2); }); } @@ -1791,25 +1811,27 @@ fn remove_lot_of_schedules_from_linked_list_in_single_iteration() { insert_schedule_ending_at_session(1); // 5 insert_schedule_ending_at_session(3); // 6 - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListPos::::get(), None); - assert_eq!(ScheduleListTail::::get(), Some(8u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().pos, None); + assert_eq!(ProofOfStake::list_metadata().tail, Some(8u64)); + assert_eq!(ProofOfStake::list_metadata().count, 9); forward_to_block::(24); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(8u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(8u64)); assert_eq!(RewardsSchedulesList::::get(0u64).unwrap().1, Some(8u64)); assert_eq!(RewardsSchedulesList::::get(8u64).unwrap().1, None); + assert_eq!(ProofOfStake::list_metadata().count, 2); forward_to_block::(100); - assert_eq!(ScheduleListHead::::get(), None); - assert_eq!(ScheduleListTail::::get(), None); + assert_eq!(ProofOfStake::list_metadata().head, None); + assert_eq!(ProofOfStake::list_metadata().tail, None); + assert_eq!(ProofOfStake::list_metadata().count, 0); }); } #[test] -#[ignore] #[serial] fn number_of_active_schedules_is_limited() { ExtBuilder::new() @@ -1860,8 +1882,8 @@ fn duplicated_schedules_works() { .execute_with_default_mocks(|| { System::set_block_number(1); - assert_eq!(ScheduleListHead::::get(), None); - assert_eq!(ScheduleListTail::::get(), None); + assert_eq!(ProofOfStake::list_metadata().head, None); + assert_eq!(ProofOfStake::list_metadata().tail, None); assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1871,8 +1893,8 @@ fn duplicated_schedules_works() { 5u32.into() )); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(0u64)); assert_ok!(ProofOfStake::reward_pool( RuntimeOrigin::signed(ALICE), @@ -1882,8 +1904,8 @@ fn duplicated_schedules_works() { 5u32.into() )); - assert_eq!(ScheduleListHead::::get(), Some(0u64)); - assert_eq!(ScheduleListTail::::get(), Some(1u64)); + assert_eq!(ProofOfStake::list_metadata().head, Some(0u64)); + assert_eq!(ProofOfStake::list_metadata().tail, Some(1u64)); }); } diff --git a/pallets/xyk/src/mock.rs b/pallets/xyk/src/mock.rs index cf418bf204..8726281ea8 100644 --- a/pallets/xyk/src/mock.rs +++ b/pallets/xyk/src/mock.rs @@ -326,7 +326,6 @@ impl pallet_proof_of_stake::Config for Test { type Min3rdPartyRewardValutationPerSession = ConstU128<10>; type Min3rdPartyRewardVolume = ConstU128<10>; type ValuationApi = XykStorage; - type ActiveSchedulesLimit = ConstU32<10>; type SchedulesPerBlock = ConstU32<5>; } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 366ad4df6c..79977c02ff 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1481,7 +1481,6 @@ where // TODO: allign properly pub const Min3rdPartyRewardValutationPerSession: u128 = 100 * 30_000 * currency::DOLLARS; pub const Min3rdPartyRewardVolume: u128 = 100 * 30_000 * currency::DOLLARS; - pub const ActiveSchedulesLimit: u32 = 10_000; pub const SchedulesPerBlock: u32 = 5; } } diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index 688755625f..39f007e065 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -272,7 +272,6 @@ impl pallet_proof_of_stake::Config for Runtime { type Min3rdPartyRewardValutationPerSession = cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; type Min3rdPartyRewardVolume = cfg::pallet_proof_of_stake::Min3rdPartyRewardVolume; - type ActiveSchedulesLimit = cfg::pallet_proof_of_stake::ActiveSchedulesLimit; type SchedulesPerBlock = cfg::pallet_proof_of_stake::SchedulesPerBlock; type ValuationApi = Xyk; } diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index 0b00cdf997..2860982f1b 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -272,7 +272,6 @@ impl pallet_proof_of_stake::Config for Runtime { type Min3rdPartyRewardValutationPerSession = cfg::pallet_proof_of_stake::Min3rdPartyRewardValutationPerSession; type Min3rdPartyRewardVolume = cfg::pallet_proof_of_stake::Min3rdPartyRewardVolume; - type ActiveSchedulesLimit = cfg::pallet_proof_of_stake::ActiveSchedulesLimit; type SchedulesPerBlock = cfg::pallet_proof_of_stake::SchedulesPerBlock; type ValuationApi = Xyk; } From d421c6094253e569553dc415d18e6cda99b8943c Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sun, 12 Nov 2023 14:03:56 +0100 Subject: [PATCH 092/125] limit schedules list --- pallets/bootstrap/src/mock.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pallets/bootstrap/src/mock.rs b/pallets/bootstrap/src/mock.rs index 90086dd3c4..dc03499726 100644 --- a/pallets/bootstrap/src/mock.rs +++ b/pallets/bootstrap/src/mock.rs @@ -174,7 +174,6 @@ impl pallet_proof_of_stake::Config for Test { type Min3rdPartyRewardValutationPerSession = ConstU128<10>; type Min3rdPartyRewardVolume = ConstU128<10>; type ValuationApi = Xyk; - type ActiveSchedulesLimit = ConstU32<10>; type SchedulesPerBlock = ConstU32<5>; } From 1855a203e5dd53d8d44874f6ea056997e2445ebe Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sun, 12 Nov 2023 14:16:54 +0100 Subject: [PATCH 093/125] update weights of on_initialize_hook --- pallets/proof-of-stake/src/lib.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 3714d85afc..18b8b0a938 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -227,20 +227,18 @@ pub mod pallet { for _ in 0..T::SchedulesPerBlock::get() { // READS PER ITERTION // - // ON VALID SCHEDULE (AVERAGE) ====> 3R + 1 W + N*R + N*W - // 3 x READ HEAD,TAIL,POS : ALWAYS - // 1 x WRITE ScheduleListPos : ALWAYS (pesimistic) + // ON VALID SCHEDULE (AVERAGE) ====> 1 RW + N*R + N*W + // 1 x READ/WRITE SCHEDULE META(HEAD,TAIL,POS) : ALWAYS // PER ITER: // - READ RewardsSchedulesList : ALWAYS // - WRITE ScheduleRewardsTotal : ALWAYS (pesemisitic) - // ON OUTDATED SCHEDULE (PESIMITIC) =====> 3R + 1W + (N-1)*W + 2W - // 3 x READ HEAD,TAIL,POS : ALWAYS - // 1 x WRITE ScheduleListPos `next` : ONCE (pesemisitic) + // ON OUTDATED SCHEDULE (PESIMITIC) =====> 1 RW + (N-1)*W + 1W + // 1 x READ/WRITE SCHEDULE META(HEAD,TAIL,POS) : ALWAYS // REMOVE N-1 SCHEDULES IN THE MIDDDLE // - 1 x WRITE update previous schedudle `next` : ALWAYS (pesemisitic) // REMOVE LAST ELEM: - // - 1 x WRITE update list tail + // - 1 x write update list tail (already counted in) // - 1 x WRITE update elem before last : ALWAYS (pesemisitic) // NOTE: 1R @@ -330,7 +328,7 @@ pub mod pallet { } // always use same amount of block space even if no schedules were processed - T::DbWeight::get().reads(3) + + T::DbWeight::get().reads(1) + T::DbWeight::get().writes(1) + T::DbWeight::get().reads(T::SchedulesPerBlock::get().into()) + T::DbWeight::get().writes(T::SchedulesPerBlock::get().into()) From e936b3ce87445bc7fdf15807cc077883b29e523e Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sun, 12 Nov 2023 14:24:44 +0100 Subject: [PATCH 094/125] add const asserts for PoS params --- pallets/proof-of-stake/rpc/src/lib.rs | 22 ++++++++++++++-------- pallets/proof-of-stake/src/benchmarking.rs | 1 - pallets/proof-of-stake/src/lib.rs | 1 - runtime/mangata-kusama/src/lib.rs | 6 ++++++ runtime/mangata-rococo/src/lib.rs | 6 ++++++ 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/pallets/proof-of-stake/rpc/src/lib.rs b/pallets/proof-of-stake/rpc/src/lib.rs index a3832a91d1..0a478229a9 100644 --- a/pallets/proof-of-stake/rpc/src/lib.rs +++ b/pallets/proof-of-stake/rpc/src/lib.rs @@ -121,13 +121,19 @@ where let at = self.client.info().best_hash; api.calculate_3rdparty_rewards_all(at, account) - .map(|vec| vec.into_iter().map(|(token1, token2, balance)| (token1, token2, Into::::into(balance))).collect()) - .map_err(|e| { - JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( - 1, - "Unable to serve the request", - Some(format!("{:?}", e)), - ))) - }) + .map(|vec| { + vec.into_iter() + .map(|(token1, token2, balance)| { + (token1, token2, Into::::into(balance)) + }) + .collect() + }) + .map_err(|e| { + JsonRpseeError::Call(CallError::Custom(ErrorObject::owned( + 1, + "Unable to serve the request", + Some(format!("{:?}", e)), + ))) + }) } } diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 736e47836f..91c191a75a 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -32,7 +32,6 @@ where T: Config, { crate::utils::roll_to_next_session::(); - } benchmarks! { diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 18b8b0a938..96a0a6d525 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -1673,4 +1673,3 @@ impl LiquidityMiningApi> for Pallet { }); } } -// TODO: STATIC ASSERT ON NUMBER OF ACTIVE SCHEDULES diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index 39f007e065..6bb996441a 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -225,6 +225,12 @@ const_assert!( ::MAX_VESTING_SCHEDULES ); +const_assert!( + ::RewardsSchedulesLimit::get() >= + (::SchedulesPerBlock::get() - 1) * + ::BlocksPerRound::get() +); + impl orml_tokens::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index 2860982f1b..69288bb240 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -497,6 +497,12 @@ impl pallet_collective_mangata::Config for Runtime { // Also since 1 block is used for session change, atleast 1 block more needed for extrinsics to work const_assert!(::BlocksPerRound::get() >= 2); +const_assert!( + ::RewardsSchedulesLimit::get() >= + (::SchedulesPerBlock::get() - 1) * + ::BlocksPerRound::get() +); + impl parachain_staking::Config for Runtime { type RuntimeEvent = RuntimeEvent; type StakingReservesProvider = MultiPurposeLiquidity; From 6aec5b27ad65b3d1bfa6909c838981e3d0fb8921 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sun, 12 Nov 2023 20:22:37 +0100 Subject: [PATCH 095/125] revert ci changes --- .github/workflows/reusable-build-and-test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 3495e9e4d6..63b1a0d4e2 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -222,12 +222,9 @@ jobs: /usr/local/cargo/registry key: cargo-benchmark-cache-${{ inputs.cache_version }}-${{ hashFiles('Cargo.lock') }} - name: Run benchmarks tests - run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock + run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock -p pallet-proof-of-stake -p pallet-proof-of-stake - name: Run benchmarks tests run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-bootstrap - # NOTE: MGX-742 - - name: Run benchmarks tests - run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-proof-of-stake build-and-run-try-runtime: name: Run try-runtime checks From 1531f6a9f4cf0507084b25b69fc3cdeae996b4cb Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 13 Nov 2023 09:05:30 +0100 Subject: [PATCH 096/125] fix features usign subalfred & remove deps to archived substrate repo --- Cargo.lock | 3871 +++++++---------- pallets/proof-of-stake/Cargo.toml | 20 +- pallets/proof-of-stake/rpc/Cargo.toml | 29 +- pallets/proof-of-stake/runtime-api/Cargo.toml | 36 +- pallets/xyk/runtime-api/Cargo.toml | 8 +- runtime/mangata-kusama/Cargo.toml | 28 +- 6 files changed, 1551 insertions(+), 2441 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e537a18aa4..622cfdecf4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,15 +12,6 @@ dependencies = [ "regex", ] -[[package]] -name = "addr2line" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" -dependencies = [ - "gimli 0.26.2", -] - [[package]] name = "addr2line" version = "0.19.0" @@ -506,12 +497,6 @@ dependencies = [ "sha3", ] -[[package]] -name = "array-bytes" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" - [[package]] name = "array-bytes" version = "6.2.0" @@ -886,12 +871,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base58" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" - [[package]] name = "base64" version = "0.13.1" @@ -1297,15 +1276,6 @@ dependencies = [ "nom", ] -[[package]] -name = "cfg-expr" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" -dependencies = [ - "smallvec", -] - [[package]] name = "cfg-expr" version = "0.15.5" @@ -1573,15 +1543,15 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal 0.3.4", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -1622,26 +1592,26 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-block-builder", "sp-consensus-aura", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-core", + "sp-inherents", + "sp-io", "sp-offchain", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std", "sp-transaction-pool", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-version 22.0.0", - "sp-weights 20.0.0", + "sp-ver", + "sp-version", + "sp-weights", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "ver-api", "xyk-runtime-api", ] @@ -1770,7 +1740,7 @@ version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ - "cranelift-entity 0.95.1", + "cranelift-entity", ] [[package]] @@ -1783,7 +1753,7 @@ dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", - "cranelift-entity 0.95.1", + "cranelift-entity", "cranelift-isle", "gimli 0.27.3", "hashbrown 0.13.2", @@ -1808,15 +1778,6 @@ version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" -[[package]] -name = "cranelift-entity" -version = "0.93.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" -dependencies = [ - "serde", -] - [[package]] name = "cranelift-entity" version = "0.95.1" @@ -1862,13 +1823,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", - "cranelift-entity 0.95.1", + "cranelift-entity", "cranelift-frontend", "itertools 0.10.5", "log", "smallvec", - "wasmparser 0.102.0", - "wasmtime-types 8.0.1", + "wasmparser", + "wasmtime-types", ] [[package]] @@ -2028,8 +1989,8 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-service", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-runtime", "url", ] @@ -2049,10 +2010,10 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-client-api", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-api", + "sp-consensus", + "sp-core", + "sp-runtime", "tracing", ] @@ -2082,19 +2043,19 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "schnellru", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", "sp-consensus-aura", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "sp-state-machine", "sp-timestamp", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-ver", "substrate-prometheus-endpoint", "tracing", ] @@ -2117,13 +2078,13 @@ dependencies = [ "sc-consensus", "sc-consensus-babe", "schnellru", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain", + "sp-consensus", "sp-consensus-slots", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-runtime", "sp-timestamp", - "sp-trie 22.0.0", + "sp-trie", "substrate-prometheus-endpoint", "tracing", ] @@ -2136,10 +2097,10 @@ dependencies = [ "anyhow", "async-trait", "cumulus-primitives-parachain-inherent", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", + "sp-consensus", + "sp-inherents", + "sp-runtime", + "sp-state-machine", "thiserror", ] @@ -2155,13 +2116,13 @@ dependencies = [ "futures", "parking_lot 0.12.1", "sc-consensus", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", "substrate-prometheus-endpoint", "tracing", ] @@ -2181,11 +2142,11 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "sc-client-api", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", "tracing", ] @@ -2207,9 +2168,9 @@ dependencies = [ "rand 0.8.5", "sc-client-api", "sc-consensus", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus", "sp-maybe-compressed-blob", - "sp-runtime 24.0.0", + "sp-runtime", "tracing", ] @@ -2240,11 +2201,11 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool", "sc-utils", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", "sp-transaction-pool", ] @@ -2254,16 +2215,16 @@ version = "0.1.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-pallet-parachain-system", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "pallet-aura", "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 23.0.0", + "sp-application-crypto", "sp-consensus-aura", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -2272,15 +2233,15 @@ version = "0.1.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "mangata-support", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", "staging-xcm", ] @@ -2294,23 +2255,23 @@ dependencies = [ "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "environmental", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "mangata-support", "parity-scale-codec", "polkadot-parachain-primitives", "scale-info", - "sp-core 21.0.0", - "sp-externalities 0.19.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "sp-std 8.0.0", - "sp-trie 22.0.0", - "sp-version 22.0.0", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-version", "staging-xcm", "trie-db", ] @@ -2332,12 +2293,12 @@ version = "3.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "pallet-session", "parity-scale-codec", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -2346,13 +2307,13 @@ version = "0.1.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", "staging-xcm", ] @@ -2363,17 +2324,17 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "cumulus-primitives-core", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "mangata-support", "parity-scale-codec", "polkadot-runtime-common", "rand_chacha 0.3.1", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", "staging-xcm", "staging-xcm-executor", ] @@ -2386,10 +2347,10 @@ dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-primitives", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", "sp-consensus-aura", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -2402,10 +2363,10 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-trie 22.0.0", + "sp-api", + "sp-runtime", + "sp-std", + "sp-trie", "staging-xcm", ] @@ -2421,14 +2382,14 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", - "sp-trie 22.0.0", + "sp-api", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-storage", + "sp-trie", "tracing", ] @@ -2440,8 +2401,8 @@ dependencies = [ "cumulus-primitives-core", "futures", "parity-scale-codec", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-inherents", + "sp-std", "sp-timestamp", ] @@ -2451,13 +2412,13 @@ version = "0.1.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "log", "parity-scale-codec", "polkadot-runtime-common", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2480,11 +2441,11 @@ dependencies = [ "sc-sysinfo", "sc-telemetry", "sc-tracing", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", + "sp-api", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", ] [[package]] @@ -2499,9 +2460,9 @@ dependencies = [ "parity-scale-codec", "polkadot-overseer", "sc-client-api", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-state-machine 0.28.0", + "sp-api", + "sp-blockchain", + "sp-state-machine", "thiserror", ] @@ -2510,7 +2471,7 @@ name = "cumulus-relay-chain-minimal-node" version = "0.1.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -2533,10 +2494,10 @@ dependencies = [ "sc-tracing", "sc-utils", "schnellru", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-consensus", "sp-consensus-babe", - "sp-runtime 24.0.0", + "sp-runtime", "tracing", ] @@ -2564,13 +2525,13 @@ dependencies = [ "serde_json", "smoldot", "smoldot-light", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", "sp-authority-discovery", "sp-consensus-babe", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "sp-storage 13.0.0", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-storage", "thiserror", "tokio", "tokio-util", @@ -2586,10 +2547,10 @@ dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "sp-std 8.0.0", - "sp-trie 22.0.0", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", ] [[package]] @@ -3370,19 +3331,6 @@ dependencies = [ "quote", ] -[[package]] -name = "expander" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" -dependencies = [ - "blake2", - "fs-err", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "expander" version = "2.0.0" @@ -3403,29 +3351,13 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "derive_more", "log", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", -] - -[[package]] -name = "extrinsic-shuffler" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "derive_more", - "log", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-api", + "sp-block-builder", + "sp-core", + "sp-runtime", + "sp-std", + "sp-ver", + "ver-api", ] [[package]] @@ -3638,23 +3570,23 @@ name = "frame-benchmarking" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-support-procedural 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-support-procedural", + "frame-system", "linregress", "log", "parity-scale-codec", "paste", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "sp-storage", "static_assertions", ] @@ -3664,13 +3596,13 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "Inflector", - "array-bytes 6.2.0", + "array-bytes", "chrono", "clap", "comfy-table", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "futures", "gethostname", "handlebars", @@ -3692,24 +3624,24 @@ dependencies = [ "sc-sysinfo", "serde", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-blockchain", + "sp-consensus", "sp-consensus-aura", - "sp-core 21.0.0", - "sp-database 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-externalities 0.19.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "sp-storage 13.0.0", - "sp-trie 22.0.0", - "sp-wasm-interface 14.0.0", + "sp-core", + "sp-database", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-trie", + "sp-wasm-interface", "thiserror", "thousands", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "ver-api", ] [[package]] @@ -3729,15 +3661,15 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-election-provider-solution-type", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", + "sp-arithmetic", + "sp-core", "sp-npos-elections", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -3746,32 +3678,20 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "aquamarine 0.1.12", - "extrinsic-shuffler 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "extrinsic-shuffler", + "frame-support", + "frame-system", "frame-try-runtime", "log", "merlin 2.0.1", "parity-scale-codec", "scale-info", "schnorrkel 0.9.1", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-tracing 10.0.0", -] - -[[package]] -name = "frame-metadata" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" -dependencies = [ - "cfg-if", - "parity-scale-codec", - "scale-info", - "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", ] [[package]] @@ -3798,10 +3718,10 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", "spinners", "substrate-rpc-client", "tokio", @@ -3817,82 +3737,48 @@ dependencies = [ "bitflags 1.3.2", "docify", "environmental", - "frame-metadata 16.0.0", - "frame-support-procedural 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-metadata", + "frame-support-procedural", "impl-trait-for-tuples", - "k256 0.13.1", + "k256", "log", "macro_magic", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "parity-scale-codec", "paste", "scale-info", "serde", "serde_json", "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-core-hashing-proc-macro 9.0.0", - "sp-debug-derive 8.0.0", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-core-hashing-proc-macro", + "sp-debug-derive", "sp-genesis-builder", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-inherents", + "sp-io", "sp-metadata-ir", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-state-machine 0.28.0", - "sp-std 8.0.0", - "sp-tracing 10.0.0", - "sp-weights 20.0.0", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-weights", "static_assertions", "tt-call", ] -[[package]] -name = "frame-support" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "bitflags 1.3.2", - "environmental", - "frame-metadata 15.1.0", - "frame-support-procedural 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "impl-trait-for-tuples", - "k256 0.11.6", - "log", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "once_cell", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-core-hashing-proc-macro 5.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-io 7.0.0", - "sp-runtime 7.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-state-machine 0.13.0", - "sp-std 5.0.0", - "sp-tracing 6.0.0", - "sp-weights 4.0.0", - "tt-call", -] - [[package]] name = "frame-support-procedural" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "Inflector", - "cfg-expr 0.15.5", + "cfg-expr", "derive-syn-parse", "expander 2.0.0", - "frame-support-procedural-tools 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support-procedural-tools", "itertools 0.10.5", "macro_magic", "proc-macro-warning", @@ -3901,45 +3787,18 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "frame-support-procedural" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "Inflector", - "cfg-expr 0.10.3", - "derive-syn-parse", - "frame-support-procedural-tools 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "itertools 0.10.5", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.39", ] -[[package]] -name = "frame-support-procedural-tools" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" @@ -3950,55 +3809,25 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "frame-support-procedural-tools-derive" -version = "3.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "frame-system" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cfg-if", - "extrinsic-shuffler 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-version 22.0.0", - "sp-weights 20.0.0", -] - -[[package]] -name = "frame-system" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "extrinsic-shuffler 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "extrinsic-shuffler", + "frame-support", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-version 5.0.0", - "sp-weights 4.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-ver", + "sp-version", + "sp-weights", ] [[package]] @@ -4007,13 +3836,13 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -4022,7 +3851,7 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", ] [[package]] @@ -4030,11 +3859,11 @@ name = "frame-try-runtime" version = "0.10.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-api", + "sp-runtime", + "sp-std", ] [[package]] @@ -4286,16 +4115,6 @@ dependencies = [ "polyval 0.6.1", ] -[[package]] -name = "gimli" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" -dependencies = [ - "fallible-iterator", - "stable_deref_trait", -] - [[package]] name = "gimli" version = "0.27.3" @@ -5158,18 +4977,6 @@ dependencies = [ "jsonrpsee-types", ] -[[package]] -name = "k256" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" -dependencies = [ - "cfg-if", - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - [[package]] name = "k256" version = "0.13.1" @@ -5197,13 +5004,13 @@ name = "kusama-runtime-constants" version = "1.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-weights 20.0.0", + "sp-core", + "sp-runtime", + "sp-weights", ] [[package]] @@ -5866,15 +5673,6 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "lru" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" -dependencies = [ - "hashbrown 0.12.3", -] - [[package]] name = "lru" version = "0.10.1" @@ -5992,15 +5790,15 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal 0.3.4", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -6042,27 +5840,27 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-block-builder", "sp-consensus-aura", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-core", + "sp-inherents", + "sp-io", "sp-offchain", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-version 22.0.0", - "sp-weights 20.0.0", + "sp-ver", + "sp-version", + "sp-weights", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "ver-api", "xyk-runtime-api", ] @@ -6085,7 +5883,7 @@ dependencies = [ "cumulus-relay-chain-interface", "frame-benchmarking", "frame-benchmarking-cli", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system", "futures", "hex", "jsonrpsee", @@ -6117,27 +5915,27 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-block-builder", + "sp-blockchain", "sp-consensus-aura", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-core", + "sp-inherents", + "sp-io", "sp-keyring", - "sp-keystore 0.27.0", + "sp-keystore", "sp-offchain", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", "sp-timestamp", "sp-transaction-pool", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-ver", "staging-xcm", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", "tempfile", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "ver-api", "xyk-rpc", "xyk-runtime-api", ] @@ -6158,15 +5956,15 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal 0.3.4", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -6208,27 +6006,27 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-block-builder", "sp-consensus-aura", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-core", + "sp-inherents", + "sp-io", "sp-offchain", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-version 22.0.0", - "sp-weights 20.0.0", + "sp-ver", + "sp-version", + "sp-weights", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "ver-api", "xyk-runtime-api", ] @@ -6244,12 +6042,12 @@ dependencies = [ "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-core", + "sp-runtime", + "ver-api", ] [[package]] @@ -6257,12 +6055,12 @@ name = "mangata-support" version = "0.1.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "mangata-types", "parity-scale-codec", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -6272,21 +6070,9 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", -] - -[[package]] -name = "mangata-types" -version = "0.1.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -6396,12 +6182,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -6473,13 +6253,13 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sc-offchain", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-blockchain", + "sp-consensus", "sp-consensus-beefy", - "sp-core 21.0.0", + "sp-core", "sp-mmr-primitives", - "sp-runtime 24.0.0", + "sp-runtime", ] [[package]] @@ -6491,11 +6271,11 @@ dependencies = [ "jsonrpsee", "parity-scale-codec", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", + "sp-api", + "sp-blockchain", + "sp-core", "sp-mmr-primitives", - "sp-runtime 24.0.0", + "sp-runtime", ] [[package]] @@ -6837,18 +6617,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" -[[package]] -name = "object" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" -dependencies = [ - "crc32fast", - "hashbrown 0.12.3", - "indexmap 1.9.3", - "memchr", -] - [[package]] name = "object" version = "0.30.4" @@ -6959,17 +6727,17 @@ version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "orml-traits", "pallet-xcm", "parity-scale-codec", "scale-info", "serde", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -6981,17 +6749,17 @@ version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "orml-traits", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -6999,7 +6767,7 @@ name = "orml-traits" version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "impl-trait-for-tuples", "num-traits", "orml-utilities", @@ -7007,10 +6775,10 @@ dependencies = [ "paste", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "staging-xcm", ] @@ -7019,13 +6787,13 @@ name = "orml-unknown-tokens" version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "orml-xcm-support", "parity-scale-codec", "scale-info", "serde", - "sp-std 8.0.0", + "sp-std", "staging-xcm", ] @@ -7034,14 +6802,14 @@ name = "orml-utilities" version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7049,12 +6817,12 @@ name = "orml-xcm" version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "pallet-xcm", "parity-scale-codec", "scale-info", - "sp-std 8.0.0", + "sp-std", "staging-xcm", ] @@ -7063,11 +6831,11 @@ name = "orml-xcm-support" version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "orml-traits", "parity-scale-codec", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", "staging-xcm", "staging-xcm-executor", ] @@ -7078,8 +6846,8 @@ version = "0.4.1-dev" source = "git+https://github.com/mangata-finance/open-runtime-module-library?branch=develop#bc3920b659f73fbdd388bb1d4182cac9e78ab7a9" dependencies = [ "cumulus-primitives-core", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "orml-traits", "orml-xcm-support", @@ -7087,9 +6855,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", "staging-xcm", "staging-xcm-executor", ] @@ -7122,16 +6890,16 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "pallet-transaction-payment", "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7140,14 +6908,14 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -7155,16 +6923,16 @@ name = "pallet-aura" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 23.0.0", + "sp-application-crypto", "sp-consensus-aura", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -7172,15 +6940,15 @@ name = "pallet-authority-discovery" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 23.0.0", + "sp-application-crypto", "sp-authority-discovery", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -7188,13 +6956,13 @@ name = "pallet-authorship" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -7203,22 +6971,22 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-authorship", "pallet-session", "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 23.0.0", + "sp-application-crypto", "sp-consensus-babe", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-staking", + "sp-std", ] [[package]] @@ -7230,17 +6998,17 @@ dependencies = [ "docify", "frame-benchmarking", "frame-election-provider-support", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", ] [[package]] @@ -7249,13 +7017,13 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -7263,8 +7031,8 @@ name = "pallet-beefy" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-authorship", "pallet-session", @@ -7272,10 +7040,10 @@ dependencies = [ "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-staking", + "sp-std", ] [[package]] @@ -7283,10 +7051,10 @@ name = "pallet-beefy-mmr" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "binary-merkle-tree", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-beefy", "pallet-mmr", @@ -7294,13 +7062,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", "sp-consensus-beefy", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", ] [[package]] @@ -7309,13 +7077,13 @@ version = "0.1.0" dependencies = [ "frame-benchmarking", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-try-runtime", "lazy_static", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "mockall", "orml-tokens", "orml-traits", @@ -7327,11 +7095,11 @@ dependencies = [ "scale-info", "serde", "serial_test", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "test-case", ] @@ -7341,16 +7109,16 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7359,17 +7127,17 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-bounties", "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7378,17 +7146,17 @@ version = "3.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-authorship", "pallet-session", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -7397,15 +7165,15 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7414,15 +7182,15 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7432,14 +7200,14 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "assert_matches", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7449,21 +7217,21 @@ source = "git+https://github.com/mangata-finance/crowdloan-rewards?branch=upgrad dependencies = [ "ed25519-dalek 1.0.1", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-tokens", "pallet-utility", "pallet-vesting-mangata", "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-trie 22.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-trie", ] [[package]] @@ -7472,16 +7240,16 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7491,19 +7259,19 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "frame-benchmarking", "frame-election-provider-support", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-election-provider-support-benchmarking", "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", "sp-npos-elections", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", "strum 0.24.1", ] @@ -7514,11 +7282,11 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "frame-benchmarking", "frame-election-provider-support", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-system", "parity-scale-codec", "sp-npos-elections", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -7527,17 +7295,17 @@ version = "5.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", + "sp-core", + "sp-io", "sp-npos-elections", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -7548,15 +7316,15 @@ dependencies = [ "docify", "frame-benchmarking", "frame-election-provider-support", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -7565,13 +7333,13 @@ version = "0.1.0" dependencies = [ "env_logger 0.9.3", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "hex-literal 0.3.4", "lazy_static", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-tokens", "orml-traits", "pallet-xyk", @@ -7580,11 +7348,11 @@ dependencies = [ "scale-info", "serde", "serial_test", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "test-case", ] @@ -7594,21 +7362,21 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-authorship", "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 23.0.0", + "sp-application-crypto", "sp-consensus-grandpa", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-staking", + "sp-std", ] [[package]] @@ -7618,13 +7386,13 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "enumflags2", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7633,18 +7401,18 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-authorship", "parity-scale-codec", "scale-info", - "sp-application-crypto 23.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -7653,15 +7421,15 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", + "sp-core", + "sp-io", "sp-keyring", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -7671,23 +7439,23 @@ dependencies = [ "cfg-if", "frame-benchmarking", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-try-runtime", "lazy_static", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-tokens", "orml-traits", "pallet-vesting-mangata", "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7696,13 +7464,13 @@ version = "0.1.0" dependencies = [ "env_logger 0.9.3", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "hex-literal 0.3.4", "lazy_static", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-tokens", "orml-traits", "parity-scale-codec", @@ -7710,10 +7478,10 @@ dependencies = [ "scale-info", "serde", "serial_test", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7722,15 +7490,15 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7739,17 +7507,17 @@ version = "7.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-weights 20.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", ] [[package]] @@ -7758,16 +7526,16 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", + "sp-core", + "sp-io", "sp-mmr-primitives", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -7777,14 +7545,14 @@ dependencies = [ "env_logger 0.9.3", "frame-benchmarking", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-try-runtime", "hex-literal 0.3.4", "lazy_static", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-tokens", "orml-traits", "pallet-vesting-mangata", @@ -7794,10 +7562,10 @@ dependencies = [ "scale-info", "serde", "serial_test", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7806,14 +7574,14 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7822,14 +7590,14 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -7837,18 +7605,18 @@ name = "pallet-nomination-pools" version = "1.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", + "sp-tracing", ] [[package]] @@ -7858,17 +7626,17 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "frame-benchmarking", "frame-election-provider-support", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "pallet-bags-list", "pallet-nomination-pools", "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 24.0.0", - "sp-runtime-interface 17.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-runtime", + "sp-runtime-interface", + "sp-staking", + "sp-std", ] [[package]] @@ -7878,8 +7646,8 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "pallet-nomination-pools", "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-api", + "sp-std", ] [[package]] @@ -7887,16 +7655,16 @@ name = "pallet-offences" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -7906,8 +7674,8 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "frame-benchmarking", "frame-election-provider-support", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-babe", "pallet-balances", @@ -7918,9 +7686,9 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -7929,15 +7697,15 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7947,15 +7715,15 @@ dependencies = [ "env_logger 0.9.3", "frame-benchmarking", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-try-runtime", "hex-literal 0.3.4", "lazy_static", "libm 0.2.1", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "mockall", "orml-tokens", "orml-traits", @@ -7969,11 +7737,11 @@ dependencies = [ "serde", "serial_test", "similar-asserts", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "test-case", ] @@ -7983,13 +7751,13 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -7998,16 +7766,16 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8016,13 +7784,13 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8032,16 +7800,16 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "assert_matches", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 16.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8049,14 +7817,14 @@ name = "pallet-root-testing" version = "1.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8066,15 +7834,15 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "docify", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-weights 20.0.0", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", ] [[package]] @@ -8082,21 +7850,21 @@ name = "pallet-session" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-state-machine 0.28.0", - "sp-std 8.0.0", - "sp-trie 22.0.0", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-trie", ] [[package]] @@ -8105,15 +7873,15 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "pallet-session", "pallet-staking", "parity-scale-codec", "rand 0.8.5", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std", ] [[package]] @@ -8122,16 +7890,16 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", - "sp-arithmetic 16.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8141,8 +7909,8 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "frame-benchmarking", "frame-election-provider-support", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-authorship", "pallet-session", @@ -8150,11 +7918,11 @@ dependencies = [ "rand_chacha 0.2.2", "scale-info", "serde", - "sp-application-crypto 23.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -8174,7 +7942,7 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "log", - "sp-arithmetic 16.0.0", + "sp-arithmetic", ] [[package]] @@ -8183,7 +7951,7 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", ] [[package]] @@ -8192,15 +7960,15 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8209,13 +7977,13 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8224,14 +7992,14 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8239,16 +8007,16 @@ name = "pallet-sudo-origin" version = "4.0.0-dev" dependencies = [ "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-try-runtime", "log", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8257,16 +8025,16 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", + "sp-storage", "sp-timestamp", ] @@ -8276,17 +8044,17 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "pallet-treasury", "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8294,15 +8062,15 @@ name = "pallet-transaction-payment" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8310,15 +8078,15 @@ name = "pallet-transaction-payment-mangata" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8329,12 +8097,12 @@ dependencies = [ "jsonrpsee", "pallet-transaction-payment-mangata-rpc-runtime-api", "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-weights 20.0.0", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-weights", ] [[package]] @@ -8344,9 +8112,9 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "pallet-transaction-payment-mangata", "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-weights 20.0.0", + "sp-api", + "sp-runtime", + "sp-weights", ] [[package]] @@ -8357,12 +8125,12 @@ dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-weights 20.0.0", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-weights", ] [[package]] @@ -8372,9 +8140,9 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "pallet-transaction-payment", "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-weights 20.0.0", + "sp-api", + "sp-runtime", + "sp-weights", ] [[package]] @@ -8383,15 +8151,15 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -8400,14 +8168,14 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8416,14 +8184,14 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -8432,13 +8200,13 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -8447,13 +8215,13 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -8462,13 +8230,13 @@ version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-api", + "sp-runtime", + "sp-std", ] [[package]] @@ -8478,16 +8246,16 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "bounded-collections", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "staging-xcm", "staging-xcm-executor", ] @@ -8498,14 +8266,14 @@ version = "1.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-io", + "sp-runtime", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -8518,15 +8286,15 @@ dependencies = [ "env_logger 0.9.3", "frame-benchmarking", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-try-runtime", "hex-literal 0.3.4", "lazy_static", "libm 0.2.1", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-tokens", "orml-traits", "pallet-bootstrap", @@ -8539,11 +8307,11 @@ dependencies = [ "serde", "serial_test", "similar-asserts", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "test-case", ] @@ -8553,12 +8321,12 @@ version = "0.1.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "cumulus-primitives-core", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -8567,12 +8335,12 @@ version = "3.0.0" dependencies = [ "aquamarine 0.1.12", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "itertools 0.10.5", "log", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-tokens", "orml-traits", "pallet-authorship", @@ -8584,12 +8352,12 @@ dependencies = [ "scale-info", "serde", "similar-asserts", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -8599,8 +8367,8 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "kusama-runtime-constants", "log", "num-traits", @@ -8617,10 +8385,10 @@ dependencies = [ "scale-info", "smallvec", "sp-consensus-aura", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9022,8 +8790,8 @@ dependencies = [ "polkadot-primitives", "rand 0.8.5", "schnellru", - "sp-core 21.0.0", - "sp-keystore 0.27.0", + "sp-core", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -9067,8 +8835,8 @@ dependencies = [ "sc-storage-monitor", "sc-sysinfo", "sc-tracing", - "sp-core 21.0.0", - "sp-io 23.0.0", + "sp-core", + "sp-io", "sp-keyring", "sp-maybe-compressed-blob", "substrate-build-script-utils", @@ -9090,9 +8858,9 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core 21.0.0", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-keystore", + "sp-runtime", "thiserror", "tokio-util", "tracing-gum", @@ -9105,9 +8873,9 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -9129,8 +8897,8 @@ dependencies = [ "polkadot-primitives", "sc-network", "schnellru", - "sp-application-crypto 23.0.0", - "sp-keystore 0.27.0", + "sp-application-crypto", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -9144,8 +8912,8 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "reed-solomon-novelpoly", - "sp-core 21.0.0", - "sp-trie 22.0.0", + "sp-core", + "sp-trie", "thiserror", ] @@ -9164,9 +8932,9 @@ dependencies = [ "rand_chacha 0.3.1", "sc-network", "sc-network-common", - "sp-application-crypto 23.0.0", - "sp-core 21.0.0", - "sp-keystore 0.27.0", + "sp-application-crypto", + "sp-core", + "sp-keystore", "tracing-gum", ] @@ -9188,7 +8956,7 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-network", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus", "thiserror", "tracing-gum", ] @@ -9205,7 +8973,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core 21.0.0", + "sp-core", "sp-maybe-compressed-blob", "thiserror", "tracing-gum", @@ -9232,10 +9000,10 @@ dependencies = [ "sc-keystore", "schnellru", "schnorrkel 0.9.1", - "sp-application-crypto 23.0.0", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-application-crypto", + "sp-consensus", "sp-consensus-slots", - "sp-runtime 24.0.0", + "sp-runtime", "thiserror", "tracing-gum", ] @@ -9257,7 +9025,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus", "thiserror", "tracing-gum", ] @@ -9276,7 +9044,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-statement-table", - "sp-keystore 0.27.0", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -9290,7 +9058,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-keystore 0.27.0", + "sp-keystore", "thiserror", "tracing-gum", "wasm-timer", @@ -9328,7 +9096,7 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sc-consensus-babe", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain", "tracing-gum", ] @@ -9379,8 +9147,8 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-overseer", "polkadot-primitives", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-blockchain", + "sp-inherents", "thiserror", "tracing-gum", ] @@ -9438,9 +9206,9 @@ dependencies = [ "polkadot-primitives", "rand 0.8.5", "slotmap", - "sp-core 21.0.0", + "sp-core", "sp-maybe-compressed-blob", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface", "substrate-build-script-utils", "tempfile", "tokio", @@ -9458,7 +9226,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", - "sp-keystore 0.27.0", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -9478,10 +9246,10 @@ dependencies = [ "sc-executor", "sc-executor-common", "sc-executor-wasmtime", - "sp-core 21.0.0", - "sp-externalities 0.19.0", - "sp-io 23.0.0", - "sp-tracing 10.0.0", + "sp-core", + "sp-externalities", + "sp-io", + "sp-tracing", "tokio", "tracing-gum", ] @@ -9501,9 +9269,9 @@ dependencies = [ "sc-executor", "sc-executor-common", "sc-executor-wasmtime", - "sp-io 23.0.0", + "sp-io", "sp-maybe-compressed-blob", - "sp-tracing 10.0.0", + "sp-tracing", "tikv-jemalloc-ctl", "tokio", "tracing-gum", @@ -9537,7 +9305,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "sc-network", - "sp-core 21.0.0", + "sp-core", "thiserror", "tokio", ] @@ -9597,12 +9365,12 @@ dependencies = [ "polkadot-primitives", "schnorrkel 0.9.1", "serde", - "sp-application-crypto 23.0.0", + "sp-application-crypto", "sp-consensus-babe", - "sp-core 21.0.0", - "sp-keystore 0.27.0", + "sp-core", + "sp-keystore", "sp-maybe-compressed-blob", - "sp-runtime 24.0.0", + "sp-runtime", "thiserror", "zstd 0.12.4", ] @@ -9634,7 +9402,7 @@ dependencies = [ "sc-network", "sc-transaction-pool-api", "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", "sp-authority-discovery", "sp-consensus-babe", "substrate-prometheus-endpoint", @@ -9667,9 +9435,9 @@ dependencies = [ "prioritized-metered-channel", "rand 0.8.5", "schnellru", - "sp-application-crypto 23.0.0", - "sp-core 21.0.0", - "sp-keystore 0.27.0", + "sp-application-crypto", + "sp-core", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -9691,8 +9459,8 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "schnellru", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", + "sp-api", + "sp-core", "tikv-jemalloc-ctl", "tracing-gum", ] @@ -9704,14 +9472,14 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "bounded-collections", "derive_more", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "parity-scale-codec", "polkadot-core-primitives", "scale-info", "serde", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -9744,18 +9512,18 @@ dependencies = [ "polkadot-parachain-primitives", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-arithmetic 16.0.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", "sp-authority-discovery", "sp-consensus-slots", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -9779,13 +9547,13 @@ dependencies = [ "sc-rpc", "sc-sync-state-rpc", "sc-transaction-pool-api", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", "sp-consensus-babe", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", + "sp-keystore", + "sp-runtime", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", ] @@ -9799,8 +9567,8 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -9861,25 +9629,25 @@ dependencies = [ "serde", "serde_derive", "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-arithmetic 16.0.0", + "sp-api", + "sp-arithmetic", "sp-authority-discovery", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-core", + "sp-inherents", + "sp-io", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-staking", + "sp-std", + "sp-storage", "sp-transaction-pool", - "sp-version 22.0.0", + "sp-version", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9895,8 +9663,8 @@ dependencies = [ "bitvec", "frame-benchmarking", "frame-election-provider-support", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "libsecp256k1", "log", @@ -9920,15 +9688,15 @@ dependencies = [ "serde", "serde_derive", "slot-range-helper", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-api", + "sp-core", + "sp-inherents", + "sp-io", "sp-npos-elections", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-staking", + "sp-std", "staging-xcm", "static_assertions", ] @@ -9938,13 +9706,13 @@ name = "polkadot-runtime-constants" version = "1.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-weights 20.0.0", + "sp-core", + "sp-runtime", + "sp-weights", ] [[package]] @@ -9956,8 +9724,8 @@ dependencies = [ "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", ] [[package]] @@ -9969,8 +9737,8 @@ dependencies = [ "bitvec", "derive_more", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "pallet-authority-discovery", @@ -9991,16 +9759,16 @@ dependencies = [ "rustc-hex", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-staking", + "sp-std", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -10014,8 +9782,8 @@ dependencies = [ "async-trait", "frame-benchmarking", "frame-benchmarking-cli", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-system-rpc-runtime-api", "futures", "hex-literal 0.4.1", @@ -10097,29 +9865,29 @@ dependencies = [ "schnellru", "serde", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", "sp-authority-discovery", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-core", + "sp-inherents", + "sp-io", "sp-keyring", - "sp-keystore 0.27.0", + "sp-keystore", "sp-mmr-primitives", "sp-offchain", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-state-machine 0.28.0", - "sp-storage 13.0.0", + "sp-state-machine", + "sp-storage", "sp-timestamp", "sp-transaction-pool", - "sp-version 22.0.0", - "sp-weights 20.0.0", + "sp-version", + "sp-weights", "staging-kusama-runtime", "substrate-prometheus-endpoint", "thiserror", @@ -10145,8 +9913,8 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-keystore 0.27.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-keystore", + "sp-staking", "thiserror", "tracing-gum", ] @@ -10158,7 +9926,7 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "parity-scale-codec", "polkadot-primitives", - "sp-core 21.0.0", + "sp-core", ] [[package]] @@ -10430,31 +10198,31 @@ name = "proof-of-stake-rpc" version = "2.0.0" dependencies = [ "jsonrpsee", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "mangata-types", "parity-scale-codec", "proof-of-stake-runtime-api", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-core 7.0.0", - "sp-rpc 6.0.0 (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-runtime 7.0.0", - "sp-std 5.0.0", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-std", ] [[package]] name = "proof-of-stake-runtime-api" version = "2.0.0" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "frame-support", + "frame-system", "parity-scale-codec", + "scale-info", "serde", - "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -10943,8 +10711,8 @@ dependencies = [ "binary-merkle-tree", "frame-benchmarking", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -10999,23 +10767,23 @@ dependencies = [ "serde", "serde_derive", "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", "sp-authority-discovery", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-core", + "sp-inherents", + "sp-io", "sp-mmr-primitives", "sp-offchain", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-staking", + "sp-std", + "sp-storage", "sp-transaction-pool", - "sp-version 22.0.0", + "sp-version", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11028,13 +10796,13 @@ name = "rococo-runtime-constants" version = "1.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-weights 20.0.0", + "sp-core", + "sp-runtime", + "sp-weights", ] [[package]] @@ -11106,13 +10874,13 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", "env_logger 0.9.3", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "kusama-runtime-constants", "log", "mangata-kusama-runtime", "mangata-support", - "mangata-types 0.1.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "mangata-types", "orml-asset-registry", "orml-tokens", "orml-traits", @@ -11136,9 +10904,9 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-storage 13.0.0", + "sp-io", + "sp-runtime", + "sp-storage", "staging-kusama-runtime", "staging-xcm", "staging-xcm-builder", @@ -11350,8 +11118,8 @@ version = "4.1.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "log", - "sp-core 21.0.0", - "sp-wasm-interface 14.0.0", + "sp-core", + "sp-wasm-interface", "thiserror", ] @@ -11373,12 +11141,12 @@ dependencies = [ "rand 0.8.5", "sc-client-api", "sc-network", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", "sp-authority-discovery", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", + "sp-blockchain", + "sp-core", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -11397,12 +11165,12 @@ dependencies = [ "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", "substrate-prometheus-endpoint", ] @@ -11421,15 +11189,15 @@ dependencies = [ "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-ver", "substrate-prometheus-endpoint", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "ver-api", ] [[package]] @@ -11439,12 +11207,12 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "parity-scale-codec", "sc-client-api", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-core", + "sp-inherents", + "sp-runtime", ] [[package]] @@ -11453,18 +11221,18 @@ version = "0.10.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "aquamarine 0.1.12", - "extrinsic-shuffler 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "extrinsic-shuffler", "log", "parity-scale-codec", "sc-client-api", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-ver", + "ver-api", ] [[package]] @@ -11480,10 +11248,10 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-state-machine", ] [[package]] @@ -11502,7 +11270,7 @@ name = "sc-cli" version = "0.10.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "chrono", "clap", "fdlimit", @@ -11524,13 +11292,13 @@ dependencies = [ "sc-utils", "serde", "serde_json", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", + "sp-blockchain", + "sp-core", "sp-keyring", - "sp-keystore 0.27.0", - "sp-panic-handler 8.0.0", - "sp-runtime 24.0.0", - "sp-version 22.0.0", + "sp-keystore", + "sp-panic-handler", + "sp-runtime", + "sp-version", "thiserror", "tiny-bip39", "tokio", @@ -11549,16 +11317,16 @@ dependencies = [ "sc-executor", "sc-transaction-pool-api", "sc-utils", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-database 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-externalities 0.19.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-database", + "sp-externalities", + "sp-runtime", + "sp-state-machine", "sp-statement-store", - "sp-storage 13.0.0", + "sp-storage", "substrate-prometheus-endpoint", ] @@ -11579,13 +11347,13 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic 16.0.0", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-database 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "sp-trie 22.0.0", + "sp-arithmetic", + "sp-blockchain", + "sp-core", + "sp-database", + "sp-runtime", + "sp-state-machine", + "sp-trie", ] [[package]] @@ -11603,12 +11371,12 @@ dependencies = [ "sc-client-api", "sc-utils", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", "substrate-prometheus-endpoint", "thiserror", ] @@ -11627,17 +11395,17 @@ dependencies = [ "sc-consensus", "sc-consensus-slots", "sc-telemetry", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", "sp-consensus-aura", "sp-consensus-slots", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -11663,17 +11431,17 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool-api", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", "sp-consensus-babe", "sp-consensus-slots", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -11689,14 +11457,14 @@ dependencies = [ "sc-consensus-epochs", "sc-rpc-api", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-application-crypto", + "sp-blockchain", + "sp-consensus", "sp-consensus-babe", - "sp-core 21.0.0", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-keystore", + "sp-runtime", "thiserror", ] @@ -11705,7 +11473,7 @@ name = "sc-consensus-beefy" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "async-channel", "async-trait", "fnv", @@ -11719,16 +11487,16 @@ dependencies = [ "sc-network-gossip", "sc-network-sync", "sc-utils", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-arithmetic 16.0.0", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", "sp-consensus-beefy", - "sp-core 21.0.0", - "sp-keystore 0.27.0", + "sp-core", + "sp-keystore", "sp-mmr-primitives", - "sp-runtime 24.0.0", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "wasm-timer", @@ -11748,8 +11516,8 @@ dependencies = [ "sc-rpc", "serde", "sp-consensus-beefy", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-runtime", "thiserror", ] @@ -11762,8 +11530,8 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sc-consensus", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", + "sp-blockchain", + "sp-runtime", ] [[package]] @@ -11772,7 +11540,7 @@ version = "0.10.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "ahash 0.8.6", - "array-bytes 6.2.0", + "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", @@ -11794,15 +11562,15 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-arithmetic 16.0.0", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", "sp-consensus-grandpa", - "sp-core 21.0.0", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -11821,9 +11589,9 @@ dependencies = [ "sc-consensus-grandpa", "sc-rpc", "serde", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-blockchain", + "sp-core", + "sp-runtime", "thiserror", ] @@ -11840,16 +11608,16 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic 16.0.0", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", "sp-consensus-slots", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-ver", ] [[package]] @@ -11862,15 +11630,15 @@ dependencies = [ "sc-executor-common", "sc-executor-wasmtime", "schnellru", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-externalities 0.19.0", - "sp-io 23.0.0", - "sp-panic-handler 8.0.0", - "sp-runtime-interface 17.0.0", - "sp-trie 22.0.0", - "sp-version 22.0.0", - "sp-wasm-interface 14.0.0", + "sp-api", + "sp-core", + "sp-externalities", + "sp-io", + "sp-panic-handler", + "sp-runtime-interface", + "sp-trie", + "sp-version", + "sp-wasm-interface", "tracing", ] @@ -11881,7 +11649,7 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface", "thiserror", "wasm-instrument", ] @@ -11898,9 +11666,9 @@ dependencies = [ "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface 17.0.0", - "sp-wasm-interface 14.0.0", - "wasmtime 8.0.1", + "sp-runtime-interface", + "sp-wasm-interface", + "wasmtime", ] [[package]] @@ -11915,8 +11683,8 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", + "sp-blockchain", + "sp-runtime", ] [[package]] @@ -11924,12 +11692,12 @@ name = "sc-keystore" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "parking_lot 0.12.1", "serde_json", - "sp-application-crypto 23.0.0", - "sp-core 21.0.0", - "sp-keystore 0.27.0", + "sp-application-crypto", + "sp-core", + "sp-keystore", "thiserror", ] @@ -11938,7 +11706,7 @@ name = "sc-network" version = "0.10.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "async-channel", "async-trait", "asynchronous-codec", @@ -11963,10 +11731,10 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic 16.0.0", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-arithmetic", + "sp-blockchain", + "sp-core", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", @@ -11988,8 +11756,8 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", + "sp-blockchain", + "sp-runtime", "thiserror", "unsigned-varint", ] @@ -12006,9 +11774,9 @@ dependencies = [ "parity-scale-codec", "prost-build", "sc-consensus", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-consensus", "sp-consensus-grandpa", - "sp-runtime 24.0.0", + "sp-runtime", ] [[package]] @@ -12024,7 +11792,7 @@ dependencies = [ "sc-network", "sc-network-common", "schnellru", - "sp-runtime 24.0.0", + "sp-runtime", "substrate-prometheus-endpoint", "tracing", ] @@ -12034,7 +11802,7 @@ name = "sc-network-light" version = "0.10.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "async-channel", "futures", "libp2p-identity", @@ -12044,9 +11812,9 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-blockchain", + "sp-core", + "sp-runtime", "thiserror", ] @@ -12055,7 +11823,7 @@ name = "sc-network-sync" version = "0.10.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "async-channel", "async-trait", "fork-tree", @@ -12074,12 +11842,12 @@ dependencies = [ "sc-utils", "schnellru", "smallvec", - "sp-arithmetic 16.0.0", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", "sp-consensus-grandpa", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -12089,7 +11857,7 @@ name = "sc-network-transactions" version = "0.10.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "futures", "libp2p", "log", @@ -12097,8 +11865,8 @@ dependencies = [ "sc-network", "sc-network-common", "sc-utils", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", + "sp-consensus", + "sp-runtime", "substrate-prometheus-endpoint", ] @@ -12107,7 +11875,7 @@ name = "sc-offchain" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "bytes", "fnv", "futures", @@ -12126,12 +11894,12 @@ dependencies = [ "sc-network-common", "sc-transaction-pool-api", "sc-utils", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-externalities 0.19.0", - "sp-keystore 0.27.0", + "sp-api", + "sp-core", + "sp-externalities", + "sp-keystore", "sp-offchain", - "sp-runtime 24.0.0", + "sp-runtime", "threadpool", "tracing", ] @@ -12163,16 +11931,16 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-keystore 0.27.0", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-keystore", "sp-offchain", - "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", + "sp-rpc", + "sp-runtime", "sp-session", "sp-statement-store", - "sp-version 22.0.0", + "sp-version", "tokio", ] @@ -12188,10 +11956,10 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core 21.0.0", - "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-version 22.0.0", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-version", "thiserror", ] @@ -12215,7 +11983,7 @@ name = "sc-rpc-spec-v2" version = "0.10.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 6.2.0", + "array-bytes", "futures", "futures-util", "hex", @@ -12228,11 +11996,11 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-version 22.0.0", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-version", "thiserror", "tokio", "tokio-stream", @@ -12280,20 +12048,20 @@ dependencies = [ "sc-utils", "serde", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-externalities 0.19.0", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime", "sp-session", - "sp-state-machine 0.28.0", - "sp-storage 13.0.0", + "sp-state-machine", + "sp-storage", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie 22.0.0", - "sp-version 22.0.0", + "sp-trie", + "sp-version", "static_init", "substrate-prometheus-endpoint", "tempfile", @@ -12301,7 +12069,7 @@ dependencies = [ "tokio", "tracing", "tracing-futures", - "ver-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "ver-api", ] [[package]] @@ -12312,7 +12080,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 21.0.0", + "sp-core", ] [[package]] @@ -12324,7 +12092,7 @@ dependencies = [ "fs4", "log", "sc-client-db", - "sp-core 21.0.0", + "sp-core", "thiserror", "tokio", ] @@ -12343,8 +12111,8 @@ dependencies = [ "sc-consensus-grandpa", "serde", "serde_json", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", + "sp-blockchain", + "sp-runtime", "thiserror", ] @@ -12362,9 +12130,9 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-io", + "sp-std", ] [[package]] @@ -12403,12 +12171,12 @@ dependencies = [ "sc-client-api", "sc-tracing-proc-macro", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-tracing 10.0.0", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-tracing", "thiserror", "tracing", "tracing-log", @@ -12442,11 +12210,11 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-tracing 10.0.0", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -12462,9 +12230,9 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-blockchain", + "sp-core", + "sp-runtime", "thiserror", ] @@ -12480,7 +12248,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic 16.0.0", + "sp-arithmetic", ] [[package]] @@ -12955,8 +12723,8 @@ dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", ] [[package]] @@ -13040,7 +12808,7 @@ dependencies = [ "smallvec", "soketto", "twox-hash", - "wasmi 0.31.0", + "wasmi", "x25519-dalek 2.0.0", "zeroize", ] @@ -13150,33 +12918,15 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-api-proc-macro 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-externalities 0.19.0", + "sp-api-proc-macro", + "sp-core", + "sp-externalities", "sp-metadata-ir", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "sp-std 8.0.0", - "sp-trie 22.0.0", - "sp-version 22.0.0", - "thiserror", -] - -[[package]] -name = "sp-api" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "hash-db", - "log", - "parity-scale-codec", - "sp-api-proc-macro 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", - "sp-std 5.0.0", - "sp-trie 7.0.0", - "sp-version 5.0.0", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-version", "thiserror", ] @@ -13194,33 +12944,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "sp-api-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "Inflector", - "blake2", - "expander 1.0.0", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-std 5.0.0", -] - [[package]] name = "sp-application-crypto" version = "23.0.0" @@ -13229,23 +12952,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-std 8.0.0", -] - -[[package]] -name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-std 5.0.0", - "static_assertions", + "sp-core", + "sp-io", + "sp-std", ] [[package]] @@ -13258,7 +12967,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 8.0.0", + "sp-std", "static_assertions", ] @@ -13269,10 +12978,10 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-api", + "sp-application-crypto", + "sp-runtime", + "sp-std", ] [[package]] @@ -13280,22 +12989,10 @@ name = "sp-block-builder" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-std 8.0.0", -] - -[[package]] -name = "sp-block-builder" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-runtime 7.0.0", - "sp-std 5.0.0", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", ] [[package]] @@ -13308,29 +13005,11 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "schnellru", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-database 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "thiserror", -] - -[[package]] -name = "sp-blockchain" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "futures", - "log", - "lru 0.8.1", - "parity-scale-codec", - "parking_lot 0.12.1", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-consensus 0.10.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-database 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-api", + "sp-consensus", + "sp-database", + "sp-runtime", + "sp-state-machine", "thiserror", ] @@ -13342,25 +13021,10 @@ dependencies = [ "async-trait", "futures", "log", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "thiserror", -] - -[[package]] -name = "sp-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "async-trait", - "futures", - "log", - "sp-core 7.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", "thiserror", ] @@ -13372,12 +13036,12 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", + "sp-api", + "sp-application-crypto", "sp-consensus-slots", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-inherents", + "sp-runtime", + "sp-std", "sp-timestamp", ] @@ -13390,13 +13054,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", + "sp-api", + "sp-application-crypto", "sp-consensus-slots", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-std", "sp-timestamp", ] @@ -13409,13 +13073,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", "sp-mmr-primitives", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-runtime", + "sp-std", "strum 0.24.1", ] @@ -13429,12 +13093,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-core 21.0.0", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-std", ] [[package]] @@ -13445,20 +13109,22 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 8.0.0", + "sp-std", "sp-timestamp", ] [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" +version = "21.0.0" +source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "array-bytes 4.2.0", - "base58", + "array-bytes", + "arrayvec 0.7.4", + "bandersnatch_vrfs", "bitflags 1.3.2", "blake2", "bounded-collections", + "bs58 0.5.0", "dyn-clonable", "ed25519-zebra 3.1.0", "futures", @@ -13470,8 +13136,8 @@ dependencies = [ "log", "merlin 2.0.1", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", + "paste", "primitive-types", "rand 0.8.5", "regex", @@ -13480,83 +13146,23 @@ dependencies = [ "secp256k1", "secrecy", "serde", - "sp-core-hashing 5.0.0", - "sp-debug-derive 5.0.0", - "sp-externalities 0.13.0", - "sp-runtime-interface 7.0.0", - "sp-std 5.0.0", - "sp-storage 7.0.0", + "sp-core-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", + "tracing", "zeroize", ] [[package]] -name = "sp-core" -version = "21.0.0" -source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" -dependencies = [ - "array-bytes 6.2.0", - "arrayvec 0.7.4", - "bandersnatch_vrfs", - "bitflags 1.3.2", - "blake2", - "bounded-collections", - "bs58 0.5.0", - "dyn-clonable", - "ed25519-zebra 3.1.0", - "futures", - "hash-db", - "hash256-std-hasher", - "impl-serde", - "lazy_static", - "libsecp256k1", - "log", - "merlin 2.0.1", - "parity-scale-codec", - "parking_lot 0.12.1", - "paste", - "primitive-types", - "rand 0.8.5", - "regex", - "scale-info", - "schnorrkel 0.9.1", - "secp256k1", - "secrecy", - "serde", - "sp-core-hashing 9.0.0", - "sp-debug-derive 8.0.0", - "sp-externalities 0.19.0", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", - "ss58-registry", - "substrate-bip39", - "thiserror", - "tiny-bip39", - "tracing", - "zeroize", -] - -[[package]] -name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "blake2b_simd", - "byteorder", - "digest 0.10.7", - "sha2 0.10.8", - "sha3", - "sp-std 5.0.0", - "twox-hash", -] - -[[package]] -name = "sp-core-hashing" -version = "9.0.0" +name = "sp-core-hashing" +version = "9.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "blake2b_simd", @@ -13567,24 +13173,13 @@ dependencies = [ "twox-hash", ] -[[package]] -name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "proc-macro2", - "quote", - "sp-core-hashing 5.0.0", - "syn 1.0.109", -] - [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "quote", - "sp-core-hashing 9.0.0", + "sp-core-hashing", "syn 2.0.39", ] @@ -13597,25 +13192,6 @@ dependencies = [ "parking_lot 0.12.1", ] -[[package]] -name = "sp-database" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "kvdb", - "parking_lot 0.12.1", -] - -[[package]] -name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "sp-debug-derive" version = "8.0.0" @@ -13626,17 +13202,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-std 5.0.0", - "sp-storage 7.0.0", -] - [[package]] name = "sp-externalities" version = "0.19.0" @@ -13644,8 +13209,8 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "environmental", "parity-scale-codec", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", ] [[package]] @@ -13654,9 +13219,9 @@ version = "0.1.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-api", + "sp-runtime", + "sp-std", ] [[package]] @@ -13668,51 +13233,11 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "thiserror", -] - -[[package]] -name = "sp-inherents" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "async-trait", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", + "sp-runtime", + "sp-std", "thiserror", ] -[[package]] -name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "bytes", - "ed25519 1.5.3", - "ed25519-dalek 1.0.1", - "futures", - "libsecp256k1", - "log", - "parity-scale-codec", - "secp256k1", - "sp-core 7.0.0", - "sp-externalities 0.13.0", - "sp-keystore 0.13.0", - "sp-runtime-interface 7.0.0", - "sp-state-machine 0.13.0", - "sp-std 5.0.0", - "sp-tracing 6.0.0", - "sp-trie 7.0.0", - "tracing", - "tracing-core", -] - [[package]] name = "sp-io" version = "23.0.0" @@ -13725,14 +13250,14 @@ dependencies = [ "parity-scale-codec", "rustversion", "secp256k1", - "sp-core 21.0.0", - "sp-externalities 0.19.0", - "sp-keystore 0.27.0", - "sp-runtime-interface 17.0.0", - "sp-state-machine 0.28.0", - "sp-std 8.0.0", - "sp-tracing 10.0.0", - "sp-trie 22.0.0", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", "tracing", "tracing-core", ] @@ -13743,28 +13268,11 @@ version = "24.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "lazy_static", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-core", + "sp-runtime", "strum 0.24.1", ] -[[package]] -name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "async-trait", - "futures", - "merlin 2.0.1", - "parity-scale-codec", - "parking_lot 0.12.1", - "schnorrkel 0.9.1", - "serde", - "sp-core 7.0.0", - "sp-externalities 0.13.0", - "thiserror", -] - [[package]] name = "sp-keystore" version = "0.27.0" @@ -13772,8 +13280,8 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 21.0.0", - "sp-externalities 0.19.0", + "sp-core", + "sp-externalities", "thiserror", ] @@ -13791,10 +13299,10 @@ name = "sp-metadata-ir" version = "0.1.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-metadata 16.0.0", + "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std 8.0.0", + "sp-std", ] [[package]] @@ -13807,11 +13315,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-debug-derive 8.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-api", + "sp-core", + "sp-debug-derive", + "sp-runtime", + "sp-std", "thiserror", ] @@ -13823,10 +13331,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -13834,19 +13342,9 @@ name = "sp-offchain" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", -] - -[[package]] -name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "backtrace", - "lazy_static", - "regex", + "sp-api", + "sp-core", + "sp-runtime", ] [[package]] @@ -13866,40 +13364,7 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "rustc-hash", "serde", - "sp-core 21.0.0", -] - -[[package]] -name = "sp-rpc" -version = "6.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "rustc-hash", - "serde", - "sp-core 7.0.0", -] - -[[package]] -name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "parity-util-mem", - "paste", - "rand 0.8.5", - "scale-info", - "serde", - "sp-application-crypto 7.0.0", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-std 5.0.0", - "sp-weights 4.0.0", + "sp-core", ] [[package]] @@ -13917,30 +13382,12 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", - "sp-application-crypto 23.0.0", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-std 8.0.0", - "sp-weights 20.0.0", -] - -[[package]] -name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", - "sp-externalities 0.13.0", - "sp-runtime-interface-proc-macro 6.0.0", - "sp-std 5.0.0", - "sp-storage 7.0.0", - "sp-tracing 6.0.0", - "sp-wasm-interface 7.0.0", - "static_assertions", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-weights", ] [[package]] @@ -13952,27 +13399,15 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.19.0", - "sp-runtime-interface-proc-macro 11.0.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", - "sp-tracing 10.0.0", - "sp-wasm-interface 14.0.0", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", "static_assertions", ] -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "Inflector", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" @@ -13992,12 +13427,12 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", + "sp-api", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -14009,41 +13444,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", -] - -[[package]] -name = "sp-staking" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", -] - -[[package]] -name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "hash-db", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec", - "sp-core 7.0.0", - "sp-externalities 0.13.0", - "sp-panic-handler 5.0.0", - "sp-std 5.0.0", - "sp-trie 7.0.0", - "thiserror", - "tracing", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -14057,11 +13460,11 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "smallvec", - "sp-core 21.0.0", - "sp-externalities 0.19.0", - "sp-panic-handler 8.0.0", - "sp-std 8.0.0", - "sp-trie 22.0.0", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-std", + "sp-trie", "thiserror", "tracing", "trie-db", @@ -14080,40 +13483,22 @@ dependencies = [ "rand 0.8.5", "scale-info", "sha2 0.10.8", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-core 21.0.0", - "sp-externalities 0.19.0", - "sp-runtime 24.0.0", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", + "sp-std", "thiserror", "x25519-dalek 2.0.0", ] -[[package]] -name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" - [[package]] name = "sp-std" version = "8.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" -[[package]] -name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 5.0.0", - "sp-std 5.0.0", -] - [[package]] name = "sp-storage" version = "13.0.0" @@ -14123,8 +13508,8 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 8.0.0", - "sp-std 8.0.0", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -14134,31 +13519,19 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-inherents", + "sp-runtime", + "sp-std", "thiserror", ] -[[package]] -name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "parity-scale-codec", - "sp-std 5.0.0", - "tracing", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "sp-tracing" version = "10.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ "parity-scale-codec", - "sp-std 8.0.0", + "sp-std", "tracing", "tracing-core", "tracing-subscriber", @@ -14169,8 +13542,8 @@ name = "sp-transaction-pool" version = "4.0.0-dev" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", + "sp-api", + "sp-runtime", ] [[package]] @@ -14181,34 +13554,11 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-trie 22.0.0", -] - -[[package]] -name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "ahash 0.8.6", - "hash-db", - "hashbrown 0.12.3", - "lazy_static", - "memory-db", - "nohash-hasher", - "parity-scale-codec", - "parking_lot 0.12.1", - "scale-info", - "schnellru", - "sp-core 7.0.0", - "sp-std 5.0.0", - "thiserror", - "tracing", - "trie-db", - "trie-root", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-trie", ] [[package]] @@ -14226,8 +13576,8 @@ dependencies = [ "parking_lot 0.12.1", "scale-info", "schnellru", - "sp-core 21.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-std", "thiserror", "tracing", "trie-db", @@ -14244,46 +13594,11 @@ dependencies = [ "scale-info", "schnorrkel 0.9.1", "serde", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-keystore 0.27.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", -] - -[[package]] -name = "sp-ver" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "async-trait", - "log", - "parity-scale-codec", - "scale-info", - "schnorrkel 0.9.1", - "serde", - "sp-core 7.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", -] - -[[package]] -name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "parity-wasm", - "scale-info", - "serde", - "sp-core-hashing-proc-macro 5.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", - "sp-version-proc-macro 4.0.0-dev", - "thiserror", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "sp-std", ] [[package]] @@ -14296,24 +13611,13 @@ dependencies = [ "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro 9.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-version-proc-macro 8.0.0", + "sp-core-hashing-proc-macro", + "sp-runtime", + "sp-std", + "sp-version-proc-macro", "thiserror", ] -[[package]] -name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "parity-scale-codec", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "sp-version-proc-macro" version = "8.0.0" @@ -14325,20 +13629,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "anyhow", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "sp-std 5.0.0", - "wasmi 0.13.2", - "wasmtime 6.0.2", -] - [[package]] name = "sp-wasm-interface" version = "14.0.0" @@ -14348,23 +13638,8 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 8.0.0", - "wasmtime 8.0.1", -] - -[[package]] -name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "smallvec", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-debug-derive 5.0.0", - "sp-std 5.0.0", + "sp-std", + "wasmtime", ] [[package]] @@ -14376,10 +13651,10 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-debug-derive 8.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -14456,8 +13731,8 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -14525,26 +13800,26 @@ dependencies = [ "serde", "serde_derive", "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", - "sp-arithmetic 16.0.0", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", "sp-authority-discovery", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-core", + "sp-inherents", + "sp-io", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-staking", + "sp-std", + "sp-storage", "sp-transaction-pool", - "sp-version 22.0.0", + "sp-version", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -14565,7 +13840,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights 20.0.0", + "sp-weights", "xcm-procedural", ] @@ -14574,19 +13849,19 @@ name = "staging-xcm-builder" version = "1.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", "pallet-transaction-payment", "parity-scale-codec", "polkadot-parachain-primitives", "scale-info", - "sp-arithmetic 16.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-weights 20.0.0", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", "staging-xcm", "staging-xcm-executor", ] @@ -14598,16 +13873,16 @@ source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3r dependencies = [ "environmental", "frame-benchmarking", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-weights 20.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", "staging-xcm", ] @@ -14741,11 +14016,11 @@ dependencies = [ "parity-scale-codec", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-core", + "sp-runtime", ] [[package]] @@ -14770,7 +14045,7 @@ dependencies = [ "log", "sc-rpc-api", "serde", - "sp-runtime 24.0.0", + "sp-runtime", ] [[package]] @@ -14783,10 +14058,10 @@ dependencies = [ "sc-client-api", "sc-rpc-api", "serde", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", - "sp-trie 22.0.0", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-trie", "trie-db", ] @@ -15490,22 +14765,22 @@ dependencies = [ "sc-executor", "serde", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-api", "sp-consensus-aura", "sp-consensus-babe", - "sp-core 21.0.0", - "sp-debug-derive 8.0.0", - "sp-externalities 0.19.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", - "sp-keystore 0.27.0", - "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-state-machine 0.28.0", + "sp-core", + "sp-debug-derive", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-rpc", + "sp-runtime", + "sp-state-machine", "sp-timestamp", "sp-transaction-storage-proof", - "sp-version 22.0.0", - "sp-weights 20.0.0", + "sp-version", + "sp-weights", "substrate-rpc-client", "zstd 0.12.4", ] @@ -15702,30 +14977,12 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", -] - -[[package]] -name = "ver-api" -version = "4.0.0-dev" -source = "git+https://github.com/mangata-finance/substrate?branch=mangata-dev#462977d15a851a441fe542f68e06b286f059dbfe" -dependencies = [ - "derive_more", - "futures", - "log", - "parity-scale-codec", - "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", - "sp-ver 4.0.0-dev (git+https://github.com/mangata-finance/substrate?branch=mangata-dev)", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-std", + "sp-ver", ] [[package]] @@ -15916,17 +15173,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wasmi" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" -dependencies = [ - "parity-wasm", - "wasmi-validation", - "wasmi_core 0.2.1", -] - [[package]] name = "wasmi" version = "0.31.0" @@ -15936,38 +15182,16 @@ dependencies = [ "smallvec", "spin 0.9.8", "wasmi_arena", - "wasmi_core 0.13.0", + "wasmi_core", "wasmparser-nostd", ] -[[package]] -name = "wasmi-validation" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] - [[package]] name = "wasmi_arena" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" -[[package]] -name = "wasmi_core" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" -dependencies = [ - "downcast-rs", - "libm 0.2.8", - "memory_units", - "num-rational", - "num-traits", -] - [[package]] name = "wasmi_core" version = "0.13.0" @@ -15980,16 +15204,6 @@ dependencies = [ "paste", ] -[[package]] -name = "wasmparser" -version = "0.100.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" -dependencies = [ - "indexmap 1.9.3", - "url", -] - [[package]] name = "wasmparser" version = "0.102.0" @@ -16009,31 +15223,6 @@ dependencies = [ "indexmap-nostd", ] -[[package]] -name = "wasmtime" -version = "6.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" -dependencies = [ - "anyhow", - "bincode", - "cfg-if", - "indexmap 1.9.3", - "libc", - "log", - "object 0.29.0", - "once_cell", - "paste", - "psm", - "serde", - "target-lexicon", - "wasmparser 0.100.0", - "wasmtime-environ 6.0.2", - "wasmtime-jit 6.0.2", - "wasmtime-runtime 6.0.2", - "windows-sys 0.42.0", -] - [[package]] name = "wasmtime" version = "8.0.1" @@ -16053,24 +15242,15 @@ dependencies = [ "rayon", "serde", "target-lexicon", - "wasmparser 0.102.0", + "wasmparser", "wasmtime-cache", "wasmtime-cranelift", - "wasmtime-environ 8.0.1", - "wasmtime-jit 8.0.1", - "wasmtime-runtime 8.0.1", + "wasmtime-environ", + "wasmtime-jit", + "wasmtime-runtime", "windows-sys 0.45.0", ] -[[package]] -name = "wasmtime-asm-macros" -version = "6.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" -dependencies = [ - "cfg-if", -] - [[package]] name = "wasmtime-asm-macros" version = "8.0.1" @@ -16108,7 +15288,7 @@ checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", - "cranelift-entity 0.95.1", + "cranelift-entity", "cranelift-frontend", "cranelift-native", "cranelift-wasm", @@ -16117,9 +15297,9 @@ dependencies = [ "object 0.30.4", "target-lexicon", "thiserror", - "wasmparser 0.102.0", + "wasmparser", "wasmtime-cranelift-shared", - "wasmtime-environ 8.0.1", + "wasmtime-environ", ] [[package]] @@ -16134,26 +15314,7 @@ dependencies = [ "gimli 0.27.3", "object 0.30.4", "target-lexicon", - "wasmtime-environ 8.0.1", -] - -[[package]] -name = "wasmtime-environ" -version = "6.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" -dependencies = [ - "anyhow", - "cranelift-entity 0.93.2", - "gimli 0.26.2", - "indexmap 1.9.3", - "log", - "object 0.29.0", - "serde", - "target-lexicon", - "thiserror", - "wasmparser 0.100.0", - "wasmtime-types 6.0.2", + "wasmtime-environ", ] [[package]] @@ -16163,7 +15324,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", - "cranelift-entity 0.95.1", + "cranelift-entity", "gimli 0.27.3", "indexmap 1.9.3", "log", @@ -16171,31 +15332,8 @@ dependencies = [ "serde", "target-lexicon", "thiserror", - "wasmparser 0.102.0", - "wasmtime-types 8.0.1", -] - -[[package]] -name = "wasmtime-jit" -version = "6.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" -dependencies = [ - "addr2line 0.17.0", - "anyhow", - "bincode", - "cfg-if", - "cpp_demangle", - "gimli 0.26.2", - "log", - "object 0.29.0", - "rustc-demangle", - "serde", - "target-lexicon", - "wasmtime-environ 6.0.2", - "wasmtime-jit-icache-coherence 6.0.2", - "wasmtime-runtime 6.0.2", - "windows-sys 0.42.0", + "wasmparser", + "wasmtime-types", ] [[package]] @@ -16215,22 +15353,13 @@ dependencies = [ "rustc-demangle", "serde", "target-lexicon", - "wasmtime-environ 8.0.1", - "wasmtime-jit-debug 8.0.1", - "wasmtime-jit-icache-coherence 8.0.1", - "wasmtime-runtime 8.0.1", + "wasmtime-environ", + "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", + "wasmtime-runtime", "windows-sys 0.45.0", ] -[[package]] -name = "wasmtime-jit-debug" -version = "6.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" -dependencies = [ - "once_cell", -] - [[package]] name = "wasmtime-jit-debug" version = "8.0.1" @@ -16242,17 +15371,6 @@ dependencies = [ "rustix 0.36.17", ] -[[package]] -name = "wasmtime-jit-icache-coherence" -version = "6.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" -dependencies = [ - "cfg-if", - "libc", - "windows-sys 0.42.0", -] - [[package]] name = "wasmtime-jit-icache-coherence" version = "8.0.1" @@ -16264,30 +15382,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "wasmtime-runtime" -version = "6.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" -dependencies = [ - "anyhow", - "cc", - "cfg-if", - "indexmap 1.9.3", - "libc", - "log", - "mach", - "memfd", - "memoffset 0.6.5", - "paste", - "rand 0.8.5", - "rustix 0.36.17", - "wasmtime-asm-macros 6.0.2", - "wasmtime-environ 6.0.2", - "wasmtime-jit-debug 6.0.2", - "windows-sys 0.42.0", -] - [[package]] name = "wasmtime-runtime" version = "8.0.1" @@ -16306,34 +15400,22 @@ dependencies = [ "paste", "rand 0.8.5", "rustix 0.36.17", - "wasmtime-asm-macros 8.0.1", - "wasmtime-environ 8.0.1", - "wasmtime-jit-debug 8.0.1", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-jit-debug", "windows-sys 0.45.0", ] -[[package]] -name = "wasmtime-types" -version = "6.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" -dependencies = [ - "cranelift-entity 0.93.2", - "serde", - "thiserror", - "wasmparser 0.100.0", -] - [[package]] name = "wasmtime-types" version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ - "cranelift-entity 0.95.1", + "cranelift-entity", "serde", "thiserror", - "wasmparser 0.102.0", + "wasmparser", ] [[package]] @@ -16599,8 +15681,8 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", @@ -16662,25 +15744,25 @@ dependencies = [ "serde", "serde_derive", "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-application-crypto 23.0.0", + "sp-api", + "sp-application-crypto", "sp-authority-discovery", - "sp-block-builder 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 21.0.0", - "sp-inherents 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-io 23.0.0", + "sp-core", + "sp-inherents", + "sp-io", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-runtime 24.0.0", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-staking", + "sp-std", + "sp-storage", "sp-transaction-pool", - "sp-version 22.0.0", + "sp-version", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -16693,13 +15775,13 @@ name = "westend-runtime-constants" version = "1.0.0" source = "git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards#a27c627cdb06832634e5fb70ad7b4c3f013c2e33" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-weights 20.0.0", + "sp-core", + "sp-runtime", + "sp-weights", ] [[package]] @@ -16780,21 +15862,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -17024,8 +16091,8 @@ dependencies = [ "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "lazy_static", "log", @@ -17037,12 +16104,12 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", "staging-xcm", "staging-xcm-executor", ] @@ -17065,12 +16132,12 @@ dependencies = [ "jsonrpsee", "parity-scale-codec", "serde", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-blockchain 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-rpc 6.0.0 (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-std", "xyk-runtime-api", ] @@ -17078,16 +16145,16 @@ dependencies = [ name = "xyk-runtime-api" version = "2.0.0" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "frame-system 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/mangata-finance//polkadot-sdk?branch=feature/3rdparty-rewards)", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-std 8.0.0", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] diff --git a/pallets/proof-of-stake/Cargo.toml b/pallets/proof-of-stake/Cargo.toml index d58f9e3c05..b038a2cf25 100644 --- a/pallets/proof-of-stake/Cargo.toml +++ b/pallets/proof-of-stake/Cargo.toml @@ -50,26 +50,42 @@ sp-io = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "dev orml-traits = { git = "https://github.com/mangata-finance/open-runtime-module-library", branch = "develop", default-features = false } + [features] default = ["std"] std = [ "codec/std", - "hex/std", "frame-benchmarking/std", + "frame-executive/std", "frame-support/std", "frame-system/std", + "frame-try-runtime/std", + "hex/std", + "log/std", "mangata-support/std", + "mangata-types/std", "orml-tokens/std", + "pallet-bootstrap/std", + "pallet-issuance/std", "pallet-vesting-mangata/std", "scale-info/std", "serde", - "sp-std/std", + "sp-arithmetic/std", "sp-core/std", + "sp-runtime/std", + "sp-std/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", "mangata-support/runtime-benchmarks", + "orml-tokens/runtime-benchmarks", + "pallet-bootstrap/runtime-benchmarks", + "pallet-issuance/runtime-benchmarks", + "pallet-vesting-mangata/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] try-runtime = [ diff --git a/pallets/proof-of-stake/rpc/Cargo.toml b/pallets/proof-of-stake/rpc/Cargo.toml index 4a76093273..cd10d78381 100644 --- a/pallets/proof-of-stake/rpc/Cargo.toml +++ b/pallets/proof-of-stake/rpc/Cargo.toml @@ -13,13 +13,13 @@ serde = { version = "1.0.126", features = ["derive"], optional = true } # Substrate packages -sp-api = { version = '4.0.0-dev', default-features = false , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -sp-blockchain = { version = '4.0.0-dev', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -sp-rpc = { version = '6.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -sp-core = { version = '7.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -sp-std = { version = '5.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -sp-runtime = { version = '7.0.0', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -mangata-types = { default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } +sp-api = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +sp-blockchain = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +sp-rpc = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +sp-core = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +sp-std = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +sp-runtime = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +mangata-types = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } # local packages @@ -27,11 +27,14 @@ proof-of-stake-runtime-api = { version = "2.0.0", path = "../runtime-api", defau [features] default = ["std"] + std = [ - "serde", - "sp-api/std", - "sp-core/std", - "sp-std/std", - "sp-runtime/std", - "proof-of-stake-runtime-api/std" + "serde", + "sp-api/std", + "sp-core/std", + "sp-std/std", + "sp-runtime/std", + "proof-of-stake-runtime-api/std", + "mangata-types/std", + "codec/std", ] diff --git a/pallets/proof-of-stake/runtime-api/Cargo.toml b/pallets/proof-of-stake/runtime-api/Cargo.toml index 34d8be4bf3..c3e0c90fed 100644 --- a/pallets/proof-of-stake/runtime-api/Cargo.toml +++ b/pallets/proof-of-stake/runtime-api/Cargo.toml @@ -6,25 +6,31 @@ edition = "2018" license = "GPL-3.0-or-later" [dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ + "derive", +] } serde = { version = "1.0.126", optional = true, features = ["derive"] } -sp-api = { version = '4.0.0-dev', default-features = false, git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -sp-std = { default-features = false, version = '5.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -sp-runtime = { default-features = false, version = '7.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -frame-support = { default-features = false, version = '4.0.0-dev' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -frame-system = { default-features = false, version = '4.0.0-dev' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -sp-core = { default-features = false, version = '7.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" } -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.1", default-features = false, features = [ + "derive", +] } -[dev-dependencies] -serde_json = "1.0.68" +sp-api = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +sp-std = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +sp-runtime = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +frame-support = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +frame-system = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } +sp-core = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } [features] default = ["std"] + std = [ - "serde", - "sp-api/std", - "codec/std", - "sp-runtime/std", - "frame-support/std", - 'frame-system/std' + "codec/std", + "frame-support/std", + "frame-system/std", + "serde", + "sp-api/std", + "sp-core/std", + "sp-runtime/std", + "sp-std/std", ] diff --git a/pallets/xyk/runtime-api/Cargo.toml b/pallets/xyk/runtime-api/Cargo.toml index 931b580f43..3d23f73d64 100644 --- a/pallets/xyk/runtime-api/Cargo.toml +++ b/pallets/xyk/runtime-api/Cargo.toml @@ -6,9 +6,13 @@ edition = "2018" license = "GPL-3.0-or-later" [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ + "derive", +] } serde = { version = "1.0.126", optional = true, features = ["derive"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.1", default-features = false, features = [ + "derive", +] } frame-support = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } frame-system = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } diff --git a/runtime/mangata-kusama/Cargo.toml b/runtime/mangata-kusama/Cargo.toml index 6278fa1fb0..cc24d2d0e0 100644 --- a/runtime/mangata-kusama/Cargo.toml +++ b/runtime/mangata-kusama/Cargo.toml @@ -12,10 +12,14 @@ targets = ["x86_64-unknown-linux-gnu"] substrate-wasm-builder = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop" } [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ + "derive", +] } hex-literal = { version = "0.3.1" } log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.1", default-features = false, features = [ + "derive", +] } serde = { version = "1.0.137", optional = true, features = ["derive"] } smallvec = "1.6.1" static_assertions = "1.1.0" @@ -32,7 +36,7 @@ pallet-sudo-origin = { path = "../../pallets/sudo-origin", default-features = fa pallet-xyk = { path = "../../pallets/xyk", default-features = false, version = "0.1.0" } parachain-staking = { path = "../../pallets/parachain-staking", default-features = false } xyk-runtime-api = { path = "../../pallets/xyk/runtime-api", default-features = false, version = "2.0.0" } -proof-of-stake-runtime-api = { path = '../../pallets/proof-of-stake/runtime-api', default-features = false} +proof-of-stake-runtime-api = { path = '../../pallets/proof-of-stake/runtime-api', default-features = false } # Substrate Dependencies ## Substrate Primitive Dependencies @@ -114,23 +118,26 @@ xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/man pallet-crowdloan-rewards = { git = "https://github.com/mangata-finance/crowdloan-rewards", branch = "upgrade/v1.1.0", default-features = false } [features] -default = [ - "std", -] +default = ["std"] std = [ "codec/std", + "common-runtime/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", + "cumulus-pallet-session-benchmarking/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-core/std", "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", + "frame-benchmarking/std", "frame-executive/std", "frame-support/std", + "frame-system-benchmarking/std", "frame-system-rpc-runtime-api/std", "frame-system/std", + "frame-try-runtime/std", "log/std", "mangata-support/std", "mangata-types/std", @@ -143,6 +150,7 @@ std = [ "orml-xtokens/std", "pallet-aura/std", "pallet-authorship/std", + "pallet-balances/std", "pallet-bootstrap/std", "pallet-collective-mangata/std", "pallet-crowdloan-rewards/std", @@ -166,7 +174,9 @@ std = [ "parachain-info/std", "parachain-staking/std", "polkadot-parachain-primitives/std", + "polkadot-primitives/std", "polkadot-runtime-common/std", + "proof-of-stake-runtime-api/std", "scale-info/std", "serde", "sp-api/std", @@ -183,11 +193,11 @@ std = [ "sp-transaction-pool/std", "sp-ver/std", "sp-version/std", + "sp-weights/std", "ver-api/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", - "proof-of-stake-runtime-api/std", "xyk-runtime-api/std", ] @@ -209,6 +219,7 @@ try-runtime = [ "orml-xtokens/try-runtime", "pallet-aura/try-runtime", "pallet-authorship/try-runtime", + "pallet-balances/try-runtime", "pallet-bootstrap/try-runtime", "pallet-collective-mangata/try-runtime", "pallet-crowdloan-rewards/try-runtime", @@ -247,9 +258,11 @@ runtime-benchmarks = [ "frame-system-benchmarking", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", + "mangata-support/runtime-benchmarks", "orml-asset-registry/runtime-benchmarks", "orml-tokens/runtime-benchmarks", "orml-xtokens/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", "pallet-bootstrap/runtime-benchmarks", "pallet-collective-mangata/runtime-benchmarks", "pallet-crowdloan-rewards/runtime-benchmarks", @@ -260,6 +273,7 @@ runtime-benchmarks = [ "pallet-multipurpose-liquidity/runtime-benchmarks", "pallet-proof-of-stake/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", + "pallet-sudo-mangata/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-utility-mangata/runtime-benchmarks", From b1716577779748f6051c0e7404c8875da23c6e4c Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 13 Nov 2023 09:22:18 +0100 Subject: [PATCH 097/125] fix formatting --- pallets/proof-of-stake/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 96a0a6d525..3ed0a8d436 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -221,7 +221,7 @@ pub mod pallet { // NOTE: 1R if Self::is_new_session() { SchedulesListMetadata::::mutate(|s| s.pos = None); - return Default::default(); + return Default::default() } for _ in 0..T::SchedulesPerBlock::get() { From acf55177112f2ae3bde00d4936866b81807efcb6 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 13 Nov 2023 17:30:20 +0100 Subject: [PATCH 098/125] fix rpc issue --- node/src/rpc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/src/rpc.rs b/node/src/rpc.rs index e56941ae33..cbd8996acb 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -77,8 +77,8 @@ where module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; module.merge(TransactionPayment::new(client.clone()).into_rpc())?; - module.merge(Xyk::new(client).into_rpc())?; - module.merge(ProofOfStake::new(client.clone()).into_rpc())?; + module.merge(Xyk::new(client.clone()).into_rpc())?; + module.merge(ProofOfStake::new(client).into_rpc())?; Ok(module) } From eb7a266a862451e91e1c2de515bac4d5cd5a9838 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 13 Nov 2023 19:12:47 +0100 Subject: [PATCH 099/125] fix formatting --- pallets/proof-of-stake/src/benchmarking.rs | 132 +++++++++++---------- pallets/proof-of-stake/src/lib.rs | 5 +- pallets/proof-of-stake/src/mock.rs | 1 + pallets/xyk/src/mock.rs | 1 + 4 files changed, 76 insertions(+), 63 deletions(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 91c191a75a..14c156566e 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -3,15 +3,26 @@ use super::*; use frame_benchmarking::{account, benchmarks, whitelisted_caller}; +use frame_support::traits::WithdrawReasons; use frame_system::RawOrigin; use mangata_support::traits::{ComputeIssuance, ProofOfStakeRewardsApi}; use orml_tokens::MultiTokenCurrencyExtended; -use sp_runtime::{Permill, SaturatedConversion}; +use sp_runtime::{traits::One, Permill, SaturatedConversion}; use crate::Pallet as PoS; const MILION: u128 = 1_000__000_000__000_000; +trait ToBalance { + fn to_balance(self) -> BalanceOf; +} + +impl ToBalance for u128 { + fn to_balance(self) -> BalanceOf { + self.try_into().ok().expect("u128 should fit into Balance type") + } +} + fn init() where T: frame_system::Config, @@ -104,7 +115,7 @@ benchmarks! { // 4 wait some time // 5 mint some - init!(); + init::(); let caller: ::AccountId = whitelisted_caller(); let initial_amount: BalanceOf = 1000000000000000000000_u128.try_into().ok().expect("should fit"); let expected_native_asset_id = ::NativeCurrencyId::get(); @@ -199,7 +210,7 @@ benchmarks! { let native_asset_id = ::NativeCurrencyId::get(); loop { - let token_id = TokensOf::::create(&caller, MILION.into()).unwrap().into(); + let token_id = TokensOf::::create(&caller, MILION.to_balance::()).unwrap(); if token_id > native_asset_id { break; } @@ -207,12 +218,12 @@ benchmarks! { let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get() * 10u128; let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit + 1); - TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.to_balance::()).unwrap(); - for _ in 0 .. schedules_limit - 1 { - let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), token_id.into(), REWARDS_AMOUNT.into()).unwrap(); - let reward_token = token_id + 1; + for _ in 0 .. schedules_limit - 2 { + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.to_balance::(), token_id, REWARDS_AMOUNT.to_balance::()).unwrap(); + let reward_token = token_id + One::one(); let balance:u128 = TokensOf::::free_balance(reward_token.into(), &caller).into(); assert_eq!(balance, REWARDS_AMOUNT); @@ -220,19 +231,19 @@ benchmarks! { RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, token_id), reward_token.into(), - (REWARDS_AMOUNT).into(), + (REWARDS_AMOUNT).to_balance::(), 10u32.into(), ).unwrap(); } - let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), token_id.into(), REWARDS_AMOUNT.into()).unwrap(); - let reward_token = token_id + 1; + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.to_balance::(), token_id.into(), REWARDS_AMOUNT.to_balance::()).unwrap(); + let reward_token = token_id + One::one(); PoS::::reward_pool( RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, token_id), reward_token.into(), - REWARDS_AMOUNT, + REWARDS_AMOUNT.to_balance::(), 2u32.into(), ).unwrap(); @@ -240,21 +251,21 @@ benchmarks! { forward_to_next_session::(); forward_to_next_session::(); - let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), token_id.into(), REWARDS_AMOUNT.into()).unwrap(); - let reward_token = token_id + 1; + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.to_balance::(), token_id.into(), REWARDS_AMOUNT.to_balance::()).unwrap(); + let reward_token = token_id + One::one(); assert_eq!( - PoS::::tail().unwrap(), + PoS::::list_metadata().count, (schedules_limit - 1 ) as u64 ); - }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,token_id), reward_token.into(), REWARDS_AMOUNT, 10u32.into()) + }: reward_pool(RawOrigin::Signed(caller.clone().into()), (native_asset_id,token_id), reward_token.into(), REWARDS_AMOUNT.to_balance::(), 10u32.into()) verify { assert_eq!( - PoS::::tail().unwrap(), - schedules_limit as u64 + PoS::::list_metadata().count, + (schedules_limit as u64) ); } @@ -272,39 +283,39 @@ benchmarks! { let REWARDS_AMOUNT: u128 = ::Min3rdPartyRewardValutationPerSession::get() * (schedules_limit as u128); loop { - let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); if token_id > native_asset_id { break; } } let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit); - TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.to_balance::()).unwrap(); - let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), first_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); - let liquidity_asset_id = first_token_id + 1; + let first_token_id= TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); + XykOf::::create_pool(caller.clone(), native_asset_id, REWARDS_AMOUNT.to_balance::(), first_token_id, REWARDS_AMOUNT.to_balance::()).unwrap(); + let liquidity_asset_id = first_token_id + One::one(); - let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), second_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); - let reward_token_id = second_token_id + 1; + let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.to_balance::(), second_token_id.into(), REWARDS_AMOUNT.to_balance::()).unwrap(); + let reward_token_id = second_token_id + One::one(); PoS::::reward_pool( RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, first_token_id), reward_token_id.into(), - REWARDS_AMOUNT, + REWARDS_AMOUNT.to_balance::(), 2u32.into(), ).unwrap(); - }: activate_liquidity_for_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id, None) + }: activate_liquidity_for_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id.into(), 10_000u128.to_balance::(), reward_token_id, None) verify { forward_to_next_session::(); forward_to_next_session::(); assert_eq!( - PoS::::calculate_3rdparty_rewards_amount(caller, liquidity_asset_id, reward_token_id).unwrap(), - REWARDS_AMOUNT/2 + PoS::::calculate_3rdparty_rewards_amount(caller, liquidity_asset_id.into(), reward_token_id).unwrap(), + (REWARDS_AMOUNT/2).to_balance::() ) } @@ -322,35 +333,34 @@ benchmarks! { let REWARDS_AMOUNT: u128 = 2u128 * ::Min3rdPartyRewardValutationPerSession::get(); loop { - let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); if token_id > native_asset_id { break; } } + TokensOf::::mint(native_asset_id.into(), &caller, REWARDS_AMOUNT.to_balance::()).unwrap(); let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit); - TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); - - let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), first_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); - let liquidity_asset_id = first_token_id + 1; + let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.to_balance::(), first_token_id.into(), REWARDS_AMOUNT.to_balance::()).unwrap(); + let liquidity_asset_id = first_token_id + One::one(); - let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), second_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); - let reward_token_id = second_token_id + 1; + let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.to_balance::(), second_token_id.into(), REWARDS_AMOUNT.to_balance::()).unwrap(); + let reward_token_id = second_token_id + One::one(); PoS::::reward_pool( RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, first_token_id), reward_token_id.into(), - REWARDS_AMOUNT, + REWARDS_AMOUNT.to_balance::(), 2u32.into(), ).unwrap(); assert!(TokensOf::::ensure_can_withdraw( liquidity_asset_id.into(), &caller, - REWARDS_AMOUNT.into(), + REWARDS_AMOUNT.to_balance::(), WithdrawReasons::all(), Default::default(), ).is_ok()); @@ -358,7 +368,7 @@ benchmarks! { PoS::::activate_liquidity_for_3rdparty_rewards( RawOrigin::Signed(caller.clone().into()).into(), liquidity_asset_id, - 10_000u128, + 10_000u128.to_balance::(), reward_token_id, None ).unwrap(); @@ -367,20 +377,20 @@ benchmarks! { TokensOf::::ensure_can_withdraw( liquidity_asset_id.into(), &caller, - REWARDS_AMOUNT.into(), + REWARDS_AMOUNT.to_balance::(), WithdrawReasons::all(), Default::default(), ).is_err() ); - }: deactivate_liquidity_for_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128, reward_token_id) + }: deactivate_liquidity_for_3rdparty_rewards(RawOrigin::Signed(caller.clone().into()), liquidity_asset_id, 10_000u128.to_balance::(), reward_token_id) verify { assert!(TokensOf::::ensure_can_withdraw( liquidity_asset_id.into(), &caller, - REWARDS_AMOUNT.into(), + REWARDS_AMOUNT.to_balance::(), WithdrawReasons::all(), Default::default(), ).is_ok()); @@ -402,35 +412,35 @@ benchmarks! { let REWARDS_AMOUNT: u128 = 2u128 * ::Min3rdPartyRewardValutationPerSession::get(); loop { - let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); + let token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); if token_id > native_asset_id { break; } } let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit); - TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.into()).unwrap(); + TokensOf::::mint(native_asset_id.into(), &caller, native_asset_amount.to_balance::()).unwrap(); - let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), first_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); - let liquidity_asset_id = first_token_id + 1; + let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.to_balance::(), first_token_id.into(), REWARDS_AMOUNT.to_balance::()).unwrap(); + let liquidity_asset_id = first_token_id + One::one(); - let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.into()).unwrap().into(); - XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.into(), second_token_id.into(), REWARDS_AMOUNT.into()).unwrap(); - let reward_token_id = second_token_id + 1; + let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); + XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.to_balance::(), second_token_id.into(), REWARDS_AMOUNT.to_balance::()).unwrap(); + let reward_token_id = second_token_id + One::one(); PoS::::reward_pool( RawOrigin::Signed(caller.clone().into()).into(), (native_asset_id, first_token_id), reward_token_id.into(), - REWARDS_AMOUNT, + REWARDS_AMOUNT.to_balance::(), 2u32.into(), ).unwrap(); PoS::::activate_liquidity_for_3rdparty_rewards( RawOrigin::Signed(caller.clone().into()).into(), liquidity_asset_id, - 10_000u128, + 10_000u128.to_balance::(), reward_token_id, None ).unwrap(); @@ -439,17 +449,17 @@ benchmarks! { forward_to_next_session::(); assert_eq!( PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), - REWARDS_AMOUNT / 2 + (REWARDS_AMOUNT / 2).to_balance::() ); forward_to_next_session::(); assert_eq!( PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), - REWARDS_AMOUNT + REWARDS_AMOUNT.to_balance::() ); forward_to_next_session::(); assert_eq!( PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), - REWARDS_AMOUNT + REWARDS_AMOUNT.to_balance::() ); let balance_before:u128 = TokensOf::::free_balance(reward_token_id.into(), &caller).into(); @@ -460,7 +470,7 @@ benchmarks! { let balance_after:u128 = TokensOf::::free_balance(reward_token_id.into(), &caller).into(); assert_eq!( PoS::::calculate_3rdparty_rewards_amount(caller.clone(), liquidity_asset_id, reward_token_id).unwrap(), - 0u128 + 0u128.to_balance::() ); assert_eq!(balance_after - balance_before, REWARDS_AMOUNT); diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 3ed0a8d436..819ea758f7 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -350,7 +350,8 @@ pub mod pallet { #[cfg(feature = "runtime-benchmarks")] pub trait ValutationApiTrait: - Valuate, CurrencyIdOf> + XykFunctionsTrait + Valuate, CurrencyIdOf> + + XykFunctionsTrait, BalanceOf, CurrencyIdOf> { } @@ -367,7 +368,7 @@ pub mod pallet { where C: Config, T: Valuate, CurrencyIdOf>, - T: XykFunctionsTrait, + T: XykFunctionsTrait, BalanceOf, CurrencyIdOf>, { } diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index a9c8488f50..d806282e53 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -303,6 +303,7 @@ impl pos::Config for Test { type Min3rdPartyRewardVolume = ConstU128<10>; type WeightInfo = (); type ValuationApi = Xyk; + type SchedulesPerBlock = ConstU32<5>; } pub struct TokensActivationPassthrough(PhantomData); diff --git a/pallets/xyk/src/mock.rs b/pallets/xyk/src/mock.rs index 8726281ea8..d0cc2edf86 100644 --- a/pallets/xyk/src/mock.rs +++ b/pallets/xyk/src/mock.rs @@ -342,6 +342,7 @@ impl pallet_proof_of_stake::Config for Test { type Min3rdPartyRewardValutationPerSession = ConstU128<10>; type Min3rdPartyRewardVolume = ConstU128<10>; type ValuationApi = XykStorage; + type SchedulesPerBlock = ConstU32<5>; } pub struct TokensActivationPassthrough(PhantomData); From 0ad816d5f5e0ddfbe9eefba28dcc804b86bd2b5c Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 13 Nov 2023 19:18:02 +0100 Subject: [PATCH 100/125] split runtime benchmarks tests into multiple binaries --- .github/workflows/reusable-build-and-test.yml | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 63b1a0d4e2..1a53db47bc 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -34,7 +34,7 @@ jobs: container: image: ${{ inputs.builder_image }} env: - DOCKER_HOST: 'unix:///run/docker/docker.sock' + DOCKER_HOST: "unix:///run/docker/docker.sock" volumes: - /run/docker:/run/docker steps: @@ -42,8 +42,8 @@ jobs: - name: Authenticate to Google Cloud uses: google-github-actions/auth@v1 with: - workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' - service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" + service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}" - name: Cache the Cargo dependencies uses: mansagroup/gcs-cache-action@v1.0.3 @@ -130,8 +130,8 @@ jobs: - name: Authenticate to Google Cloud uses: google-github-actions/auth@v1 with: - workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' - service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" + service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}" - name: Cache the Cargo dependencies uses: mansagroup/gcs-cache-action@v1.0.3 with: @@ -154,8 +154,8 @@ jobs: - name: Authenticate to Google Cloud uses: google-github-actions/auth@v1 with: - workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' - service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" + service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}" - name: Cache the Cargo dependencies uses: mansagroup/gcs-cache-action@v1.0.3 with: @@ -179,8 +179,8 @@ jobs: - name: Authenticate to Google Cloud uses: google-github-actions/auth@v1 with: - workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' - service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" + service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}" - name: Cache the Cargo dependencies uses: mansagroup/gcs-cache-action@v1.0.3 with: @@ -210,8 +210,8 @@ jobs: - name: Authenticate to Google Cloud uses: google-github-actions/auth@v1 with: - workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' - service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" + service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}" - name: Cache the Cargo dependencies uses: mansagroup/gcs-cache-action@v1.0.3 with: @@ -222,9 +222,12 @@ jobs: /usr/local/cargo/registry key: cargo-benchmark-cache-${{ inputs.cache_version }}-${{ hashFiles('Cargo.lock') }} - name: Run benchmarks tests - run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock -p pallet-proof-of-stake -p pallet-proof-of-stake + run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock - name: Run benchmarks tests run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-bootstrap + # NOTE: MGX-742 + - name: Run benchmarks tests + run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-proof-of-stake build-and-run-try-runtime: name: Run try-runtime checks @@ -236,8 +239,8 @@ jobs: - name: Authenticate to Google Cloud uses: google-github-actions/auth@v1 with: - workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' - service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" + service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}" - name: Cache the Cargo dependencies uses: mansagroup/gcs-cache-action@v1.0.3 with: @@ -272,8 +275,8 @@ jobs: - name: Authenticate to Google Cloud uses: google-github-actions/auth@v1 with: - workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' - service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" + service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}" - name: Cache the Cargo dependencies uses: mansagroup/gcs-cache-action@v1.0.3 @@ -321,7 +324,6 @@ jobs: name: benchmarks path: ./benchmarks - build-wasms: name: Export wasm artifacts runs-on: [compile-gke] @@ -335,8 +337,8 @@ jobs: - name: Authenticate to Google Cloud uses: google-github-actions/auth@v1 with: - workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' - service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + workload_identity_provider: "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" + service_account: "${{ secrets.GCP_SERVICE_ACCOUNT }}" - name: Cache the Cargo dependencies uses: mansagroup/gcs-cache-action@v1.0.3 @@ -362,4 +364,3 @@ jobs: /bin/bash -c 'target/release/mangata-node export-genesis-wasm --chain=mangata-rococo -l=info,xyk=error > /dev/null' /bin/bash -c 'target/release/mangata-node export-genesis-state --chain=mangata-rococo-local -l=info,xyk=error > /dev/null' /bin/bash -c 'target/release/mangata-node export-genesis-wasm --chain=mangata-rococo-local -l=info,xyk=error > /dev/null' - From af697e1655a6c2d41d8692ba2765d2553625bbf7 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 13 Nov 2023 23:03:59 +0100 Subject: [PATCH 101/125] fix benchmarks --- pallets/parachain-staking/src/benchmarks.rs | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pallets/parachain-staking/src/benchmarks.rs b/pallets/parachain-staking/src/benchmarks.rs index aeb7a33a23..38d96e899c 100644 --- a/pallets/parachain-staking/src/benchmarks.rs +++ b/pallets/parachain-staking/src/benchmarks.rs @@ -1687,25 +1687,25 @@ benchmarks! { active_session_change { - // liquidity tokens - let x in 3..100; - // candidate_count - let y in (<::MinSelectedCandidates as Get>::get() + 1u32)..(<::MaxCollatorCandidates as Get>::get() - 2u32); // to account for the two candidates we start with - // MaxDelegatorsPerCandidate - let z in 3..<::MaxDelegatorsPerCandidate as Get>::get(); - - // // Since now an aggregator can have multiple collators each of whose rewards will be written to the storage individually - // // Total selected - let w = <::MinSelectedCandidates as Get>::get() + 1u32; - // // liquidity tokens - // let x = 100; + // let x in 3..100; // // candidate_count - // let y = 190; + // let y in (<::MinSelectedCandidates as Get>::get() + 1u32)..(<::MaxCollatorCandidates as Get>::get() - 2u32); // to account for the two candidates we start with // // MaxDelegatorsPerCandidate - // let z = 200; - // // Total selected - // let w = 190; + // let z in 3..<::MaxDelegatorsPerCandidate as Get>::get(); + // + // // // Since now an aggregator can have multiple collators each of whose rewards will be written to the storage individually + // // // Total selected + // let w = <::MinSelectedCandidates as Get>::get() + 1u32; + + // liquidity tokens + let x = 100; + // candidate_count + let y = 55; + // MaxDelegatorsPerCandidate + let z = 30; + // Total selected + let w = 51; assert_ok!(>::finalize_tge(RawOrigin::Root.into())); assert_ok!(>::init_issuance_config(RawOrigin::Root.into())); From 39067725e8309637cd470ae65b56349c6a13c48e Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 14 Nov 2023 07:44:44 +0100 Subject: [PATCH 102/125] fix benchmarks --- pallets/proof-of-stake/src/benchmarking.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 14c156566e..34aff83d89 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -338,13 +338,14 @@ benchmarks! { break; } } - TokensOf::::mint(native_asset_id.into(), &caller, REWARDS_AMOUNT.to_balance::()).unwrap(); let native_asset_amount: u128 = REWARDS_AMOUNT * Into::::into(schedules_limit); + TokensOf::::mint(native_asset_id.into(), &caller, REWARDS_AMOUNT.to_balance::()).unwrap(); let first_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.to_balance::(), first_token_id.into(), REWARDS_AMOUNT.to_balance::()).unwrap(); let liquidity_asset_id = first_token_id + One::one(); + TokensOf::::mint(native_asset_id.into(), &caller, REWARDS_AMOUNT.to_balance::()).unwrap(); let second_token_id = TokensOf::::create(&caller, REWARDS_AMOUNT.to_balance::()).unwrap(); XykOf::::create_pool(caller.clone(), native_asset_id.into(), REWARDS_AMOUNT.to_balance::(), second_token_id.into(), REWARDS_AMOUNT.to_balance::()).unwrap(); let reward_token_id = second_token_id + One::one(); From 287f45f0d3dc997816e1dcb1bb05fd63bb3b2db7 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 14 Nov 2023 13:40:31 +0100 Subject: [PATCH 103/125] revert benchmarks changes --- pallets/parachain-staking/src/benchmarks.rs | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pallets/parachain-staking/src/benchmarks.rs b/pallets/parachain-staking/src/benchmarks.rs index 38d96e899c..aeb7a33a23 100644 --- a/pallets/parachain-staking/src/benchmarks.rs +++ b/pallets/parachain-staking/src/benchmarks.rs @@ -1687,25 +1687,25 @@ benchmarks! { active_session_change { - // // liquidity tokens - // let x in 3..100; - // // candidate_count - // let y in (<::MinSelectedCandidates as Get>::get() + 1u32)..(<::MaxCollatorCandidates as Get>::get() - 2u32); // to account for the two candidates we start with - // // MaxDelegatorsPerCandidate - // let z in 3..<::MaxDelegatorsPerCandidate as Get>::get(); - // - // // // Since now an aggregator can have multiple collators each of whose rewards will be written to the storage individually - // // // Total selected - // let w = <::MinSelectedCandidates as Get>::get() + 1u32; - // liquidity tokens - let x = 100; + let x in 3..100; // candidate_count - let y = 55; + let y in (<::MinSelectedCandidates as Get>::get() + 1u32)..(<::MaxCollatorCandidates as Get>::get() - 2u32); // to account for the two candidates we start with // MaxDelegatorsPerCandidate - let z = 30; - // Total selected - let w = 51; + let z in 3..<::MaxDelegatorsPerCandidate as Get>::get(); + + // // Since now an aggregator can have multiple collators each of whose rewards will be written to the storage individually + // // Total selected + let w = <::MinSelectedCandidates as Get>::get() + 1u32; + + // // liquidity tokens + // let x = 100; + // // candidate_count + // let y = 190; + // // MaxDelegatorsPerCandidate + // let z = 200; + // // Total selected + // let w = 190; assert_ok!(>::finalize_tge(RawOrigin::Root.into())); assert_ok!(>::init_issuance_config(RawOrigin::Root.into())); From 41df809b33299671a59963608a750bf626adc463 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 14 Nov 2023 14:59:38 +0100 Subject: [PATCH 104/125] disable benchmark --- pallets/parachain-staking/src/benchmarks.rs | 504 ++++++++++---------- 1 file changed, 252 insertions(+), 252 deletions(-) diff --git a/pallets/parachain-staking/src/benchmarks.rs b/pallets/parachain-staking/src/benchmarks.rs index aeb7a33a23..8b1bea3801 100644 --- a/pallets/parachain-staking/src/benchmarks.rs +++ b/pallets/parachain-staking/src/benchmarks.rs @@ -1685,257 +1685,257 @@ benchmarks! { assert_eq!(pallet_session::Pallet::::current_index() as u32, 0u32); } - active_session_change { - - // liquidity tokens - let x in 3..100; - // candidate_count - let y in (<::MinSelectedCandidates as Get>::get() + 1u32)..(<::MaxCollatorCandidates as Get>::get() - 2u32); // to account for the two candidates we start with - // MaxDelegatorsPerCandidate - let z in 3..<::MaxDelegatorsPerCandidate as Get>::get(); - - // // Since now an aggregator can have multiple collators each of whose rewards will be written to the storage individually - // // Total selected - let w = <::MinSelectedCandidates as Get>::get() + 1u32; - - // // liquidity tokens - // let x = 100; - // // candidate_count - // let y = 190; - // // MaxDelegatorsPerCandidate - // let z = 200; - // // Total selected - // let w = 190; - - assert_ok!(>::finalize_tge(RawOrigin::Root.into())); - assert_ok!(>::init_issuance_config(RawOrigin::Root.into())); - assert_ok!(>::calculate_and_store_round_issuance(0u32)); - - assert_ok!(Pallet::::set_total_selected(RawOrigin::Root.into(), w)); - - // We will prepare `x-1` liquidity tokens in loop and then another after - - let start_liquidity_token = Pallet::::staking_liquidity_tokens(); - let start_liquidity_token_count: u32 = start_liquidity_token.len().try_into().unwrap(); - for (token,_) in start_liquidity_token { - // as PoolPromoteApi>::update_pool_promotion(token, Some(1)); - T::RewardsApi::enable(token, 1); - } - - assert!(x > start_liquidity_token_count); - // create X - 1 Tokens now and then remaining one - for i in start_liquidity_token_count..(x-1){ - let created_liquidity_token = create_staking_liquidity_for_funding::(Some(T::MinCandidateStk::get())).unwrap(); - Pallet::::add_staking_liquidity_token(RawOrigin::Root.into(), PairedOrLiquidityToken::Liquidity(created_liquidity_token), i).unwrap(); - // as PoolPromoteApi>::update_pool_promotion(created_liquidity_token, Some(1)); - T::RewardsApi::enable(created_liquidity_token, 1); - } - - // Now to prepare the liquidity token we will use for collator and delegators - let amount = ((z*(y+1)) as u128 * 100 * DOLLAR).to_balance::() + T::MinCandidateStk::get() * DOLLAR.to_balance::(); - let created_liquidity_token = create_staking_liquidity_for_funding::(Some(amount)).unwrap(); - assert_ok!(Pallet::::add_staking_liquidity_token(RawOrigin::Root.into(), PairedOrLiquidityToken::Liquidity(created_liquidity_token), x)); - // as PoolPromoteApi>::update_pool_promotion(created_liquidity_token, Some(1)); - T::RewardsApi::enable(created_liquidity_token, 1); - - - // Now we will create y funded collators - let initial_candidates: Vec = Pallet::::candidate_pool().0.into_iter().map(|x| x.owner).collect::<_>(); - let base_candidate_count: u32 = Pallet::::candidate_pool().0.len().try_into().unwrap(); - - assert_eq!(base_candidate_count, 2); - assert_eq!(x as usize , StakingLiquidityTokens::::get().len()); - - // let pool_rewards = pallet_issuance::PromotedPoolsRewardsV2::::get(); - // assert_eq!(pool_rewards.len(), x as usize); - - - let mut candidates = (0u32..y) - .map(|i|{ - create_funded_collator::( - "collator", - USER_SEED - i, - created_liquidity_token, - Some(T::MinCandidateStk::get()), - i + base_candidate_count, - x - ) - }).collect::, &'static str>>()?; - - // create one aggregator per candidate - for (id, c) in candidates.iter().enumerate() { - let aggregator: T::AccountId = account("aggregator", id as u32, 0); - assert_ok!(Pallet::::aggregator_update_metadata(RawOrigin::Signed( - aggregator.clone()).into(), - vec![c.clone()], - MetadataUpdateAction::ExtendApprovedCollators, - )); - - assert_ok!(Pallet::::update_candidate_aggregator(RawOrigin::Signed( - c.clone()).into(), - Some(aggregator.clone()), - )); - } - - assert_eq!(candidates.len(), y as usize); - // - // // Now we will create `z*y` delegators each with `100*DOLLAR` created_liquidity_token tokens - // - let delegators_count = z*y; - let delegators: Vec<_> = (0u32..delegators_count) - .map(|i| - create_funded_user::("delegator", USER_SEED-i, created_liquidity_token, Some((100*DOLLAR).to_balance::())) - ).map(|(account, _token_id, _amount)| account) - .collect(); - assert_eq!(delegators.len(), (z*y) as usize); - - for (delegators, candidate) in delegators.iter().chunks(z as usize).into_iter() - .zip(candidates.clone()) - { - - for (count, delegator) in delegators.into_iter().enumerate() { - Pallet::::delegate(RawOrigin::Signed( - delegator.clone()).into(), - candidate.clone().into(), - (100*DOLLAR).to_balance::(), - None, - count as u32, - 0u32, - ).unwrap(); - } - - assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().delegators.0.len() , z as usize); - assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().top_delegations.len() , z as usize); - assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().bottom_delegations.len() , 0usize); - - } - - - // - // Remove the initial two collators so that they do not get selected - // We do this as the two collators do not have max delegators and would not be worst case - - for initial_candidate in initial_candidates{ - assert_ok!(Pallet::::go_offline(RawOrigin::Signed( - initial_candidate.clone()).into())); - } - - - - // We would like to move on to the end of round 4 - let session_to_reach = 4u32; - - // Moves to the end of the round - // Infinite loop that breaks when should_end_session is true - loop { - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - >::set_block_number(>::block_number() + 1u32.into()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - if Pallet::::round().current == session_to_reach { - for i in 0..2{ - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - >::set_block_number(>::block_number() + 1u32.into()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - } - break; - } - } - - let selected_author = Pallet::::selected_candidates(); - - - // We would like to move on to the end of round 1 - let session_to_reach = 5u32; - - // Moves to the end of the round 0 - // Infinite loop that breaks when should_end_session is true - loop { - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - >::set_block_number(>::block_number() + 1u32.into()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - if Pallet::::round().current == session_to_reach { - for i in 0..2{ - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - >::set_block_number(>::block_number() + 1u32.into()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - } - break; - } - } - - - assert_eq!(pallet_session::Pallet::::current_index() as u32, 5u32); - assert_eq!(Pallet::::round().current as u32, 5u32); - assert_eq!(selected_author.len(), (w as usize).min(Pallet::::candidate_pool().0.len() as usize)); - - - let candidate_pool_state = Pallet::::candidate_pool().0; - - for (i, candidate_bond) in candidate_pool_state.into_iter().enumerate() { - if candidate_bond.liquidity_token == created_liquidity_token { - assert_eq!(candidate_bond.amount.into(), (1+(z as u128)*100)*DOLLAR); - } - } - - for author in selected_author.clone() { - Pallet::::note_author(author.clone()); - } - - // We would like to move on to the end of round 1 - let end_of_session_to_reach = 6u32; - // let pool_rewards = pallet_issuance::PromotedPoolsRewardsV2::::get(); - // assert_eq!(pool_rewards.len(), x as usize); - - // Moves to the end of the round 0 - // Infinite loop that breaks when should_end_session is true - loop { - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - >::set_block_number(>::block_number() + 1u32.into()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - if as pallet_session::ShouldEndSession<_>>::should_end_session(>::block_number()) - && (Pallet::::round().current == end_of_session_to_reach) { - break; - } else { - as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - } - } - - - assert_eq!(pallet_session::Pallet::::current_index() as u32, 6u32); - assert_eq!(Pallet::::round().current as u32, 6u32); - - assert!( as pallet_session::ShouldEndSession<_>>::should_end_session(>::block_number())); - - for author in selected_author.clone() { - for candidate in AggregatorMetadata::::get(&author).unwrap().token_collator_map.iter().map(|x| x.1){ - assert!(T::Currency::total_balance(MGA_TOKEN_ID.into(), &candidate).is_zero()); - } - } - - }: { as frame_support::traits::Hooks<_>>::on_initialize(>::block_number());} - verify { - assert_eq!(pallet_session::Pallet::::current_index() as u32, 7u32); - assert_eq!(Pallet::::round().current as u32, 7u32); - assert_eq!(w as usize, candidates.iter().filter_map(|c| RoundCollatorRewardInfo::::get(c.clone(), 5u32)).count()); - } + // active_session_change { + // + // // liquidity tokens + // let x in 3..100; + // // candidate_count + // let y in (<::MinSelectedCandidates as Get>::get() + 1u32)..(<::MaxCollatorCandidates as Get>::get() - 2u32); // to account for the two candidates we start with + // // MaxDelegatorsPerCandidate + // let z in 3..<::MaxDelegatorsPerCandidate as Get>::get(); + // + // // // Since now an aggregator can have multiple collators each of whose rewards will be written to the storage individually + // // // Total selected + // let w = <::MinSelectedCandidates as Get>::get() + 1u32; + // + // // // liquidity tokens + // // let x = 100; + // // // candidate_count + // // let y = 190; + // // // MaxDelegatorsPerCandidate + // // let z = 200; + // // // Total selected + // // let w = 190; + // + // assert_ok!(>::finalize_tge(RawOrigin::Root.into())); + // assert_ok!(>::init_issuance_config(RawOrigin::Root.into())); + // assert_ok!(>::calculate_and_store_round_issuance(0u32)); + // + // assert_ok!(Pallet::::set_total_selected(RawOrigin::Root.into(), w)); + // + // // We will prepare `x-1` liquidity tokens in loop and then another after + // + // let start_liquidity_token = Pallet::::staking_liquidity_tokens(); + // let start_liquidity_token_count: u32 = start_liquidity_token.len().try_into().unwrap(); + // for (token,_) in start_liquidity_token { + // // as PoolPromoteApi>::update_pool_promotion(token, Some(1)); + // T::RewardsApi::enable(token, 1); + // } + // + // assert!(x > start_liquidity_token_count); + // // create X - 1 Tokens now and then remaining one + // for i in start_liquidity_token_count..(x-1){ + // let created_liquidity_token = create_staking_liquidity_for_funding::(Some(T::MinCandidateStk::get())).unwrap(); + // Pallet::::add_staking_liquidity_token(RawOrigin::Root.into(), PairedOrLiquidityToken::Liquidity(created_liquidity_token), i).unwrap(); + // // as PoolPromoteApi>::update_pool_promotion(created_liquidity_token, Some(1)); + // T::RewardsApi::enable(created_liquidity_token, 1); + // } + // + // // Now to prepare the liquidity token we will use for collator and delegators + // let amount = ((z*(y+1)) as u128 * 100 * DOLLAR).to_balance::() + T::MinCandidateStk::get() * DOLLAR.to_balance::(); + // let created_liquidity_token = create_staking_liquidity_for_funding::(Some(amount)).unwrap(); + // assert_ok!(Pallet::::add_staking_liquidity_token(RawOrigin::Root.into(), PairedOrLiquidityToken::Liquidity(created_liquidity_token), x)); + // // as PoolPromoteApi>::update_pool_promotion(created_liquidity_token, Some(1)); + // T::RewardsApi::enable(created_liquidity_token, 1); + // + // + // // Now we will create y funded collators + // let initial_candidates: Vec = Pallet::::candidate_pool().0.into_iter().map(|x| x.owner).collect::<_>(); + // let base_candidate_count: u32 = Pallet::::candidate_pool().0.len().try_into().unwrap(); + // + // assert_eq!(base_candidate_count, 2); + // assert_eq!(x as usize , StakingLiquidityTokens::::get().len()); + // + // // let pool_rewards = pallet_issuance::PromotedPoolsRewardsV2::::get(); + // // assert_eq!(pool_rewards.len(), x as usize); + // + // + // let mut candidates = (0u32..y) + // .map(|i|{ + // create_funded_collator::( + // "collator", + // USER_SEED - i, + // created_liquidity_token, + // Some(T::MinCandidateStk::get()), + // i + base_candidate_count, + // x + // ) + // }).collect::, &'static str>>()?; + // + // // create one aggregator per candidate + // for (id, c) in candidates.iter().enumerate() { + // let aggregator: T::AccountId = account("aggregator", id as u32, 0); + // assert_ok!(Pallet::::aggregator_update_metadata(RawOrigin::Signed( + // aggregator.clone()).into(), + // vec![c.clone()], + // MetadataUpdateAction::ExtendApprovedCollators, + // )); + // + // assert_ok!(Pallet::::update_candidate_aggregator(RawOrigin::Signed( + // c.clone()).into(), + // Some(aggregator.clone()), + // )); + // } + // + // assert_eq!(candidates.len(), y as usize); + // // + // // // Now we will create `z*y` delegators each with `100*DOLLAR` created_liquidity_token tokens + // // + // let delegators_count = z*y; + // let delegators: Vec<_> = (0u32..delegators_count) + // .map(|i| + // create_funded_user::("delegator", USER_SEED-i, created_liquidity_token, Some((100*DOLLAR).to_balance::())) + // ).map(|(account, _token_id, _amount)| account) + // .collect(); + // assert_eq!(delegators.len(), (z*y) as usize); + // + // for (delegators, candidate) in delegators.iter().chunks(z as usize).into_iter() + // .zip(candidates.clone()) + // { + // + // for (count, delegator) in delegators.into_iter().enumerate() { + // Pallet::::delegate(RawOrigin::Signed( + // delegator.clone()).into(), + // candidate.clone().into(), + // (100*DOLLAR).to_balance::(), + // None, + // count as u32, + // 0u32, + // ).unwrap(); + // } + // + // assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().delegators.0.len() , z as usize); + // assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().top_delegations.len() , z as usize); + // assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().bottom_delegations.len() , 0usize); + // + // } + // + // + // // + // // Remove the initial two collators so that they do not get selected + // // We do this as the two collators do not have max delegators and would not be worst case + // + // for initial_candidate in initial_candidates{ + // assert_ok!(Pallet::::go_offline(RawOrigin::Signed( + // initial_candidate.clone()).into())); + // } + // + // + // + // // We would like to move on to the end of round 4 + // let session_to_reach = 4u32; + // + // // Moves to the end of the round + // // Infinite loop that breaks when should_end_session is true + // loop { + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // >::set_block_number(>::block_number() + 1u32.into()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // if Pallet::::round().current == session_to_reach { + // for i in 0..2{ + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // >::set_block_number(>::block_number() + 1u32.into()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // } + // break; + // } + // } + // + // let selected_author = Pallet::::selected_candidates(); + // + // + // // We would like to move on to the end of round 1 + // let session_to_reach = 5u32; + // + // // Moves to the end of the round 0 + // // Infinite loop that breaks when should_end_session is true + // loop { + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // >::set_block_number(>::block_number() + 1u32.into()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // if Pallet::::round().current == session_to_reach { + // for i in 0..2{ + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // >::set_block_number(>::block_number() + 1u32.into()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // } + // break; + // } + // } + // + // + // assert_eq!(pallet_session::Pallet::::current_index() as u32, 5u32); + // assert_eq!(Pallet::::round().current as u32, 5u32); + // assert_eq!(selected_author.len(), (w as usize).min(Pallet::::candidate_pool().0.len() as usize)); + // + // + // let candidate_pool_state = Pallet::::candidate_pool().0; + // + // for (i, candidate_bond) in candidate_pool_state.into_iter().enumerate() { + // if candidate_bond.liquidity_token == created_liquidity_token { + // assert_eq!(candidate_bond.amount.into(), (1+(z as u128)*100)*DOLLAR); + // } + // } + // + // for author in selected_author.clone() { + // Pallet::::note_author(author.clone()); + // } + // + // // We would like to move on to the end of round 1 + // let end_of_session_to_reach = 6u32; + // // let pool_rewards = pallet_issuance::PromotedPoolsRewardsV2::::get(); + // // assert_eq!(pool_rewards.len(), x as usize); + // + // // Moves to the end of the round 0 + // // Infinite loop that breaks when should_end_session is true + // loop { + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + // >::set_block_number(>::block_number() + 1u32.into()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // if as pallet_session::ShouldEndSession<_>>::should_end_session(>::block_number()) + // && (Pallet::::round().current == end_of_session_to_reach) { + // break; + // } else { + // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + // } + // } + // + // + // assert_eq!(pallet_session::Pallet::::current_index() as u32, 6u32); + // assert_eq!(Pallet::::round().current as u32, 6u32); + // + // assert!( as pallet_session::ShouldEndSession<_>>::should_end_session(>::block_number())); + // + // for author in selected_author.clone() { + // for candidate in AggregatorMetadata::::get(&author).unwrap().token_collator_map.iter().map(|x| x.1){ + // assert!(T::Currency::total_balance(MGA_TOKEN_ID.into(), &candidate).is_zero()); + // } + // } + // + // }: { as frame_support::traits::Hooks<_>>::on_initialize(>::block_number());} + // verify { + // assert_eq!(pallet_session::Pallet::::current_index() as u32, 7u32); + // assert_eq!(Pallet::::round().current as u32, 7u32); + // assert_eq!(w as usize, candidates.iter().filter_map(|c| RoundCollatorRewardInfo::::get(c.clone(), 5u32)).count()); + // } } From 4f889ab0fcb26255c451b6978f553c44d3cd2b30 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 15 Nov 2023 08:15:24 +0100 Subject: [PATCH 105/125] let compiler figure out the types --- pallets/proof-of-stake/src/lib.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 819ea758f7..c29f9a407b 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -119,7 +119,7 @@ use frame_support::{ dispatch::{DispatchErrorWithPostInfo, DispatchResult, PostDispatchInfo}, ensure, storage::bounded_btree_map::BoundedBTreeMap, - traits::Nothing, + traits::{Currency, Nothing}, }; use frame_system::ensure_signed; use mangata_support::traits::Valuate; @@ -205,7 +205,6 @@ const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!") pub type SessionId = u64; #[frame_support::pallet] pub mod pallet { - use frame_support::traits::Currency; use super::*; @@ -612,7 +611,7 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - , CurrencyIdOf>>::claim_rewards_all( + >::claim_rewards_all( sender, liquidity_token_id, )?; @@ -631,12 +630,12 @@ pub mod pallet { ensure_root(origin)?; if liquidity_mining_issuance_weight > 0 { - , CurrencyIdOf>>::enable( + >::enable( liquidity_token_id, liquidity_mining_issuance_weight, ); } else { - , CurrencyIdOf>>::disable(liquidity_token_id); + >::disable(liquidity_token_id); } Ok(()) } @@ -659,11 +658,12 @@ pub mod pallet { ) -> DispatchResult { let sender = ensure_signed(origin)?; - , - BalanceOf, - CurrencyIdOf, - >>::activate_liquidity(sender, liquidity_token_id, amount, use_balance_from) + >::activate_liquidity( + sender, + liquidity_token_id, + amount, + use_balance_from, + ) } /// Decreases number of tokens used for liquidity mining purposes From 3a7dfce1fbd1a34f83a0afe7f0bf69627e596ba0 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 15 Nov 2023 08:15:54 +0100 Subject: [PATCH 106/125] Simplify type bounds by using helper trait `CurrencyBalance` --- pallets/proof-of-stake/src/reward_info.rs | 46 +++++++++-------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 90047f30a9..3a6629055c 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -52,18 +52,8 @@ pub struct RewardsCalculator { impl RewardsCalculator, Balance> where - Balance: 'static - + AtLeast32BitUnsigned - + FullCodec - + Copy - + Default - + sp_std::fmt::Debug - + scale_info::TypeInfo - + MaxEncodedLen - + Into - + TryFrom, + Balance: 'static + CurrencyBalance, { - // type Balance: Balance; pub fn mining_rewards( user: T::AccountId, asset_id: crate::CurrencyIdOf, @@ -97,14 +87,7 @@ where impl RewardsCalculator, Balance> where - Balance: 'static - + AtLeast32BitUnsigned - + FullCodec - + Copy - + Default - + sp_std::fmt::Debug - + scale_info::TypeInfo - + MaxEncodedLen, + Balance: 'static + CurrencyBalance, { pub fn schedule_rewards( user: T::AccountId, @@ -148,7 +131,7 @@ where } pub trait CurveRewards { - type Balance: AtLeast32BitUnsigned + TryFrom + Into; + type Balance: CurrencyBalance; fn calculate_curve_position( ctx: &RewardsContext, user_info: &RewardInfo, @@ -164,7 +147,7 @@ pub struct AsymptoticCurveRewards(RewardsContext, RewardInfo); impl CurveRewards for AsymptoticCurveRewards where - Balance: AtLeast32BitUnsigned + TryFrom + Into, + Balance: 'static + CurrencyBalance, { type Balance = Balance; fn calculate_curve_position( @@ -230,7 +213,7 @@ where impl CurveRewards for ConstCurveRewards where - Balance: AtLeast32BitUnsigned + TryFrom + Into, + Balance: 'static + CurrencyBalance, { type Balance = Balance; fn calculate_curve_position( @@ -268,7 +251,9 @@ impl Into> for RewardsCalcError { } } -pub trait MyBalance: +/// Balance of MultiToken currency is quite complex and cannot be reexported so lets recreate it +/// here to simplify trait bounds +pub trait CurrencyBalance: TryFrom + Into + AtLeast32BitUnsigned @@ -281,10 +266,8 @@ pub trait MyBalance: { } -impl RewardsCalculator -where - T: CurveRewards, - Balance: TryFrom +impl CurrencyBalance for T where + T: TryFrom + Into + AtLeast32BitUnsigned + FullCodec @@ -292,7 +275,14 @@ where + Default + sp_std::fmt::Debug + scale_info::TypeInfo - + MaxEncodedLen, + + MaxEncodedLen +{ +} + +impl RewardsCalculator +where + T: CurveRewards, + Balance: CurrencyBalance, { pub fn activate_more( self, From 5de2482e4a0d2cc46c124ad27791afa368ca6638 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 15 Nov 2023 08:18:23 +0100 Subject: [PATCH 107/125] Remove 'pallet-balances' unused dependency --- Cargo.lock | 1 - runtime/mangata-kusama/Cargo.toml | 4 ---- 2 files changed, 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 622cfdecf4..a3f909ed21 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5808,7 +5808,6 @@ dependencies = [ "orml-xtokens", "pallet-aura", "pallet-authorship", - "pallet-balances", "pallet-bootstrap", "pallet-collective-mangata", "pallet-crowdloan-rewards", diff --git a/runtime/mangata-kusama/Cargo.toml b/runtime/mangata-kusama/Cargo.toml index cc24d2d0e0..7c59a5ffa5 100644 --- a/runtime/mangata-kusama/Cargo.toml +++ b/runtime/mangata-kusama/Cargo.toml @@ -72,7 +72,6 @@ ver-api = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "d ## Substrate Pallet Dependencies pallet-aura = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } pallet-authorship = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } -pallet-balances = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } pallet-collective-mangata = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } pallet-identity = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } pallet-proxy = { git = "https://github.com/mangata-finance/polkadot-sdk", branch = "develop", default-features = false } @@ -150,7 +149,6 @@ std = [ "orml-xtokens/std", "pallet-aura/std", "pallet-authorship/std", - "pallet-balances/std", "pallet-bootstrap/std", "pallet-collective-mangata/std", "pallet-crowdloan-rewards/std", @@ -219,7 +217,6 @@ try-runtime = [ "orml-xtokens/try-runtime", "pallet-aura/try-runtime", "pallet-authorship/try-runtime", - "pallet-balances/try-runtime", "pallet-bootstrap/try-runtime", "pallet-collective-mangata/try-runtime", "pallet-crowdloan-rewards/try-runtime", @@ -262,7 +259,6 @@ runtime-benchmarks = [ "orml-asset-registry/runtime-benchmarks", "orml-tokens/runtime-benchmarks", "orml-xtokens/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", "pallet-bootstrap/runtime-benchmarks", "pallet-collective-mangata/runtime-benchmarks", "pallet-crowdloan-rewards/runtime-benchmarks", From f69abf9ee98bb48034b542a13b43944685dbb72d Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 09:01:08 +0100 Subject: [PATCH 108/125] Docs for RPC api --- pallets/proof-of-stake/rpc/src/lib.rs | 29 ++++++++++++------- pallets/proof-of-stake/runtime-api/src/lib.rs | 2 +- pallets/proof-of-stake/src/lib.rs | 21 +++++++------- pallets/proof-of-stake/src/mock.rs | 2 +- pallets/proof-of-stake/src/tests.rs | 6 ++-- 5 files changed, 35 insertions(+), 25 deletions(-) diff --git a/pallets/proof-of-stake/rpc/src/lib.rs b/pallets/proof-of-stake/rpc/src/lib.rs index 0a478229a9..1f6969f4cb 100644 --- a/pallets/proof-of-stake/rpc/src/lib.rs +++ b/pallets/proof-of-stake/rpc/src/lib.rs @@ -7,20 +7,19 @@ use jsonrpsee::{ types::error::{CallError, ErrorObject}, }; pub use proof_of_stake_runtime_api::ProofOfStakeApi as ProofOfStakeRuntimeApi; -// use proof_of_stake_runtime_api::{RpcAmountsResult, RpcAssetMetadata, XYKRpcResult}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; -use sp_core::U256; use sp_rpc::number::NumberOrHex; -use sp_runtime::{ - generic::BlockId, - traits::{Block as BlockT, MaybeDisplay, MaybeFromStr}, -}; -use sp_std::convert::{TryFrom, TryInto}; +use sp_runtime::traits::{Block as BlockT, MaybeDisplay, MaybeFromStr}; use std::sync::Arc; #[rpc(client, server)] pub trait ProofOfStakeApi { + /// Calculates amount of available native rewards + /// + /// * `account` - user account address + /// * `liquidity_token` - liquidity token id + /// * `at` - optional block hash #[method(name = "pos_calculate_native_rewards_amount")] fn calculate_native_rewards_amount( &self, @@ -29,6 +28,12 @@ pub trait ProofOfStakeApi { at: Option, ) -> RpcResult; + /// Calculates amount of available 3rdparty rewards + /// + /// * `account` - user account address + /// * `liquidity_token` - liquidity token id + /// * `reward_token` - particular token that given pool is rewarded with + /// * `at` - optional block hash #[method(name = "pos_calculate_3rdparty_rewards_amount")] fn calculate_3rdparty_rewards_amount( &self, @@ -38,6 +43,10 @@ pub trait ProofOfStakeApi { at: Option, ) -> RpcResult; + /// # Calculates amount of all available 3rdparty rewards for given account + /// + /// * `account` - user account address + /// * `at` - optional block hash #[method(name = "pos_calculate_3rdparty_rewards_all")] fn calculate_3rdparty_rewards_all( &self, @@ -78,7 +87,7 @@ where at: Option<::Hash>, ) -> RpcResult { let api = self.client.runtime_api(); - let at = self.client.info().best_hash; + let at = at.unwrap_or(self.client.info().best_hash); api.calculate_native_rewards_amount(at, account, liquidity_token) .map(Into::::into) @@ -99,7 +108,7 @@ where at: Option<::Hash>, ) -> RpcResult { let api = self.client.runtime_api(); - let at = self.client.info().best_hash; + let at = at.unwrap_or(self.client.info().best_hash); api.calculate_3rdparty_rewards_amount(at, account, liquidity_token, reward_token) .map(Into::::into) @@ -118,7 +127,7 @@ where at: Option<::Hash>, ) -> RpcResult> { let api = self.client.runtime_api(); - let at = self.client.info().best_hash; + let at = at.unwrap_or(self.client.info().best_hash); api.calculate_3rdparty_rewards_all(at, account) .map(|vec| { diff --git a/pallets/proof-of-stake/runtime-api/src/lib.rs b/pallets/proof-of-stake/runtime-api/src/lib.rs index 217cd6e479..cf0401c5bd 100644 --- a/pallets/proof-of-stake/runtime-api/src/lib.rs +++ b/pallets/proof-of-stake/runtime-api/src/lib.rs @@ -1,6 +1,6 @@ // Copyright (C) 2021 Mangata team #![cfg_attr(not(feature = "std"), no_std)] -use codec::{Codec, Decode, Encode}; +use codec::Codec; use sp_runtime::traits::{MaybeDisplay, MaybeFromStr}; use sp_std::vec::Vec; diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index c29f9a407b..4e4b4f6214 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -50,7 +50,7 @@ //! #### Storage entries //! //! - [`RewardsInfoForScheduleRewards`] - Stores information about rewards for scheduled rewards. -//! - [`ScheduleRewardsPerSingleLiquidity`] - Stores the amount of rewards per single liquidity token. +//! - [`ScheduleRewardsTotal`] - Stores the amount of rewards per single liquidity token. //! - [`RewardsSchedules`] - Stores information about scheduled rewards. //! - [`ScheduleId`] - Stores the unique id of the schedule. //! - [`RewardTokensPerPool`] - Stores information about which reward tokens are used for a particular @@ -85,7 +85,7 @@ //! //! - The user can reuse liquidity used for scheduled rewards (X) to sign up for rewards from other tokens (provided by Bob). In that case, [`Pallet::activate_liquidity_for_3rdparty_rewards`] should be used with [`ActivateKind::ActivatedLiquidity(X)`]. //! -//! - The user can't directly provide liquidity activated for scheduled rewards to activate it for liquidity mining rewards. Instead: +//! - The user can't directly provide liquidity activated for scheduled rewards to activate it for native rewards. Instead: //! * Liquidity used for schedule rewards can be deactivated //! [`Pallet::deactivate_liquidity_for_3rdparty_rewards`]. //! * Liquidity can be activated for liquidity mining rewards [`Pallet::activate_liquidity`]. @@ -119,12 +119,14 @@ use frame_support::{ dispatch::{DispatchErrorWithPostInfo, DispatchResult, PostDispatchInfo}, ensure, storage::bounded_btree_map::BoundedBTreeMap, - traits::{Currency, Nothing}, + traits::Currency, }; use frame_system::ensure_signed; use mangata_support::traits::Valuate; +use mangata_types::multipurpose_liquidity::ActivateKind; +use orml_tokens::{MultiTokenCurrencyExtended, MultiTokenReservableCurrency}; use sp_core::U256; -use sp_runtime::traits::{AccountIdConversion, AtLeast32BitUnsigned}; +use sp_runtime::traits::AccountIdConversion; use frame_support::{ pallet_prelude::*, @@ -134,10 +136,8 @@ use frame_support::{ use frame_system::pallet_prelude::*; use mangata_support::traits::{ - ActivationReservesProviderTrait, LiquidityMiningApi, ProofOfStakeRewardsApi, XykFunctionsTrait, + ActivationReservesProviderTrait, LiquidityMiningApi, ProofOfStakeRewardsApi, }; -use mangata_types::multipurpose_liquidity::ActivateKind; -use orml_tokens::{MultiTokenCurrencyExtended, MultiTokenReservableCurrency}; use sp_std::collections::btree_map::BTreeMap; use sp_runtime::{ @@ -147,7 +147,7 @@ use sp_runtime::{ use sp_std::{convert::TryInto, prelude::*}; mod reward_info; -use reward_info::{ConstCurveRewards, RewardInfo, RewardsCalculator}; +use reward_info::{RewardInfo, RewardsCalculator}; mod schedule_rewards_calculator; use schedule_rewards_calculator::{ @@ -197,8 +197,9 @@ type CurrencyIdOf = <::Currency as MultiTokenCurrency< #[derive(Eq, PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] pub enum ThirdPartyActivationKind { ActivateKind(Option), + ActivatedLiquidity(CurrencyId), - LiquidityMining, + NativeRewardsLiquidity, } const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!"); @@ -976,7 +977,7 @@ impl Pallet { Error::::NotEnoughAssets ); }, - ThirdPartyActivationKind::LiquidityMining => { + ThirdPartyActivationKind::NativeRewardsLiquidity => { let already_activated_amount = RewardsInfoForScheduleRewards::::get( user.clone(), (liquidity_asset_id, reward_token), diff --git a/pallets/proof-of-stake/src/mock.rs b/pallets/proof-of-stake/src/mock.rs index d806282e53..30b3b86909 100644 --- a/pallets/proof-of-stake/src/mock.rs +++ b/pallets/proof-of-stake/src/mock.rs @@ -9,7 +9,7 @@ use core::convert::TryFrom; use frame_support::{ construct_runtime, parameter_types, traits::{ - tokens::currency::MultiTokenCurrency, ConstU128, ConstU32, Contains, Everything, + tokens::currency::MultiTokenCurrency, ConstU128, ConstU32, Contains, Everything, Nothing, WithdrawReasons, }, PalletId, diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 451757f2de..9d84e7a215 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -2596,7 +2596,7 @@ fn liquidity_minting_liquidity_can_be_resused() { LIQUIDITY_TOKEN, 100, FIRST_REWARD_TOKEN, - Some(ThirdPartyActivationKind::LiquidityMining), + Some(ThirdPartyActivationKind::NativeRewardsLiquidity), ) .unwrap(); @@ -2651,7 +2651,7 @@ fn fail_to_transfer_tokens_that_has_been_partially_deactivated() { LIQUIDITY_TOKEN, 100, FIRST_REWARD_TOKEN, - Some(ThirdPartyActivationKind::LiquidityMining), + Some(ThirdPartyActivationKind::NativeRewardsLiquidity), ) .unwrap(); @@ -2751,7 +2751,7 @@ fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { LIQUIDITY_TOKEN, 100, FIRST_REWARD_TOKEN, - Some(ThirdPartyActivationKind::LiquidityMining), + Some(ThirdPartyActivationKind::NativeRewardsLiquidity), ) .unwrap(); From 991fdca8b6658e5ee2f7cfd196b0e32b6b7f2d7f Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 09:56:26 +0100 Subject: [PATCH 109/125] update signature of ProofOfStake::calculate_3rdparty_rewards_all --- pallets/proof-of-stake/src/lib.rs | 7 ++++--- pallets/proof-of-stake/src/tests.rs | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 4e4b4f6214..7c6952a415 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -1043,14 +1043,15 @@ impl Pallet { pub fn calculate_3rdparty_rewards_all( user: AccountIdOf, - ) -> Result, CurrencyIdOf, BalanceOf)>, DispatchError> { - let mut result = RewardsInfoForScheduleRewards::::iter_prefix(user.clone()) + ) -> Vec<(CurrencyIdOf, CurrencyIdOf, BalanceOf)> { + let result = RewardsInfoForScheduleRewards::::iter_prefix(user.clone()) .map(|((liq_token, reward_token), _)| { Self::calculate_3rdparty_rewards_amount(user.clone(), liq_token, reward_token) .map(|amount| (liq_token, reward_token, amount)) }) .collect::, _>>(); - result.as_mut().map(|v| v.sort()); + let mut result = result.unwrap_or_default(); + result.sort(); result } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 9d84e7a215..53358e8614 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -2364,7 +2364,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() roll_to_session::(2); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + ProofOfStake::calculate_3rdparty_rewards_all(BOB), vec![(FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 1 * 1000u128),] ); ProofOfStake::reward_pool( @@ -2386,7 +2386,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() roll_to_session::(3); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + ProofOfStake::calculate_3rdparty_rewards_all(BOB), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 2 * 1000u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0 * 2000u128), @@ -2396,7 +2396,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() roll_to_session::(4); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + ProofOfStake::calculate_3rdparty_rewards_all(BOB), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 3 * 1000u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 1 * 2000u128), @@ -2421,7 +2421,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() roll_to_session::(5); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + ProofOfStake::calculate_3rdparty_rewards_all(BOB), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 4 * 1000u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 2 * 2000u128), @@ -2447,7 +2447,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() roll_to_session::(7); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + ProofOfStake::calculate_3rdparty_rewards_all(BOB), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 6 * 1000u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 4 * 2000u128), @@ -2464,7 +2464,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() .unwrap(); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + ProofOfStake::calculate_3rdparty_rewards_all(BOB), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 4 * 2000u128), @@ -2480,7 +2480,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + ProofOfStake::calculate_3rdparty_rewards_all(BOB), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), @@ -2496,7 +2496,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + ProofOfStake::calculate_3rdparty_rewards_all(BOB), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), @@ -2513,7 +2513,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() .unwrap(); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + ProofOfStake::calculate_3rdparty_rewards_all(BOB), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), @@ -2552,7 +2552,7 @@ fn calculate_and_claim_rewards_from_multiple_schedules_using_single_liquidity() ) .unwrap(); assert_eq!( - ProofOfStake::calculate_3rdparty_rewards_all(BOB).unwrap(), + ProofOfStake::calculate_3rdparty_rewards_all(BOB), vec![ (FIRST_LIQUIDITY_TOKEN, FIRST_REWARD_TOKEN, 0u128), (FIRST_LIQUIDITY_TOKEN, SECOND_REWARD_TOKEN, 0u128), From 987078c7852b545250917245de43e3a38710e3e8 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 10:06:56 +0100 Subject: [PATCH 110/125] dedicated ensures for 3rdparty & native rewards --- pallets/proof-of-stake/src/lib.rs | 49 ++++++++++-------- pallets/proof-of-stake/src/tests.rs | 79 +++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 22 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 7c6952a415..9d1b1399d9 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -863,7 +863,7 @@ impl Pallet { amount: BalanceOf, use_balance_from: Option, ) -> DispatchResult { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::ensure_native_rewards_enabled(liquidity_asset_id)?; ensure!( ::ActivationReservesProvider::can_activate( @@ -892,7 +892,7 @@ impl Pallet { user: AccountIdOf, liquidity_asset_id: CurrencyIdOf, ) -> Result, DispatchError> { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::ensure_native_rewards_enabled(liquidity_asset_id)?; let rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; @@ -940,7 +940,7 @@ impl Pallet { use_balance_from: ThirdPartyActivationKind>, reward_token: CurrencyIdOf, ) -> DispatchResult { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::ensure_3rdparty_rewards_enabled(liquidity_asset_id)?; match use_balance_from { // 1R 1W @@ -1060,7 +1060,7 @@ impl Pallet { liquidity_asset_id: CurrencyIdOf, rewards_asset_id: CurrencyIdOf, ) -> Result, DispatchError> { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::ensure_3rdparty_rewards_enabled(liquidity_asset_id)?; if let Ok(info) = RewardsInfoForScheduleRewards::::try_get( user.clone(), @@ -1122,16 +1122,23 @@ impl Pallet { .ok_or(DispatchError::from(Error::::CalculateRewardsMathError)) } - fn ensure_is_promoted_pool(liquidity_asset_id: CurrencyIdOf) -> Result<(), DispatchError> { - if Self::get_pool_rewards(liquidity_asset_id).is_ok() || + fn ensure_native_rewards_enabled( + liquidity_asset_id: CurrencyIdOf, + ) -> Result<(), DispatchError> { + ensure!(Self::get_pool_rewards(liquidity_asset_id).is_ok(), Error::::NotAPromotedPool); + Ok(()) + } + + fn ensure_3rdparty_rewards_enabled( + liquidity_asset_id: CurrencyIdOf, + ) -> Result<(), DispatchError> { + ensure!( RewardTokensPerPool::::iter_prefix_values(liquidity_asset_id) .next() - .is_some() - { - Ok(()) - } else { - Err(DispatchError::from(Error::::NotAPromotedPool)) - } + .is_some(), + Error::::NotAPromotedPool + ); + Ok(()) } fn set_liquidity_minting_checkpoint( @@ -1139,7 +1146,7 @@ impl Pallet { liquidity_asset_id: CurrencyIdOf, liquidity_assets_added: BalanceOf, ) -> DispatchResult { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::ensure_native_rewards_enabled(liquidity_asset_id)?; { let calc = RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; @@ -1169,7 +1176,7 @@ impl Pallet { liquidity_assets_added: BalanceOf, liquidity_assets_reward: CurrencyIdOf, ) -> DispatchResult { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::ensure_3rdparty_rewards_enabled(liquidity_asset_id)?; ScheduleRewardsCalculator::::update_cumulative_rewards( liquidity_asset_id, @@ -1221,11 +1228,9 @@ impl Pallet { liquidity_asset_id: CurrencyIdOf, liquidity_assets_burned: BalanceOf, ) -> DispatchResult { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; - let current_time: u32 = Self::get_current_rewards_time()?; - let pool_ratio_current = Self::get_pool_rewards(liquidity_asset_id)?; + Self::ensure_native_rewards_enabled(liquidity_asset_id)?; - let mut rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) + let rewards_info = RewardsInfo::::try_get(user.clone(), liquidity_asset_id) .or(Err(DispatchError::from(Error::::MissingRewardsInfoError)))?; ensure!( rewards_info.activated_amount >= liquidity_assets_burned, @@ -1264,7 +1269,7 @@ impl Pallet { liquidity_assets_burned: BalanceOf, reward_token: CurrencyIdOf, ) -> DispatchResult { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::ensure_3rdparty_rewards_enabled(liquidity_asset_id)?; ScheduleRewardsCalculator::::update_cumulative_rewards(liquidity_asset_id, reward_token); let calc = RewardsCalculator::schedule_rewards::( @@ -1329,7 +1334,7 @@ impl Pallet { amount, ); - let amount = + let _ = ActivatedNativeRewardsLiq::::mutate(user.clone(), liquidity_asset_id, |val| { let prev = *val; *val = BalanceOf::::zero(); @@ -1345,7 +1350,7 @@ impl Pallet { liquidity_asset_id: CurrencyIdOf, reward_token: CurrencyIdOf, ) -> Result, DispatchError> { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::ensure_3rdparty_rewards_enabled(liquidity_asset_id)?; let calc = RewardsCalculator::schedule_rewards::( user.clone(), @@ -1573,7 +1578,7 @@ impl ProofOfStakeRewardsApi, CurrencyIdOf< user: T::AccountId, liquidity_asset_id: CurrencyIdOf, ) -> Result, DispatchError> { - Self::ensure_is_promoted_pool(liquidity_asset_id)?; + Self::ensure_native_rewards_enabled(liquidity_asset_id)?; let calc = RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; let (rewards_info, total_available_rewards) = diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index 53358e8614..df9cb7d1cb 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -4112,3 +4112,82 @@ fn accept_3rdparty_rewards_with_liq_token_and_min_volume() { ),); }); } + +#[test] +#[serial] +fn user_can_withdraw_liquidity_from_withdrown_rewards_when_its_not_used_for_liquidity_mining() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .issue(CHARLIE, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(1); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + roll_to_session::(2); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(500) + ); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(500) + ); + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + ) + .unwrap(); + + roll_to_session::(3); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount(BOB, LIQUIDITY_TOKEN, REWARD_TOKEN), + Ok(1500) + ); + + assert_eq!( + ProofOfStake::calculate_3rdparty_rewards_amount( + CHARLIE, + LIQUIDITY_TOKEN, + REWARD_TOKEN + ), + Ok(500) + ); + }); +} From 81c7c3e08790d8efc9c5668b0036999da1dcd792 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 10:08:14 +0100 Subject: [PATCH 111/125] enable active_session_change benchmark --- pallets/parachain-staking/src/benchmarks.rs | 504 ++++++++++---------- 1 file changed, 252 insertions(+), 252 deletions(-) diff --git a/pallets/parachain-staking/src/benchmarks.rs b/pallets/parachain-staking/src/benchmarks.rs index 8b1bea3801..aeb7a33a23 100644 --- a/pallets/parachain-staking/src/benchmarks.rs +++ b/pallets/parachain-staking/src/benchmarks.rs @@ -1685,257 +1685,257 @@ benchmarks! { assert_eq!(pallet_session::Pallet::::current_index() as u32, 0u32); } - // active_session_change { - // - // // liquidity tokens - // let x in 3..100; - // // candidate_count - // let y in (<::MinSelectedCandidates as Get>::get() + 1u32)..(<::MaxCollatorCandidates as Get>::get() - 2u32); // to account for the two candidates we start with - // // MaxDelegatorsPerCandidate - // let z in 3..<::MaxDelegatorsPerCandidate as Get>::get(); - // - // // // Since now an aggregator can have multiple collators each of whose rewards will be written to the storage individually - // // // Total selected - // let w = <::MinSelectedCandidates as Get>::get() + 1u32; - // - // // // liquidity tokens - // // let x = 100; - // // // candidate_count - // // let y = 190; - // // // MaxDelegatorsPerCandidate - // // let z = 200; - // // // Total selected - // // let w = 190; - // - // assert_ok!(>::finalize_tge(RawOrigin::Root.into())); - // assert_ok!(>::init_issuance_config(RawOrigin::Root.into())); - // assert_ok!(>::calculate_and_store_round_issuance(0u32)); - // - // assert_ok!(Pallet::::set_total_selected(RawOrigin::Root.into(), w)); - // - // // We will prepare `x-1` liquidity tokens in loop and then another after - // - // let start_liquidity_token = Pallet::::staking_liquidity_tokens(); - // let start_liquidity_token_count: u32 = start_liquidity_token.len().try_into().unwrap(); - // for (token,_) in start_liquidity_token { - // // as PoolPromoteApi>::update_pool_promotion(token, Some(1)); - // T::RewardsApi::enable(token, 1); - // } - // - // assert!(x > start_liquidity_token_count); - // // create X - 1 Tokens now and then remaining one - // for i in start_liquidity_token_count..(x-1){ - // let created_liquidity_token = create_staking_liquidity_for_funding::(Some(T::MinCandidateStk::get())).unwrap(); - // Pallet::::add_staking_liquidity_token(RawOrigin::Root.into(), PairedOrLiquidityToken::Liquidity(created_liquidity_token), i).unwrap(); - // // as PoolPromoteApi>::update_pool_promotion(created_liquidity_token, Some(1)); - // T::RewardsApi::enable(created_liquidity_token, 1); - // } - // - // // Now to prepare the liquidity token we will use for collator and delegators - // let amount = ((z*(y+1)) as u128 * 100 * DOLLAR).to_balance::() + T::MinCandidateStk::get() * DOLLAR.to_balance::(); - // let created_liquidity_token = create_staking_liquidity_for_funding::(Some(amount)).unwrap(); - // assert_ok!(Pallet::::add_staking_liquidity_token(RawOrigin::Root.into(), PairedOrLiquidityToken::Liquidity(created_liquidity_token), x)); - // // as PoolPromoteApi>::update_pool_promotion(created_liquidity_token, Some(1)); - // T::RewardsApi::enable(created_liquidity_token, 1); - // - // - // // Now we will create y funded collators - // let initial_candidates: Vec = Pallet::::candidate_pool().0.into_iter().map(|x| x.owner).collect::<_>(); - // let base_candidate_count: u32 = Pallet::::candidate_pool().0.len().try_into().unwrap(); - // - // assert_eq!(base_candidate_count, 2); - // assert_eq!(x as usize , StakingLiquidityTokens::::get().len()); - // - // // let pool_rewards = pallet_issuance::PromotedPoolsRewardsV2::::get(); - // // assert_eq!(pool_rewards.len(), x as usize); - // - // - // let mut candidates = (0u32..y) - // .map(|i|{ - // create_funded_collator::( - // "collator", - // USER_SEED - i, - // created_liquidity_token, - // Some(T::MinCandidateStk::get()), - // i + base_candidate_count, - // x - // ) - // }).collect::, &'static str>>()?; - // - // // create one aggregator per candidate - // for (id, c) in candidates.iter().enumerate() { - // let aggregator: T::AccountId = account("aggregator", id as u32, 0); - // assert_ok!(Pallet::::aggregator_update_metadata(RawOrigin::Signed( - // aggregator.clone()).into(), - // vec![c.clone()], - // MetadataUpdateAction::ExtendApprovedCollators, - // )); - // - // assert_ok!(Pallet::::update_candidate_aggregator(RawOrigin::Signed( - // c.clone()).into(), - // Some(aggregator.clone()), - // )); - // } - // - // assert_eq!(candidates.len(), y as usize); - // // - // // // Now we will create `z*y` delegators each with `100*DOLLAR` created_liquidity_token tokens - // // - // let delegators_count = z*y; - // let delegators: Vec<_> = (0u32..delegators_count) - // .map(|i| - // create_funded_user::("delegator", USER_SEED-i, created_liquidity_token, Some((100*DOLLAR).to_balance::())) - // ).map(|(account, _token_id, _amount)| account) - // .collect(); - // assert_eq!(delegators.len(), (z*y) as usize); - // - // for (delegators, candidate) in delegators.iter().chunks(z as usize).into_iter() - // .zip(candidates.clone()) - // { - // - // for (count, delegator) in delegators.into_iter().enumerate() { - // Pallet::::delegate(RawOrigin::Signed( - // delegator.clone()).into(), - // candidate.clone().into(), - // (100*DOLLAR).to_balance::(), - // None, - // count as u32, - // 0u32, - // ).unwrap(); - // } - // - // assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().delegators.0.len() , z as usize); - // assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().top_delegations.len() , z as usize); - // assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().bottom_delegations.len() , 0usize); - // - // } - // - // - // // - // // Remove the initial two collators so that they do not get selected - // // We do this as the two collators do not have max delegators and would not be worst case - // - // for initial_candidate in initial_candidates{ - // assert_ok!(Pallet::::go_offline(RawOrigin::Signed( - // initial_candidate.clone()).into())); - // } - // - // - // - // // We would like to move on to the end of round 4 - // let session_to_reach = 4u32; - // - // // Moves to the end of the round - // // Infinite loop that breaks when should_end_session is true - // loop { - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // >::set_block_number(>::block_number() + 1u32.into()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // if Pallet::::round().current == session_to_reach { - // for i in 0..2{ - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // >::set_block_number(>::block_number() + 1u32.into()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // } - // break; - // } - // } - // - // let selected_author = Pallet::::selected_candidates(); - // - // - // // We would like to move on to the end of round 1 - // let session_to_reach = 5u32; - // - // // Moves to the end of the round 0 - // // Infinite loop that breaks when should_end_session is true - // loop { - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // >::set_block_number(>::block_number() + 1u32.into()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // if Pallet::::round().current == session_to_reach { - // for i in 0..2{ - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // >::set_block_number(>::block_number() + 1u32.into()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // } - // break; - // } - // } - // - // - // assert_eq!(pallet_session::Pallet::::current_index() as u32, 5u32); - // assert_eq!(Pallet::::round().current as u32, 5u32); - // assert_eq!(selected_author.len(), (w as usize).min(Pallet::::candidate_pool().0.len() as usize)); - // - // - // let candidate_pool_state = Pallet::::candidate_pool().0; - // - // for (i, candidate_bond) in candidate_pool_state.into_iter().enumerate() { - // if candidate_bond.liquidity_token == created_liquidity_token { - // assert_eq!(candidate_bond.amount.into(), (1+(z as u128)*100)*DOLLAR); - // } - // } - // - // for author in selected_author.clone() { - // Pallet::::note_author(author.clone()); - // } - // - // // We would like to move on to the end of round 1 - // let end_of_session_to_reach = 6u32; - // // let pool_rewards = pallet_issuance::PromotedPoolsRewardsV2::::get(); - // // assert_eq!(pool_rewards.len(), x as usize); - // - // // Moves to the end of the round 0 - // // Infinite loop that breaks when should_end_session is true - // loop { - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); - // >::set_block_number(>::block_number() + 1u32.into()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // if as pallet_session::ShouldEndSession<_>>::should_end_session(>::block_number()) - // && (Pallet::::round().current == end_of_session_to_reach) { - // break; - // } else { - // as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); - // } - // } - // - // - // assert_eq!(pallet_session::Pallet::::current_index() as u32, 6u32); - // assert_eq!(Pallet::::round().current as u32, 6u32); - // - // assert!( as pallet_session::ShouldEndSession<_>>::should_end_session(>::block_number())); - // - // for author in selected_author.clone() { - // for candidate in AggregatorMetadata::::get(&author).unwrap().token_collator_map.iter().map(|x| x.1){ - // assert!(T::Currency::total_balance(MGA_TOKEN_ID.into(), &candidate).is_zero()); - // } - // } - // - // }: { as frame_support::traits::Hooks<_>>::on_initialize(>::block_number());} - // verify { - // assert_eq!(pallet_session::Pallet::::current_index() as u32, 7u32); - // assert_eq!(Pallet::::round().current as u32, 7u32); - // assert_eq!(w as usize, candidates.iter().filter_map(|c| RoundCollatorRewardInfo::::get(c.clone(), 5u32)).count()); - // } + active_session_change { + + // liquidity tokens + let x in 3..100; + // candidate_count + let y in (<::MinSelectedCandidates as Get>::get() + 1u32)..(<::MaxCollatorCandidates as Get>::get() - 2u32); // to account for the two candidates we start with + // MaxDelegatorsPerCandidate + let z in 3..<::MaxDelegatorsPerCandidate as Get>::get(); + + // // Since now an aggregator can have multiple collators each of whose rewards will be written to the storage individually + // // Total selected + let w = <::MinSelectedCandidates as Get>::get() + 1u32; + + // // liquidity tokens + // let x = 100; + // // candidate_count + // let y = 190; + // // MaxDelegatorsPerCandidate + // let z = 200; + // // Total selected + // let w = 190; + + assert_ok!(>::finalize_tge(RawOrigin::Root.into())); + assert_ok!(>::init_issuance_config(RawOrigin::Root.into())); + assert_ok!(>::calculate_and_store_round_issuance(0u32)); + + assert_ok!(Pallet::::set_total_selected(RawOrigin::Root.into(), w)); + + // We will prepare `x-1` liquidity tokens in loop and then another after + + let start_liquidity_token = Pallet::::staking_liquidity_tokens(); + let start_liquidity_token_count: u32 = start_liquidity_token.len().try_into().unwrap(); + for (token,_) in start_liquidity_token { + // as PoolPromoteApi>::update_pool_promotion(token, Some(1)); + T::RewardsApi::enable(token, 1); + } + + assert!(x > start_liquidity_token_count); + // create X - 1 Tokens now and then remaining one + for i in start_liquidity_token_count..(x-1){ + let created_liquidity_token = create_staking_liquidity_for_funding::(Some(T::MinCandidateStk::get())).unwrap(); + Pallet::::add_staking_liquidity_token(RawOrigin::Root.into(), PairedOrLiquidityToken::Liquidity(created_liquidity_token), i).unwrap(); + // as PoolPromoteApi>::update_pool_promotion(created_liquidity_token, Some(1)); + T::RewardsApi::enable(created_liquidity_token, 1); + } + + // Now to prepare the liquidity token we will use for collator and delegators + let amount = ((z*(y+1)) as u128 * 100 * DOLLAR).to_balance::() + T::MinCandidateStk::get() * DOLLAR.to_balance::(); + let created_liquidity_token = create_staking_liquidity_for_funding::(Some(amount)).unwrap(); + assert_ok!(Pallet::::add_staking_liquidity_token(RawOrigin::Root.into(), PairedOrLiquidityToken::Liquidity(created_liquidity_token), x)); + // as PoolPromoteApi>::update_pool_promotion(created_liquidity_token, Some(1)); + T::RewardsApi::enable(created_liquidity_token, 1); + + + // Now we will create y funded collators + let initial_candidates: Vec = Pallet::::candidate_pool().0.into_iter().map(|x| x.owner).collect::<_>(); + let base_candidate_count: u32 = Pallet::::candidate_pool().0.len().try_into().unwrap(); + + assert_eq!(base_candidate_count, 2); + assert_eq!(x as usize , StakingLiquidityTokens::::get().len()); + + // let pool_rewards = pallet_issuance::PromotedPoolsRewardsV2::::get(); + // assert_eq!(pool_rewards.len(), x as usize); + + + let mut candidates = (0u32..y) + .map(|i|{ + create_funded_collator::( + "collator", + USER_SEED - i, + created_liquidity_token, + Some(T::MinCandidateStk::get()), + i + base_candidate_count, + x + ) + }).collect::, &'static str>>()?; + + // create one aggregator per candidate + for (id, c) in candidates.iter().enumerate() { + let aggregator: T::AccountId = account("aggregator", id as u32, 0); + assert_ok!(Pallet::::aggregator_update_metadata(RawOrigin::Signed( + aggregator.clone()).into(), + vec![c.clone()], + MetadataUpdateAction::ExtendApprovedCollators, + )); + + assert_ok!(Pallet::::update_candidate_aggregator(RawOrigin::Signed( + c.clone()).into(), + Some(aggregator.clone()), + )); + } + + assert_eq!(candidates.len(), y as usize); + // + // // Now we will create `z*y` delegators each with `100*DOLLAR` created_liquidity_token tokens + // + let delegators_count = z*y; + let delegators: Vec<_> = (0u32..delegators_count) + .map(|i| + create_funded_user::("delegator", USER_SEED-i, created_liquidity_token, Some((100*DOLLAR).to_balance::())) + ).map(|(account, _token_id, _amount)| account) + .collect(); + assert_eq!(delegators.len(), (z*y) as usize); + + for (delegators, candidate) in delegators.iter().chunks(z as usize).into_iter() + .zip(candidates.clone()) + { + + for (count, delegator) in delegators.into_iter().enumerate() { + Pallet::::delegate(RawOrigin::Signed( + delegator.clone()).into(), + candidate.clone().into(), + (100*DOLLAR).to_balance::(), + None, + count as u32, + 0u32, + ).unwrap(); + } + + assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().delegators.0.len() , z as usize); + assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().top_delegations.len() , z as usize); + assert_eq!(Pallet::::candidate_state(candidate.clone()).unwrap().bottom_delegations.len() , 0usize); + + } + + + // + // Remove the initial two collators so that they do not get selected + // We do this as the two collators do not have max delegators and would not be worst case + + for initial_candidate in initial_candidates{ + assert_ok!(Pallet::::go_offline(RawOrigin::Signed( + initial_candidate.clone()).into())); + } + + + + // We would like to move on to the end of round 4 + let session_to_reach = 4u32; + + // Moves to the end of the round + // Infinite loop that breaks when should_end_session is true + loop { + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + >::set_block_number(>::block_number() + 1u32.into()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + if Pallet::::round().current == session_to_reach { + for i in 0..2{ + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + >::set_block_number(>::block_number() + 1u32.into()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + } + break; + } + } + + let selected_author = Pallet::::selected_candidates(); + + + // We would like to move on to the end of round 1 + let session_to_reach = 5u32; + + // Moves to the end of the round 0 + // Infinite loop that breaks when should_end_session is true + loop { + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + >::set_block_number(>::block_number() + 1u32.into()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + if Pallet::::round().current == session_to_reach { + for i in 0..2{ + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + >::set_block_number(>::block_number() + 1u32.into()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + } + break; + } + } + + + assert_eq!(pallet_session::Pallet::::current_index() as u32, 5u32); + assert_eq!(Pallet::::round().current as u32, 5u32); + assert_eq!(selected_author.len(), (w as usize).min(Pallet::::candidate_pool().0.len() as usize)); + + + let candidate_pool_state = Pallet::::candidate_pool().0; + + for (i, candidate_bond) in candidate_pool_state.into_iter().enumerate() { + if candidate_bond.liquidity_token == created_liquidity_token { + assert_eq!(candidate_bond.amount.into(), (1+(z as u128)*100)*DOLLAR); + } + } + + for author in selected_author.clone() { + Pallet::::note_author(author.clone()); + } + + // We would like to move on to the end of round 1 + let end_of_session_to_reach = 6u32; + // let pool_rewards = pallet_issuance::PromotedPoolsRewardsV2::::get(); + // assert_eq!(pool_rewards.len(), x as usize); + + // Moves to the end of the round 0 + // Infinite loop that breaks when should_end_session is true + loop { + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_finalize(>::block_number()); + >::set_block_number(>::block_number() + 1u32.into()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + if as pallet_session::ShouldEndSession<_>>::should_end_session(>::block_number()) + && (Pallet::::round().current == end_of_session_to_reach) { + break; + } else { + as frame_support::traits::Hooks<_>>::on_initialize(>::block_number()); + } + } + + + assert_eq!(pallet_session::Pallet::::current_index() as u32, 6u32); + assert_eq!(Pallet::::round().current as u32, 6u32); + + assert!( as pallet_session::ShouldEndSession<_>>::should_end_session(>::block_number())); + + for author in selected_author.clone() { + for candidate in AggregatorMetadata::::get(&author).unwrap().token_collator_map.iter().map(|x| x.1){ + assert!(T::Currency::total_balance(MGA_TOKEN_ID.into(), &candidate).is_zero()); + } + } + + }: { as frame_support::traits::Hooks<_>>::on_initialize(>::block_number());} + verify { + assert_eq!(pallet_session::Pallet::::current_index() as u32, 7u32); + assert_eq!(Pallet::::round().current as u32, 7u32); + assert_eq!(w as usize, candidates.iter().filter_map(|c| RoundCollatorRewardInfo::::get(c.clone(), 5u32)).count()); + } } From e4925f294ea300c391a530d7545424c733744e32 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 10:24:50 +0100 Subject: [PATCH 112/125] change session related types to SessionId --- pallets/proof-of-stake/src/lib.rs | 16 ++++++++-------- .../src/schedule_rewards_calculator.rs | 8 ++++---- pallets/proof-of-stake/src/tests.rs | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 9d1b1399d9..59cc15e802 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -100,8 +100,8 @@ pub type ScheduleId = u64; #[scale_info(skip_type_params(T))] pub struct Schedule { - scheduled_at: u64, - last_session: u64, + scheduled_at: SessionId, + last_session: SessionId, liq_token: CurrencyIdOf, reward_token: CurrencyIdOf, amount_per_session: BalanceOf, @@ -203,7 +203,7 @@ pub enum ThirdPartyActivationKind { } const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"rewards!"); -pub type SessionId = u64; +pub type SessionId = u32; #[frame_support::pallet] pub mod pallet { @@ -216,7 +216,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn on_initialize(_n: BlockNumberFor) -> Weight { - let session_id = Self::session_index() as u64; + let session_id = Self::session_index(); // NOTE: 1R if Self::is_new_session() { @@ -695,7 +695,7 @@ pub mod pallet { pool: (CurrencyIdOf, CurrencyIdOf), token_id: CurrencyIdOf, amount: BalanceOf, - schedule_end: BlockNumberFor, + schedule_end: SessionId, ) -> DispatchResult { let sender = ensure_signed(origin)?; Self::reward_pool_impl(sender, pool, token_id, amount, schedule_end) @@ -1389,7 +1389,7 @@ impl Pallet { pool: (CurrencyIdOf, CurrencyIdOf), token_id: CurrencyIdOf, amount: BalanceOf, - schedule_end: BlockNumberFor, + schedule_end: SessionId, ) -> DispatchResult { let liquidity_token_id = ::ValuationApi::get_liquidity_asset(pool.0, pool.1) .map_err(|_| Error::::PoolDoesNotExist)?; @@ -1429,8 +1429,8 @@ impl Pallet { let tail = SchedulesListMetadata::::get().tail; let schedule = Schedule { - scheduled_at: Self::session_index() as u64, - last_session: schedule_end.saturated_into::(), + scheduled_at: Self::session_index(), + last_session: schedule_end, liq_token: liquidity_token_id, reward_token: token_id, amount_per_session, diff --git a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs index d968c14246..ce5cfc29e1 100644 --- a/pallets/proof-of-stake/src/schedule_rewards_calculator.rs +++ b/pallets/proof-of-stake/src/schedule_rewards_calculator.rs @@ -115,7 +115,7 @@ impl ScheduleRewardsCalculator { liquidity_asset_id: CurrencyIdOf, liquidity_assets_reward: CurrencyIdOf, ) { - let session_id = Pallet::::session_index() as u64; + let session_id = Pallet::::session_index(); let (cumulative, idx) = ScheduleRewardsPerLiquidity::::get((liquidity_asset_id, liquidity_assets_reward)); @@ -173,7 +173,7 @@ impl ScheduleRewardsCalculator { liquidity_assets_reward: CurrencyIdOf, ) -> BalanceOf { ScheduleRewardsTotal::::get((liquidity_asset_id, liquidity_assets_reward)) - .total_rewards(Pallet::::session_index() as u64) + .total_rewards(Pallet::::session_index()) } /// returns amount of schedule rewards that has been accumulated since last update of `ScheduleRewardsPerLiquidity` @@ -184,7 +184,7 @@ impl ScheduleRewardsCalculator { diff: BalanceOf, change: bool, ) { - let session_id = Pallet::::session_index() as u64; + let session_id = Pallet::::session_index(); let kind = if change { LiquidityModification::Increase } else { LiquidityModification::Decrease }; TotalActivatedLiquidityForSchedules::::mutate( @@ -199,7 +199,7 @@ impl ScheduleRewardsCalculator { liquidity_asset_id: CurrencyIdOf, liquidity_assets_reward: CurrencyIdOf, ) -> BalanceOf { - let session_id = Pallet::::session_index() as u64; + let session_id = Pallet::::session_index(); TotalActivatedLiquidityForSchedules::::get(liquidity_asset_id, liquidity_assets_reward) .total(session_id) } diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index df9cb7d1cb..b125653392 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -1363,8 +1363,8 @@ fn rewards_schedule_is_stored() { RewardsSchedulesList::::get(0).unwrap(), ( Schedule { - scheduled_at: 0u64, - last_session: 5u64, + scheduled_at: 0u32, + last_session: 5u32, liq_token: LIQUIDITY_TOKEN, reward_token: REWARD_TOKEN, amount_per_session: rewards_per_session, @@ -1407,8 +1407,8 @@ fn rewards_linked_list_insert_multiple_schedules() { RewardsSchedulesList::::get(0).unwrap(), ( Schedule { - scheduled_at: 0u64, - last_session: 1u64, + scheduled_at: 0u32, + last_session: 1u32, liq_token: LIQUIDITY_TOKEN, reward_token: REWARD_TOKEN, amount_per_session: REWARD_AMOUNT / 1, @@ -1421,8 +1421,8 @@ fn rewards_linked_list_insert_multiple_schedules() { RewardsSchedulesList::::get(1).unwrap(), ( Schedule { - scheduled_at: 0u64, - last_session: 2u64, + scheduled_at: 0u32, + last_session: 2u32, liq_token: LIQUIDITY_TOKEN, reward_token: REWARD_TOKEN, amount_per_session: REWARD_AMOUNT / 2, From 03d1c6995e31a83431d1f122e80aa5538847737c Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 10:25:10 +0100 Subject: [PATCH 113/125] fix compilation problem --- runtime/mangata-kusama/src/lib.rs | 1 - runtime/mangata-rococo/src/lib.rs | 1 - 2 files changed, 2 deletions(-) diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs index 6bb996441a..e93b993b49 100644 --- a/runtime/mangata-kusama/src/lib.rs +++ b/runtime/mangata-kusama/src/lib.rs @@ -796,7 +796,6 @@ impl_runtime_apis! { user: AccountId, ) -> Vec<(TokenId, TokenId, Balance)>{ pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_all(user) - .unwrap_or_default() } } diff --git a/runtime/mangata-rococo/src/lib.rs b/runtime/mangata-rococo/src/lib.rs index 69288bb240..1382c161f1 100644 --- a/runtime/mangata-rococo/src/lib.rs +++ b/runtime/mangata-rococo/src/lib.rs @@ -815,7 +815,6 @@ impl_runtime_apis! { user: AccountId, ) -> Vec<(TokenId, TokenId, Balance)>{ pallet_proof_of_stake::Pallet::::calculate_3rdparty_rewards_all(user) - .unwrap_or_default() } } From ed1d60b4d7dcd6a0874588f7c1f8a2ead9df0533 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 10:33:58 +0100 Subject: [PATCH 114/125] Make claim_3rdparty_rewards free of charge when successfull --- pallets/proof-of-stake/src/lib.rs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 59cc15e802..4363c1a057 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -430,6 +430,8 @@ pub mod pallet { TooSmallVolume, // Liquidity is reused for 3rdparty rewards LiquidityLockedIn3rdpartyRewards, + // No rewards to claim + NoThirdPartyPartyRewardsToClaim, } #[pallet::event] @@ -786,15 +788,22 @@ pub mod pallet { origin: OriginFor, liquidity_token_id: CurrencyIdOf, reward_token: CurrencyIdOf, - ) -> DispatchResult { + ) -> DispatchResultWithPostInfo { let sender = ensure_signed(origin)?; ScheduleRewardsCalculator::::update_cumulative_rewards( liquidity_token_id, reward_token, ); - Self::claim_schedule_rewards_all_impl(sender, liquidity_token_id, reward_token)?; - Ok(()) + Self::claim_schedule_rewards_all_impl(sender, liquidity_token_id, reward_token) + .map_err(|err| DispatchErrorWithPostInfo { + post_info: PostDispatchInfo { + actual_weight: Some(<::WeightInfo>::claim_3rdparty_rewards()), + pays_fee: Pays::Yes, + }, + error: err, + })?; + Ok(Pays::No.into()) } /// Increases number of tokens used for liquidity mining purposes. @@ -1360,6 +1369,11 @@ impl Pallet { let (rewards_info, total_available_rewards) = calc.claim_rewards().map_err(|err| Into::>::into(err))?; + ensure!( + total_available_rewards > Zero::zero(), + Error::::NoThirdPartyPartyRewardsToClaim + ); + ::Currency::transfer( reward_token.into(), &Self::pallet_account(), From 913ca30d6f2df1a80a5bed7a9c4d10fcdef94e37 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 10:34:37 +0100 Subject: [PATCH 115/125] dedicated Event for claim 3rdparty rewards --- pallets/proof-of-stake/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 4363c1a057..3fdc6bb8cd 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -441,6 +441,7 @@ pub mod pallet { LiquidityActivated(T::AccountId, CurrencyIdOf, BalanceOf), LiquidityDeactivated(T::AccountId, CurrencyIdOf, BalanceOf), RewardsClaimed(T::AccountId, CurrencyIdOf, BalanceOf), + ThirdPartyRewardsClaimed(T::AccountId, CurrencyIdOf, CurrencyIdOf, BalanceOf), } #[pallet::storage] @@ -1388,9 +1389,10 @@ impl Pallet { rewards_info, ); - Pallet::::deposit_event(Event::RewardsClaimed( + Pallet::::deposit_event(Event::ThirdPartyRewardsClaimed( user, liquidity_asset_id, + reward_token, total_available_rewards, )); From b39f68a59d430f1f6e4687e8115dea8342cf3938 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 12:20:59 +0100 Subject: [PATCH 116/125] [fix] allow burning part native liquidity that has not been used for 3rdparty rewards --- pallets/proof-of-stake/src/lib.rs | 14 ++++-- pallets/proof-of-stake/src/tests.rs | 78 +++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 5 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 3fdc6bb8cd..69f84984c9 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -927,11 +927,6 @@ impl Pallet { liquidity_asset_id: CurrencyIdOf, amount: BalanceOf, ) -> DispatchResult { - ensure!( - ActivatedNativeRewardsLiq::::get(user.clone(), liquidity_asset_id).is_zero(), - Error::::LiquidityLockedIn3rdpartyRewards - ); - if amount > BalanceOf::::zero() { Self::set_liquidity_burning_checkpoint(user.clone(), liquidity_asset_id, amount)?; Pallet::::deposit_event(Event::LiquidityDeactivated( @@ -1247,6 +1242,15 @@ impl Pallet { Error::::NotEnoughAssets ); + ensure!( + rewards_info + .activated_amount + .checked_sub(&ActivatedNativeRewardsLiq::::get(user.clone(), liquidity_asset_id)) + .ok_or(Error::::MathOverflow)? >= + liquidity_assets_burned, + Error::::LiquidityLockedIn3rdpartyRewards + ); + let calc = RewardsCalculator::mining_rewards::(user.clone(), liquidity_asset_id)?; let rewards_info = calc .activate_less(liquidity_assets_burned) diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index b125653392..f5f3daa75b 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -2699,6 +2699,84 @@ fn fail_to_transfer_tokens_that_has_been_partially_deactivated() { }); } +#[test] +#[serial] +fn allow_to_deactive_native_liq_when_only_part_of_it_is_used_for_3rdpaty_rewards() { + // 1. activate tokens for native rewards + // 2. re-activate tokens for 3rdparty rewards + // 4. deactivate tokens for 3rdparty rewards + // 5. fail to transfer assets as they are still locked + // 6. deactivate tokens for native rewards + // 7. successfully transfer unlocked tokens + ExtBuilder::new() + .issue(ALICE, FIRST_REWARD_TOKEN, REWARD_AMOUNT) + .issue(ALICE, SECOND_REWARD_TOKEN, 100_000u128) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::update_pool_promotion(RuntimeOrigin::root(), LIQUIDITY_TOKEN, 1u8) + .unwrap(); + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + FIRST_REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + None, + ) + .unwrap(); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 80, + FIRST_REWARD_TOKEN, + Some(ThirdPartyActivationKind::NativeRewardsLiquidity), + ) + .unwrap(); + + assert_err!( + ProofOfStake::deactivate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + ), + Error::::LiquidityLockedIn3rdpartyRewards + ); + + assert_ok!(ProofOfStake::deactivate_liquidity_for_native_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 20, + )); + + assert_err!( + TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 100, + ExistenceRequirement::AllowDeath + ), + orml_tokens::Error::::BalanceTooLow + ); + + assert_ok!(TokensOf::::transfer( + LIQUIDITY_TOKEN, + &BOB, + &CHARLIE, + 20, + ExistenceRequirement::AllowDeath + )); + }); +} + #[test] #[serial] fn when_liquidity_mining_is_reused_it_is_unlocked_properly() { From 98b5e12b8320749ba5a8f86416f0b960bef36b09 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 12:25:13 +0100 Subject: [PATCH 117/125] add dedicated events for activating & deactivating liquidity for 3rdparty rewards --- pallets/proof-of-stake/src/lib.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 69f84984c9..3880d671c0 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -442,6 +442,13 @@ pub mod pallet { LiquidityDeactivated(T::AccountId, CurrencyIdOf, BalanceOf), RewardsClaimed(T::AccountId, CurrencyIdOf, BalanceOf), ThirdPartyRewardsClaimed(T::AccountId, CurrencyIdOf, CurrencyIdOf, BalanceOf), + ThirdPartyLiquidityActivated(T::AccountId, CurrencyIdOf, CurrencyIdOf, BalanceOf), + ThirdPartyLiquidityDeactivated( + T::AccountId, + CurrencyIdOf, + CurrencyIdOf, + BalanceOf, + ), } #[pallet::storage] @@ -1019,7 +1026,12 @@ impl Pallet { _ => {}, } - Pallet::::deposit_event(Event::LiquidityActivated(user, liquidity_asset_id, amount)); + Pallet::::deposit_event(Event::ThirdPartyLiquidityActivated( + user, + liquidity_asset_id, + reward_token, + amount, + )); Ok(()) } @@ -1037,9 +1049,10 @@ impl Pallet { amount, rewards_asset_id, )?; - Pallet::::deposit_event(Event::LiquidityDeactivated( + Pallet::::deposit_event(Event::ThirdPartyLiquidityDeactivated( user, liquidity_asset_id, + rewards_asset_id, amount, )); } From 974c40bb1ab6696a05f0e3fcfa1ae5b530f1edf1 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 16 Nov 2023 16:03:33 +0100 Subject: [PATCH 118/125] conditionally import missing trait --- pallets/proof-of-stake/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 3880d671c0..1ea8c25265 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -138,6 +138,10 @@ use frame_system::pallet_prelude::*; use mangata_support::traits::{ ActivationReservesProviderTrait, LiquidityMiningApi, ProofOfStakeRewardsApi, }; + +#[cfg(feature = "runtime-benchmarks")] +use mangata_support::traits::XykFunctionsTrait; + use sp_std::collections::btree_map::BTreeMap; use sp_runtime::{ From 53b508f9a2bf9dfc1fbac96829ae3275f7d8f6d2 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sat, 18 Nov 2023 20:40:40 +0100 Subject: [PATCH 119/125] turn off logs --- .github/workflows/reusable-build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index 1a53db47bc..b131f96a5e 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -301,7 +301,7 @@ jobs: - name: Run pallet benchmarks run: | mkdir ./benchmarks && target/release/mangata-node benchmark pallet \ - -l=info,xyk=error,collective-mangata=warn,bootstrap=warn \ + -l=info,runtime::collective=warn \ --chain mangata-kusama \ --execution wasm \ --wasm-execution compiled \ From 040d27e79b82c42a189869e08b0e531da9be0046 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Sun, 19 Nov 2023 20:02:16 +0100 Subject: [PATCH 120/125] runtime-benchmarks: disable logging while running benchmarks --- pallets/parachain-staking/src/benchmarks.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/parachain-staking/src/benchmarks.rs b/pallets/parachain-staking/src/benchmarks.rs index aeb7a33a23..7270e5f604 100644 --- a/pallets/parachain-staking/src/benchmarks.rs +++ b/pallets/parachain-staking/src/benchmarks.rs @@ -136,7 +136,7 @@ fn create_funded_user, CurrencyId = CurrencyIdO let funding_account: T::AccountId = account("funding", 0u32, 0u32); const SEED: u32 = 0; let user = account(string, n, SEED); - log::info!("create user {}-{}-{}", string, n, SEED); + log::debug!("create user {}-{}-{}", string, n, SEED); let v = v.unwrap_or((1_000_000_000 * DOLLAR).to_balance::()); assert_ok!(T::Currency::transfer( token_id.into(), @@ -305,7 +305,7 @@ benchmarks! { ); if res.is_err(){ let res_str: &str = res.unwrap_err().try_into().unwrap(); - log::info!("res_str: {:?}", res_str); + log::debug!("res_str: {:?}", res_str); } else { let collator = res.unwrap(); } From 52e3a02e1a432a581799d8f04f58f32d6b123589 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 20 Nov 2023 07:51:05 +0100 Subject: [PATCH 121/125] disable xyk logs --- .github/workflows/reusable-build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-and-test.yml b/.github/workflows/reusable-build-and-test.yml index b131f96a5e..82f6db7dd6 100644 --- a/.github/workflows/reusable-build-and-test.yml +++ b/.github/workflows/reusable-build-and-test.yml @@ -301,7 +301,7 @@ jobs: - name: Run pallet benchmarks run: | mkdir ./benchmarks && target/release/mangata-node benchmark pallet \ - -l=info,runtime::collective=warn \ + -l=info,runtime::collective=warn,xyk=warn \ --chain mangata-kusama \ --execution wasm \ --wasm-execution compiled \ From 92d9e4018d08ce3e24145355582090ccd4f0c235 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 20 Nov 2023 20:15:32 +0100 Subject: [PATCH 122/125] rename benchmarks --- pallets/proof-of-stake/src/benchmarking.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/proof-of-stake/src/benchmarking.rs b/pallets/proof-of-stake/src/benchmarking.rs index 34aff83d89..ed931e3f2c 100644 --- a/pallets/proof-of-stake/src/benchmarking.rs +++ b/pallets/proof-of-stake/src/benchmarking.rs @@ -46,7 +46,7 @@ where } benchmarks! { - claim_rewards_all{ + claim_native_rewards{ // 1. create // 2. promote // 3. mint @@ -107,7 +107,7 @@ benchmarks! { ); } - activate_liquidity{ + activate_liquidity_for_native_rewards{ // activate : // 1 crate pool // 2 promote pool From 86c5bbae6e8c749db3fa6e54db0d07e254df7d04 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Tue, 21 Nov 2023 07:11:38 +0100 Subject: [PATCH 123/125] apply benchmarks from ci --- .../src/weights/block_weights.rs | 22 +- .../src/weights/extrinsic_weights.rs | 22 +- .../src/weights/frame_system.rs | 155 +- .../src/weights/orml_asset_registry.rs | 64 +- .../mangata-kusama/src/weights/orml_tokens.rs | 180 +- .../src/weights/pallet_bootstrap.rs | 368 ++-- .../src/weights/pallet_collective_mangata.rs | 544 +++--- .../src/weights/pallet_crowdloan_rewards.rs | 340 ++-- .../src/weights/pallet_fee_lock.rs | 64 +- .../src/weights/pallet_issuance.rs | 116 +- .../weights/pallet_multipurpose_liquidity.rs | 104 +- .../src/weights/pallet_proof_of_stake.rs | 436 ++--- .../src/weights/pallet_session.rs | 48 +- .../src/weights/pallet_timestamp.rs | 24 +- .../src/weights/pallet_treasury.rs | 160 +- .../src/weights/pallet_utility_mangata.rs | 52 +- .../src/weights/pallet_vesting_mangata.rs | 276 +-- .../mangata-kusama/src/weights/pallet_xyk.rs | 768 ++++----- .../src/weights/parachain_staking.rs | 1476 ++++++++--------- .../src/weights/block_weights.rs | 22 +- .../src/weights/extrinsic_weights.rs | 22 +- .../src/weights/frame_system.rs | 155 +- .../src/weights/orml_asset_registry.rs | 64 +- .../mangata-rococo/src/weights/orml_tokens.rs | 180 +- .../src/weights/pallet_bootstrap.rs | 368 ++-- .../src/weights/pallet_collective_mangata.rs | 544 +++--- .../src/weights/pallet_crowdloan_rewards.rs | 340 ++-- .../src/weights/pallet_fee_lock.rs | 64 +- .../src/weights/pallet_issuance.rs | 116 +- .../weights/pallet_multipurpose_liquidity.rs | 104 +- .../src/weights/pallet_proof_of_stake.rs | 436 ++--- .../src/weights/pallet_session.rs | 48 +- .../src/weights/pallet_timestamp.rs | 24 +- .../src/weights/pallet_treasury.rs | 160 +- .../src/weights/pallet_utility_mangata.rs | 52 +- .../src/weights/pallet_vesting_mangata.rs | 276 +-- .../mangata-rococo/src/weights/pallet_xyk.rs | 768 ++++----- .../src/weights/parachain_staking.rs | 1476 ++++++++--------- 38 files changed, 5250 insertions(+), 5188 deletions(-) diff --git a/runtime/mangata-kusama/src/weights/block_weights.rs b/runtime/mangata-kusama/src/weights/block_weights.rs index 6d27c66767..453ca090b8 100644 --- a/runtime/mangata-kusama/src/weights/block_weights.rs +++ b/runtime/mangata-kusama/src/weights/block_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02 (Y/M/D) -//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-11-20 (Y/M/D) +//! HOSTNAME: `684038c95a2b`, CPU: `AMD EPYC 7B12` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -14,7 +14,7 @@ // --execution // native // --chain -// kusama-local +// mangata-kusama-local // -lblock_builder=debug // --max-ext-per-block // 50000 @@ -29,17 +29,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 7_983_500, 8_609_050 - /// Average: 8_057_882 - /// Median: 8_023_430 - /// Std-Dev: 118109.32 + /// Min, Max: 30_753_089, 35_201_220 + /// Average: 32_433_544 + /// Median: 32_374_100 + /// Std-Dev: 874589.44 /// /// Percentiles nanoseconds: - /// 99th: 8_567_140 - /// 95th: 8_382_280 - /// 75th: 8_036_000 + /// 99th: 34_758_140 + /// 95th: 33_863_539 + /// 75th: 32_883_169 pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(8_057_882), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(32_433_544), 0); } #[cfg(test)] diff --git a/runtime/mangata-kusama/src/weights/extrinsic_weights.rs b/runtime/mangata-kusama/src/weights/extrinsic_weights.rs index ddceb8ee70..8ee78142f6 100644 --- a/runtime/mangata-kusama/src/weights/extrinsic_weights.rs +++ b/runtime/mangata-kusama/src/weights/extrinsic_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02 (Y/M/D) -//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-11-20 (Y/M/D) +//! HOSTNAME: `684038c95a2b`, CPU: `AMD EPYC 7B12` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -14,7 +14,7 @@ // --execution // native // --chain -// kusama-local +// mangata-kusama-local // -lblock_builder=debug // --max-ext-per-block // 50000 @@ -29,17 +29,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 116_665, 118_803 - /// Average: 117_078 - /// Median: 117_010 - /// Std-Dev: 306.32 + /// Min, Max: 188_900, 204_340 + /// Average: 196_710 + /// Median: 196_855 + /// Std-Dev: 3080.34 /// /// Percentiles nanoseconds: - /// 99th: 118_109 - /// 95th: 117_513 - /// 75th: 117_236 + /// 99th: 203_409 + /// 95th: 200_933 + /// 75th: 199_160 pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(117_078), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(196_710), 0); } #[cfg(test)] diff --git a/runtime/mangata-kusama/src/weights/frame_system.rs b/runtime/mangata-kusama/src/weights/frame_system.rs index b74e371128..c523803c6e 100644 --- a/runtime/mangata-kusama/src/weights/frame_system.rs +++ b/runtime/mangata-kusama/src/weights/frame_system.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -59,6 +59,7 @@ pub trait WeightInfo { fn remark(b: u32, ) -> Weight; fn remark_with_event(b: u32, ) -> Weight; fn set_heap_pages() -> Weight; + fn set_code() -> Weight; fn set_storage(i: u32, ) -> Weight; fn kill_storage(i: u32, ) -> Weight; fn kill_prefix(p: u32, ) -> Weight; @@ -68,98 +69,132 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl frame_system::WeightInfo for ModuleWeight { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(9_964_525, 0)) - // Standard Error: 0 - .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) + (Weight::from_parts(104_149_921, 0)) + // Standard Error: 10 + .saturating_add((Weight::from_parts(342, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(29_205_376, 0)) - // Standard Error: 0 - .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) + (Weight::from_parts(36_476_892, 0)) + // Standard Error: 1 + .saturating_add((Weight::from_parts(1_578, 0)).saturating_mul(b as u64)) } - // Storage: System Digest (r:1 w:1) - // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - // Storage: unknown `0x3a686561707061676573` (r:0 w:1) - // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + // Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_610_000, 0)) + (Weight::from_parts(7_260_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainSystem::ValidationData` (r:1 w:0) + // Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::UpgradeRestrictionSignal` (r:1 w:0) + // Proof: `ParachainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::PendingValidationCode` (r:1 w:1) + // Proof: `ParachainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::NewValidationCode` (r:0 w:1) + // Proof: `ParachainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::DidSetValidationCode` (r:0 w:1) + // Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_code() -> Weight { + (Weight::from_parts(163_229_366_000, 0)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_160_000, 0)) - // Standard Error: 2_435 - .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) + (Weight::from_parts(3_940_000, 0)) + // Standard Error: 2_890 + .saturating_add((Weight::from_parts(1_342_924, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_090_000, 0)) - // Standard Error: 1_110 - .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_040_000, 0)) + // Standard Error: 1_224 + .saturating_add((Weight::from_parts(915_962, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_640_000, 0)) - // Standard Error: 1_374 - .saturating_add((Weight::from_parts(1_459_706, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_650_000, 0)) + // Standard Error: 1_634 + .saturating_add((Weight::from_parts(1_599_167, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } - - fn set_code() -> Weight { - Weight::from_parts(0, 0) - } } // For backwards compatibility and tests impl WeightInfo for () { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(9_964_525, 0)) - // Standard Error: 0 - .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) + (Weight::from_parts(104_149_921, 0)) + // Standard Error: 10 + .saturating_add((Weight::from_parts(342, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(29_205_376, 0)) - // Standard Error: 0 - .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) + (Weight::from_parts(36_476_892, 0)) + // Standard Error: 1 + .saturating_add((Weight::from_parts(1_578, 0)).saturating_mul(b as u64)) } - // Storage: System Digest (r:1 w:1) - // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - // Storage: unknown `0x3a686561707061676573` (r:0 w:1) - // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + // Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_610_000, 0)) + (Weight::from_parts(7_260_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainSystem::ValidationData` (r:1 w:0) + // Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::UpgradeRestrictionSignal` (r:1 w:0) + // Proof: `ParachainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::PendingValidationCode` (r:1 w:1) + // Proof: `ParachainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::NewValidationCode` (r:0 w:1) + // Proof: `ParachainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::DidSetValidationCode` (r:0 w:1) + // Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_code() -> Weight { + (Weight::from_parts(163_229_366_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) + } + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_160_000, 0)) - // Standard Error: 2_435 - .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) + (Weight::from_parts(3_940_000, 0)) + // Standard Error: 2_890 + .saturating_add((Weight::from_parts(1_342_924, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_090_000, 0)) - // Standard Error: 1_110 - .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_040_000, 0)) + // Standard Error: 1_224 + .saturating_add((Weight::from_parts(915_962, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_640_000, 0)) - // Standard Error: 1_374 - .saturating_add((Weight::from_parts(1_459_706, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_650_000, 0)) + // Standard Error: 1_634 + .saturating_add((Weight::from_parts(1_599_167, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } diff --git a/runtime/mangata-kusama/src/weights/orml_asset_registry.rs b/runtime/mangata-kusama/src/weights/orml_asset_registry.rs index 8242233fca..1a1b3efba3 100644 --- a/runtime/mangata-kusama/src/weights/orml_asset_registry.rs +++ b/runtime/mangata-kusama/src/weights/orml_asset_registry.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for orml_asset_registry //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -63,25 +63,25 @@ pub trait WeightInfo { /// Weights for orml_asset_registry using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl orml_asset_registry::WeightInfo for ModuleWeight { - // Storage: Tokens NextCurrencyId (r:1 w:1) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:1 w:1) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: AssetRegistry LocationToAssetId (r:1 w:1) - // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::NextCurrencyId` (r:1 w:1) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:1 w:1) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::LocationToAssetId` (r:1 w:1) + // Proof: `AssetRegistry::LocationToAssetId` (`max_values`: None, `max_size`: Some(614), added: 3089, mode: `MaxEncodedLen`) fn register_asset() -> Weight { - (Weight::from_parts(48_560_000, 0)) + (Weight::from_parts(44_771_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: AssetRegistry Metadata (r:1 w:1) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: AssetRegistry LocationToAssetId (r:1 w:1) - // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + // Storage: `AssetRegistry::Metadata` (r:1 w:1) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::LocationToAssetId` (r:1 w:1) + // Proof: `AssetRegistry::LocationToAssetId` (`max_values`: None, `max_size`: Some(614), added: 3089, mode: `MaxEncodedLen`) fn update_asset() -> Weight { - (Weight::from_parts(33_480_000, 0)) + (Weight::from_parts(29_691_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -89,25 +89,25 @@ impl orml_asset_registry::WeightInfo for ModuleWeight Weight { - (Weight::from_parts(48_560_000, 0)) + (Weight::from_parts(44_771_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: AssetRegistry Metadata (r:1 w:1) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: AssetRegistry LocationToAssetId (r:1 w:1) - // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + // Storage: `AssetRegistry::Metadata` (r:1 w:1) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::LocationToAssetId` (r:1 w:1) + // Proof: `AssetRegistry::LocationToAssetId` (`max_values`: None, `max_size`: Some(614), added: 3089, mode: `MaxEncodedLen`) fn update_asset() -> Weight { - (Weight::from_parts(33_480_000, 0)) + (Weight::from_parts(29_691_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/orml_tokens.rs b/runtime/mangata-kusama/src/weights/orml_tokens.rs index 5508f3d7cb..9b9165149d 100644 --- a/runtime/mangata-kusama/src/weights/orml_tokens.rs +++ b/runtime/mangata-kusama/src/weights/orml_tokens.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for orml_tokens //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -68,74 +68,74 @@ pub trait WeightInfo { /// Weights for orml_tokens using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl orml_tokens::WeightInfo for ModuleWeight { - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer() -> Weight { - (Weight::from_parts(54_300_000, 0)) + (Weight::from_parts(54_440_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer_all() -> Weight { - (Weight::from_parts(56_740_000, 0)) + (Weight::from_parts(57_580_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(52_380_000, 0)) + (Weight::from_parts(52_920_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { - (Weight::from_parts(58_360_000, 0)) + (Weight::from_parts(59_130_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn set_balance() -> Weight { - (Weight::from_parts(32_250_000, 0)) + (Weight::from_parts(33_340_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Tokens NextCurrencyId (r:1 w:1) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::NextCurrencyId` (r:1 w:1) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn create() -> Weight { - (Weight::from_parts(58_930_000, 0)) + (Weight::from_parts(60_371_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn mint() -> Weight { - (Weight::from_parts(59_170_000, 0)) + (Weight::from_parts(60_580_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -143,74 +143,74 @@ impl orml_tokens::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer() -> Weight { - (Weight::from_parts(54_300_000, 0)) + (Weight::from_parts(54_440_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer_all() -> Weight { - (Weight::from_parts(56_740_000, 0)) + (Weight::from_parts(57_580_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(52_380_000, 0)) + (Weight::from_parts(52_920_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { - (Weight::from_parts(58_360_000, 0)) + (Weight::from_parts(59_130_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn set_balance() -> Weight { - (Weight::from_parts(32_250_000, 0)) + (Weight::from_parts(33_340_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Tokens NextCurrencyId (r:1 w:1) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::NextCurrencyId` (r:1 w:1) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn create() -> Weight { - (Weight::from_parts(58_930_000, 0)) + (Weight::from_parts(60_371_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn mint() -> Weight { - (Weight::from_parts(59_170_000, 0)) + (Weight::from_parts(60_580_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs b/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs index 7ebdf94b14..6f982c5c4d 100644 --- a/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs +++ b/runtime/mangata-kusama/src/weights/pallet_bootstrap.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_bootstrap //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -65,109 +65,109 @@ pub trait WeightInfo { /// Weights for pallet_bootstrap using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_bootstrap::WeightInfo for ModuleWeight { - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap BootstrapSchedule (r:1 w:1) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:2 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Bootstrap PromoteBootstrapPool (r:0 w:1) - // Proof Skipped: Bootstrap PromoteBootstrapPool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:0 w:1) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:1) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:2 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::PromoteBootstrapPool` (r:0 w:1) + // Proof: `Bootstrap::PromoteBootstrapPool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:0 w:1) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_000_000, 0)) + (Weight::from_parts(34_540_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap WhitelistedAccount (r:1 w:0) - // Proof Skipped: Bootstrap WhitelistedAccount (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap BootstrapSchedule (r:1 w:0) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:1 w:1) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:1 w:1) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:0 w:1) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::WhitelistedAccount` (r:1 w:0) + // Proof: `Bootstrap::WhitelistedAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:0) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::Provisions` (r:1 w:1) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:1 w:1) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:0 w:1) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn provision() -> Weight { - (Weight::from_parts(106_729_000, 0)) + (Weight::from_parts(105_711_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap MintedLiquidity (r:1 w:0) - // Proof Skipped: Bootstrap MintedLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ArchivedBootstrap (r:1 w:0) - // Proof Skipped: Bootstrap ArchivedBootstrap (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ClaimedRewards (r:2 w:2) - // Proof Skipped: Bootstrap ClaimedRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:1 w:0) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:2 w:0) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap VestedProvisions (r:2 w:0) - // Proof Skipped: Bootstrap VestedProvisions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:0 w:1) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::MintedLiquidity` (r:1 w:0) + // Proof: `Bootstrap::MintedLiquidity` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ArchivedBootstrap` (r:1 w:0) + // Proof: `Bootstrap::ArchivedBootstrap` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ClaimedRewards` (r:2 w:2) + // Proof: `Bootstrap::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:1 w:0) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Provisions` (r:2 w:0) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::VestedProvisions` (r:2 w:0) + // Proof: `Bootstrap::VestedProvisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:0 w:1) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(226_960_000, 0)) + (Weight::from_parts(239_040_000, 0)) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } - // Storage: Bootstrap Phase (r:1 w:1) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:1 w:0) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap VestedProvisions (r:1 w:0) - // Proof Skipped: Bootstrap VestedProvisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap WhitelistedAccount (r:1 w:0) - // Proof Skipped: Bootstrap WhitelistedAccount (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ClaimedRewards (r:1 w:0) - // Proof Skipped: Bootstrap ClaimedRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:1 w:0) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap MintedLiquidity (r:1 w:1) - // Proof Skipped: Bootstrap MintedLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Bootstrap BootstrapSchedule (r:1 w:1) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ArchivedBootstrap (r:1 w:1) - // Proof Skipped: Bootstrap ArchivedBootstrap (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:0 w:1) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap PromoteBootstrapPool (r:0 w:1) - // Proof Skipped: Bootstrap PromoteBootstrapPool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:0 w:1) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:1) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:1 w:0) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::VestedProvisions` (r:1 w:0) + // Proof: `Bootstrap::VestedProvisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::WhitelistedAccount` (r:1 w:0) + // Proof: `Bootstrap::WhitelistedAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ClaimedRewards` (r:1 w:0) + // Proof: `Bootstrap::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Provisions` (r:1 w:0) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::MintedLiquidity` (r:1 w:1) + // Proof: `Bootstrap::MintedLiquidity` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:1) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ArchivedBootstrap` (r:1 w:1) + // Proof: `Bootstrap::ArchivedBootstrap` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:0 w:1) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::PromoteBootstrapPool` (r:0 w:1) + // Proof: `Bootstrap::PromoteBootstrapPool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:0 w:1) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalize() -> Weight { - (Weight::from_parts(79_150_000, 0)) + (Weight::from_parts(83_640_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -175,109 +175,109 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap BootstrapSchedule (r:1 w:1) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:2 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Bootstrap PromoteBootstrapPool (r:0 w:1) - // Proof Skipped: Bootstrap PromoteBootstrapPool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:0 w:1) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:1) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:2 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::PromoteBootstrapPool` (r:0 w:1) + // Proof: `Bootstrap::PromoteBootstrapPool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:0 w:1) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_000_000, 0)) + (Weight::from_parts(34_540_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap WhitelistedAccount (r:1 w:0) - // Proof Skipped: Bootstrap WhitelistedAccount (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap BootstrapSchedule (r:1 w:0) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:1 w:1) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:1 w:1) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:0 w:1) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::WhitelistedAccount` (r:1 w:0) + // Proof: `Bootstrap::WhitelistedAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:0) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::Provisions` (r:1 w:1) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:1 w:1) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:0 w:1) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn provision() -> Weight { - (Weight::from_parts(106_729_000, 0)) + (Weight::from_parts(105_711_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap MintedLiquidity (r:1 w:0) - // Proof Skipped: Bootstrap MintedLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ArchivedBootstrap (r:1 w:0) - // Proof Skipped: Bootstrap ArchivedBootstrap (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ClaimedRewards (r:2 w:2) - // Proof Skipped: Bootstrap ClaimedRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:1 w:0) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:2 w:0) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap VestedProvisions (r:2 w:0) - // Proof Skipped: Bootstrap VestedProvisions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:0 w:1) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::MintedLiquidity` (r:1 w:0) + // Proof: `Bootstrap::MintedLiquidity` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ArchivedBootstrap` (r:1 w:0) + // Proof: `Bootstrap::ArchivedBootstrap` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ClaimedRewards` (r:2 w:2) + // Proof: `Bootstrap::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:1 w:0) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Provisions` (r:2 w:0) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::VestedProvisions` (r:2 w:0) + // Proof: `Bootstrap::VestedProvisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:0 w:1) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(226_960_000, 0)) + (Weight::from_parts(239_040_000, 0)) .saturating_add(RocksDbWeight::get().reads(17 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } - // Storage: Bootstrap Phase (r:1 w:1) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:1 w:0) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap VestedProvisions (r:1 w:0) - // Proof Skipped: Bootstrap VestedProvisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap WhitelistedAccount (r:1 w:0) - // Proof Skipped: Bootstrap WhitelistedAccount (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ClaimedRewards (r:1 w:0) - // Proof Skipped: Bootstrap ClaimedRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:1 w:0) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap MintedLiquidity (r:1 w:1) - // Proof Skipped: Bootstrap MintedLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Bootstrap BootstrapSchedule (r:1 w:1) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ArchivedBootstrap (r:1 w:1) - // Proof Skipped: Bootstrap ArchivedBootstrap (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:0 w:1) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap PromoteBootstrapPool (r:0 w:1) - // Proof Skipped: Bootstrap PromoteBootstrapPool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:0 w:1) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:1) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:1 w:0) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::VestedProvisions` (r:1 w:0) + // Proof: `Bootstrap::VestedProvisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::WhitelistedAccount` (r:1 w:0) + // Proof: `Bootstrap::WhitelistedAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ClaimedRewards` (r:1 w:0) + // Proof: `Bootstrap::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Provisions` (r:1 w:0) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::MintedLiquidity` (r:1 w:1) + // Proof: `Bootstrap::MintedLiquidity` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:1) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ArchivedBootstrap` (r:1 w:1) + // Proof: `Bootstrap::ArchivedBootstrap` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:0 w:1) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::PromoteBootstrapPool` (r:0 w:1) + // Proof: `Bootstrap::PromoteBootstrapPool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:0 w:1) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalize() -> Weight { - (Weight::from_parts(79_150_000, 0)) + (Weight::from_parts(83_640_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs b/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs index ded612958c..1fd6a78ffc 100644 --- a/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs +++ b/runtime/mangata-kusama/src/weights/pallet_collective_mangata.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_collective_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -71,177 +71,175 @@ pub trait WeightInfo { /// Weights for pallet_collective_mangata using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_collective_mangata::WeightInfo for ModuleWeight { - // Storage: Council Members (r:1 w:1) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:0) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:100 w:100) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:0 w:1) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:1) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:0) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:100 w:100) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:0 w:1) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_800_000, 0)) - // Standard Error: 69_203 - .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) - // Standard Error: 69_203 - .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) + (Weight::from_parts(56_930_000, 0)) + // Standard Error: 75_983 + .saturating_add((Weight::from_parts(5_656_190, 0)).saturating_mul(m as u64)) + // Standard Error: 75_983 + .saturating_add((Weight::from_parts(10_752_628, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(31_313_537, 0)) - // Standard Error: 94 - .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) - // Standard Error: 972 - .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn execute(_b: u32, m: u32, ) -> Weight { + (Weight::from_parts(32_347_546, 0)) + // Standard Error: 1_733 + .saturating_add((Weight::from_parts(20_109, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:0) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:0) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(34_536_810, 0)) - // Standard Error: 85 - .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) - // Standard Error: 883 - .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_280_801, 0)) + // Standard Error: 220 + .saturating_add((Weight::from_parts(2_579, 0)).saturating_mul(b as u64)) + // Standard Error: 2_276 + .saturating_add((Weight::from_parts(45_962, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalCount (r:1 w:1) - // Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:0 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Voting (r:0 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalCount` (r:1 w:1) + // Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:0 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:0 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(49_784_354, 0)) - // Standard Error: 163 - .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) - // Standard Error: 1_705 - .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) - // Standard Error: 1_683 - .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_638_444, 0)) + // Standard Error: 319 + .saturating_add((Weight::from_parts(4_413, 0)).saturating_mul(b as u64)) + // Standard Error: 3_330 + .saturating_add((Weight::from_parts(34_950, 0)).saturating_mul(m as u64)) + // Standard Error: 3_288 + .saturating_add((Weight::from_parts(344_067, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_999_012, 0)) - // Standard Error: 944 - .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) + (Weight::from_parts(48_255_187, 0)) + // Standard Error: 3_028 + .saturating_add((Weight::from_parts(59_613, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(67_599_850, 0)) - // Standard Error: 1_737 - .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) - // Standard Error: 1_694 - .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) + (Weight::from_parts(69_456_397, 0)) + // Standard Error: 4_288 + .saturating_add((Weight::from_parts(98_520, 0)).saturating_mul(m as u64)) + // Standard Error: 4_181 + .saturating_add((Weight::from_parts(345_792, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(94_619_427, 0)) - // Standard Error: 307 - .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) - // Standard Error: 3_251 - .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) - // Standard Error: 3_169 - .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_575_321, 0)) + // Standard Error: 532 + .saturating_add((Weight::from_parts(8_199, 0)).saturating_mul(b as u64)) + // Standard Error: 5_623 + .saturating_add((Weight::from_parts(72_246, 0)).saturating_mul(m as u64)) + // Standard Error: 5_481 + .saturating_add((Weight::from_parts(403_035, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:1 w:0) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:1 w:0) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(71_391_246, 0)) - // Standard Error: 1_912 - .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) - // Standard Error: 1_865 - .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) + (Weight::from_parts(75_627_064, 0)) + // Standard Error: 4_313 + .saturating_add((Weight::from_parts(82_419, 0)).saturating_mul(m as u64)) + // Standard Error: 4_206 + .saturating_add((Weight::from_parts(337_204, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:1 w:0) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:1 w:0) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(98_330_423, 0)) - // Standard Error: 297 - .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) - // Standard Error: 3_149 - .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) - // Standard Error: 3_070 - .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) + (Weight::from_parts(99_748_377, 0)) + // Standard Error: 568 + .saturating_add((Weight::from_parts(8_301, 0)).saturating_mul(b as u64)) + // Standard Error: 6_004 + .saturating_add((Weight::from_parts(54_155, 0)).saturating_mul(m as u64)) + // Standard Error: 5_853 + .saturating_add((Weight::from_parts(417_747, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:0 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Voting (r:0 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:0 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:0 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_844_726, 0)) - // Standard Error: 1_413 - .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_703_019, 0)) + // Standard Error: 2_935 + .saturating_add((Weight::from_parts(312_935, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -249,177 +247,175 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Council Members (r:1 w:1) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:0) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:100 w:100) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:0 w:1) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:1) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:0) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:100 w:100) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:0 w:1) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_800_000, 0)) - // Standard Error: 69_203 - .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) - // Standard Error: 69_203 - .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) + (Weight::from_parts(56_930_000, 0)) + // Standard Error: 75_983 + .saturating_add((Weight::from_parts(5_656_190, 0)).saturating_mul(m as u64)) + // Standard Error: 75_983 + .saturating_add((Weight::from_parts(10_752_628, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(31_313_537, 0)) - // Standard Error: 94 - .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) - // Standard Error: 972 - .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn execute(_b: u32, m: u32, ) -> Weight { + (Weight::from_parts(32_347_546, 0)) + // Standard Error: 1_733 + .saturating_add((Weight::from_parts(20_109, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:0) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:0) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(34_536_810, 0)) - // Standard Error: 85 - .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) - // Standard Error: 883 - .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_280_801, 0)) + // Standard Error: 220 + .saturating_add((Weight::from_parts(2_579, 0)).saturating_mul(b as u64)) + // Standard Error: 2_276 + .saturating_add((Weight::from_parts(45_962, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalCount (r:1 w:1) - // Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:0 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Voting (r:0 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalCount` (r:1 w:1) + // Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:0 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:0 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(49_784_354, 0)) - // Standard Error: 163 - .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) - // Standard Error: 1_705 - .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) - // Standard Error: 1_683 - .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_638_444, 0)) + // Standard Error: 319 + .saturating_add((Weight::from_parts(4_413, 0)).saturating_mul(b as u64)) + // Standard Error: 3_330 + .saturating_add((Weight::from_parts(34_950, 0)).saturating_mul(m as u64)) + // Standard Error: 3_288 + .saturating_add((Weight::from_parts(344_067, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_999_012, 0)) - // Standard Error: 944 - .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) + (Weight::from_parts(48_255_187, 0)) + // Standard Error: 3_028 + .saturating_add((Weight::from_parts(59_613, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(67_599_850, 0)) - // Standard Error: 1_737 - .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) - // Standard Error: 1_694 - .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) + (Weight::from_parts(69_456_397, 0)) + // Standard Error: 4_288 + .saturating_add((Weight::from_parts(98_520, 0)).saturating_mul(m as u64)) + // Standard Error: 4_181 + .saturating_add((Weight::from_parts(345_792, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(94_619_427, 0)) - // Standard Error: 307 - .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) - // Standard Error: 3_251 - .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) - // Standard Error: 3_169 - .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_575_321, 0)) + // Standard Error: 532 + .saturating_add((Weight::from_parts(8_199, 0)).saturating_mul(b as u64)) + // Standard Error: 5_623 + .saturating_add((Weight::from_parts(72_246, 0)).saturating_mul(m as u64)) + // Standard Error: 5_481 + .saturating_add((Weight::from_parts(403_035, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:1 w:0) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:1 w:0) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(71_391_246, 0)) - // Standard Error: 1_912 - .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) - // Standard Error: 1_865 - .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) + (Weight::from_parts(75_627_064, 0)) + // Standard Error: 4_313 + .saturating_add((Weight::from_parts(82_419, 0)).saturating_mul(m as u64)) + // Standard Error: 4_206 + .saturating_add((Weight::from_parts(337_204, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:1 w:0) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:1 w:0) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(98_330_423, 0)) - // Standard Error: 297 - .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) - // Standard Error: 3_149 - .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) - // Standard Error: 3_070 - .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) + (Weight::from_parts(99_748_377, 0)) + // Standard Error: 568 + .saturating_add((Weight::from_parts(8_301, 0)).saturating_mul(b as u64)) + // Standard Error: 6_004 + .saturating_add((Weight::from_parts(54_155, 0)).saturating_mul(m as u64)) + // Standard Error: 5_853 + .saturating_add((Weight::from_parts(417_747, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:0 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Voting (r:0 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:0 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:0 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_844_726, 0)) - // Standard Error: 1_413 - .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_703_019, 0)) + // Standard Error: 2_935 + .saturating_add((Weight::from_parts(312_935, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs b/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs index a0016cb225..5f37b8288f 100644 --- a/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs +++ b/runtime/mangata-kusama/src/weights/pallet_crowdloan_rewards.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_crowdloan_rewards //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -68,116 +68,116 @@ pub trait WeightInfo { /// Weights for pallet_crowdloan_rewards using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_crowdloan_rewards::WeightInfo for ModuleWeight { - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:0) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:0 w:1) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(13_860_000, 0)) + (Weight::from_parts(13_910_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) - // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan UnassociatedContributions (r:100 w:0) - // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:100 w:100) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:1) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::TotalContributors` (r:1 w:1) + // Proof: `Crowdloan::TotalContributors` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::ClaimedRelayChainIds` (r:100 w:100) + // Proof: `Crowdloan::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::UnassociatedContributions` (r:100 w:0) + // Proof: `Crowdloan::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:100 w:100) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(95_783_300, 0)) - // Standard Error: 25_873 - .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + (Weight::from_parts(123_974_567, 0)) + // Standard Error: 61_847 + .saturating_add((Weight::from_parts(25_859_849, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } - // Storage: Crowdloan Initialized (r:1 w:1) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:1) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:0) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::TotalContributors` (r:1 w:0) + // Proof: `Crowdloan::TotalContributors` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanPeriod` (r:0 w:1) + // Proof: `Crowdloan::CrowdloanPeriod` (`max_values`: None, `max_size`: None, mode: `Measured`) fn complete_initialization() -> Weight { - (Weight::from_parts(27_331_000, 0)) + (Weight::from_parts(28_570_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:1 w:1) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:1 w:1) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Crowdloan::CrowdloanPeriod` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanPeriod` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn claim() -> Weight { - (Weight::from_parts(129_060_000, 0)) + (Weight::from_parts(129_160_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:2 w:2) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:2 w:2) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_reward_address() -> Weight { - (Weight::from_parts(34_900_000, 0)) + (Weight::from_parts(35_100_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan UnassociatedContributions (r:1 w:1) - // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) - // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:1 w:1) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::UnassociatedContributions` (r:1 w:1) + // Proof: `Crowdloan::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::ClaimedRelayChainIds` (r:1 w:1) + // Proof: `Crowdloan::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:1 w:1) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn associate_native_identity() -> Weight { - (Weight::from_parts(114_790_000, 0)) + (Weight::from_parts(118_910_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:2 w:2) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:2 w:2) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(42_648_512, 0)) - // Standard Error: 10_539 - .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + (Weight::from_parts(50_224_766, 0)) + // Standard Error: 121_712 + .saturating_add((Weight::from_parts(65_897_329, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -185,116 +185,116 @@ impl pallet_crowdloan_rewards::WeightInfo for ModuleWei // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:0) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:0 w:1) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(13_860_000, 0)) + (Weight::from_parts(13_910_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) - // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan UnassociatedContributions (r:100 w:0) - // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:100 w:100) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:1) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::TotalContributors` (r:1 w:1) + // Proof: `Crowdloan::TotalContributors` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::ClaimedRelayChainIds` (r:100 w:100) + // Proof: `Crowdloan::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::UnassociatedContributions` (r:100 w:0) + // Proof: `Crowdloan::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:100 w:100) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(95_783_300, 0)) - // Standard Error: 25_873 - .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + (Weight::from_parts(123_974_567, 0)) + // Standard Error: 61_847 + .saturating_add((Weight::from_parts(25_859_849, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } - // Storage: Crowdloan Initialized (r:1 w:1) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:1) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:0) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::TotalContributors` (r:1 w:0) + // Proof: `Crowdloan::TotalContributors` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanPeriod` (r:0 w:1) + // Proof: `Crowdloan::CrowdloanPeriod` (`max_values`: None, `max_size`: None, mode: `Measured`) fn complete_initialization() -> Weight { - (Weight::from_parts(27_331_000, 0)) + (Weight::from_parts(28_570_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:1 w:1) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:1 w:1) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Crowdloan::CrowdloanPeriod` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanPeriod` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn claim() -> Weight { - (Weight::from_parts(129_060_000, 0)) + (Weight::from_parts(129_160_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:2 w:2) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:2 w:2) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_reward_address() -> Weight { - (Weight::from_parts(34_900_000, 0)) + (Weight::from_parts(35_100_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan UnassociatedContributions (r:1 w:1) - // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) - // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:1 w:1) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::UnassociatedContributions` (r:1 w:1) + // Proof: `Crowdloan::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::ClaimedRelayChainIds` (r:1 w:1) + // Proof: `Crowdloan::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:1 w:1) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn associate_native_identity() -> Weight { - (Weight::from_parts(114_790_000, 0)) + (Weight::from_parts(118_910_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:2 w:2) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:2 w:2) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(42_648_512, 0)) - // Standard Error: 10_539 - .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + (Weight::from_parts(50_224_766, 0)) + // Standard Error: 121_712 + .saturating_add((Weight::from_parts(65_897_329, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs b/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs index 7057d5cf29..0ed5e75bb0 100644 --- a/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs +++ b/runtime/mangata-kusama/src/weights/pallet_fee_lock.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_fee_lock //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -63,25 +63,25 @@ pub trait WeightInfo { /// Weights for pallet_fee_lock using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_fee_lock::WeightInfo for ModuleWeight { - // Storage: FeeLock FeeLockMetadata (r:1 w:1) - // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) + // Storage: `FeeLock::FeeLockMetadata` (r:1 w:1) + // Proof: `FeeLock::FeeLockMetadata` (`max_values`: Some(1), `max_size`: Some(438), added: 933, mode: `MaxEncodedLen`) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(31_000_000, 0)) + (Weight::from_parts(27_060_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: FeeLock AccountFeeLockData (r:1 w:1) - // Proof: FeeLock AccountFeeLockData (max_values: None, max_size: Some(60), added: 2535, mode: MaxEncodedLen) - // Storage: FeeLock FeeLockMetadata (r:1 w:0) - // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: FeeLock FeeLockMetadataQeueuePosition (r:1 w:1) - // Proof: FeeLock FeeLockMetadataQeueuePosition (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: FeeLock UnlockQueue (r:1 w:1) - // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: `FeeLock::AccountFeeLockData` (r:1 w:1) + // Proof: `FeeLock::AccountFeeLockData` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `FeeLock::FeeLockMetadata` (r:1 w:0) + // Proof: `FeeLock::FeeLockMetadata` (`max_values`: Some(1), `max_size`: Some(438), added: 933, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `FeeLock::FeeLockMetadataQeueuePosition` (r:1 w:1) + // Proof: `FeeLock::FeeLockMetadataQeueuePosition` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + // Storage: `FeeLock::UnlockQueue` (r:1 w:1) + // Proof: `FeeLock::UnlockQueue` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn unlock_fee() -> Weight { - (Weight::from_parts(56_920_000, 0)) + (Weight::from_parts(52_860_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -89,25 +89,25 @@ impl pallet_fee_lock::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: FeeLock FeeLockMetadata (r:1 w:1) - // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) + // Storage: `FeeLock::FeeLockMetadata` (r:1 w:1) + // Proof: `FeeLock::FeeLockMetadata` (`max_values`: Some(1), `max_size`: Some(438), added: 933, mode: `MaxEncodedLen`) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(31_000_000, 0)) + (Weight::from_parts(27_060_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: FeeLock AccountFeeLockData (r:1 w:1) - // Proof: FeeLock AccountFeeLockData (max_values: None, max_size: Some(60), added: 2535, mode: MaxEncodedLen) - // Storage: FeeLock FeeLockMetadata (r:1 w:0) - // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: FeeLock FeeLockMetadataQeueuePosition (r:1 w:1) - // Proof: FeeLock FeeLockMetadataQeueuePosition (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: FeeLock UnlockQueue (r:1 w:1) - // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: `FeeLock::AccountFeeLockData` (r:1 w:1) + // Proof: `FeeLock::AccountFeeLockData` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `FeeLock::FeeLockMetadata` (r:1 w:0) + // Proof: `FeeLock::FeeLockMetadata` (`max_values`: Some(1), `max_size`: Some(438), added: 933, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `FeeLock::FeeLockMetadataQeueuePosition` (r:1 w:1) + // Proof: `FeeLock::FeeLockMetadataQeueuePosition` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + // Storage: `FeeLock::UnlockQueue` (r:1 w:1) + // Proof: `FeeLock::UnlockQueue` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn unlock_fee() -> Weight { - (Weight::from_parts(56_920_000, 0)) + (Weight::from_parts(52_860_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_issuance.rs b/runtime/mangata-kusama/src/weights/pallet_issuance.rs index c7f3821ac2..676fb87bf5 100644 --- a/runtime/mangata-kusama/src/weights/pallet_issuance.rs +++ b/runtime/mangata-kusama/src/weights/pallet_issuance.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_issuance //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -64,42 +64,42 @@ pub trait WeightInfo { /// Weights for pallet_issuance using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_issuance::WeightInfo for ModuleWeight { - // Storage: Issuance IssuanceConfigStore (r:1 w:1) - // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Issuance IsTGEFinalized (r:1 w:0) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Issuance::IssuanceConfigStore` (r:1 w:1) + // Proof: `Issuance::IssuanceConfigStore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:0) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_870_000, 0)) + (Weight::from_parts(25_240_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Issuance IsTGEFinalized (r:1 w:1) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:1) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalize_tge() -> Weight { - (Weight::from_parts(15_920_000, 0)) + (Weight::from_parts(15_000_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Issuance IsTGEFinalized (r:1 w:0) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:100 w:100) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Locks (r:100 w:100) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Issuance TGETotal (r:1 w:1) - // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:0) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:100 w:100) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:100 w:100) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:100 w:100) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:100 w:100) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Issuance::TGETotal` (r:1 w:1) + // Proof: `Issuance::TGETotal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(32_064_606, 0)) - // Standard Error: 26_264 - .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_711_551, 0)) + // Standard Error: 186_543 + .saturating_add((Weight::from_parts(84_103_494, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -109,42 +109,42 @@ impl pallet_issuance::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Issuance IssuanceConfigStore (r:1 w:1) - // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Issuance IsTGEFinalized (r:1 w:0) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Issuance::IssuanceConfigStore` (r:1 w:1) + // Proof: `Issuance::IssuanceConfigStore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:0) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_870_000, 0)) + (Weight::from_parts(25_240_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Issuance IsTGEFinalized (r:1 w:1) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:1) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalize_tge() -> Weight { - (Weight::from_parts(15_920_000, 0)) + (Weight::from_parts(15_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Issuance IsTGEFinalized (r:1 w:0) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:100 w:100) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Locks (r:100 w:100) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Issuance TGETotal (r:1 w:1) - // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:0) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:100 w:100) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:100 w:100) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:100 w:100) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:100 w:100) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Issuance::TGETotal` (r:1 w:1) + // Proof: `Issuance::TGETotal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(32_064_606, 0)) - // Standard Error: 26_264 - .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_711_551, 0)) + // Standard Error: 186_543 + .saturating_add((Weight::from_parts(84_103_494, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) diff --git a/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs b/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs index 4e536d93e4..f5a40317bf 100644 --- a/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs +++ b/runtime/mangata-kusama/src/weights/pallet_multipurpose_liquidity.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_multipurpose_liquidity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -63,35 +63,35 @@ pub trait WeightInfo { /// Weights for pallet_multipurpose_liquidity using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_multipurpose_liquidity::WeightInfo for ModuleWeight { - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::RelockStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::RelockStatus` (`max_values`: None, `max_size`: Some(1845), added: 4320, mode: `MaxEncodedLen`) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(130_870_000, 0)) + (Weight::from_parts(134_170_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: `MultiPurposeLiquidity::RelockStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::RelockStatus` (`max_values`: None, `max_size`: Some(1845), added: 4320, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(126_300_000, 0)) + (Weight::from_parts(115_390_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -99,35 +99,35 @@ impl pallet_multipurpose_liquidity::WeightInfo for Modu // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::RelockStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::RelockStatus` (`max_values`: None, `max_size`: Some(1845), added: 4320, mode: `MaxEncodedLen`) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(130_870_000, 0)) + (Weight::from_parts(134_170_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: `MultiPurposeLiquidity::RelockStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::RelockStatus` (`max_values`: None, `max_size`: Some(1845), added: 4320, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(126_300_000, 0)) + (Weight::from_parts(115_390_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs b/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs index 6aac9c8080..8f048650a6 100644 --- a/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs +++ b/runtime/mangata-kusama/src/weights/pallet_proof_of_stake.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_proof_of_stake //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -69,272 +69,276 @@ pub trait WeightInfo { /// Weights for pallet_proof_of_stake using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_proof_of_stake::WeightInfo for ModuleWeight { - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn claim_native_rewards() -> Weight { - (Weight::from_parts(86_750_000, 0)) + (Weight::from_parts(94_580_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:1) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_530_000, 0)) + (Weight::from_parts(17_030_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn activate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(100_109_000, 0)) + (Weight::from_parts(101_730_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:0) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn deactivate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(91_990_000, 0)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + (Weight::from_parts(101_190_000, 0)) + .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleId (r:1 w:1) - // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::SchedulesListMetadata` (r:1 w:1) + // Proof: `ProofOfStake::SchedulesListMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsSchedulesList` (r:1 w:2) + // Proof: `ProofOfStake::RewardsSchedulesList` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:0 w:1) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reward_pool() -> Weight { - (Weight::from_parts(179_050_000, 0)) + (Weight::from_parts(140_880_000, 0)) .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:0) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) fn activate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(120_360_000, 0)) - .saturating_add(T::DbWeight::get().reads(10 as u64)) + (Weight::from_parts(128_680_000, 0)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) - // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:0) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLiquidityForSchedules` (r:2 w:1) + // Proof: `ProofOfStake::ActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(125_160_000, 0)) + (Weight::from_parts(132_380_000, 0)) .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:0) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsTotal` (r:1 w:1) + // Proof: `ProofOfStake::ScheduleRewardsTotal` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn claim_3rdparty_rewards() -> Weight { - (Weight::from_parts(94_980_000, 0)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + (Weight::from_parts(130_960_000, 0)) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn claim_native_rewards() -> Weight { - (Weight::from_parts(86_750_000, 0)) + (Weight::from_parts(94_580_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:1) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_530_000, 0)) + (Weight::from_parts(17_030_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn activate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(100_109_000, 0)) + (Weight::from_parts(101_730_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:0) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn deactivate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(91_990_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) + (Weight::from_parts(101_190_000, 0)) + .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleId (r:1 w:1) - // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::SchedulesListMetadata` (r:1 w:1) + // Proof: `ProofOfStake::SchedulesListMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsSchedulesList` (r:1 w:2) + // Proof: `ProofOfStake::RewardsSchedulesList` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:0 w:1) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reward_pool() -> Weight { - (Weight::from_parts(179_050_000, 0)) + (Weight::from_parts(140_880_000, 0)) .saturating_add(RocksDbWeight::get().reads(9 as u64)) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:0) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) fn activate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(120_360_000, 0)) - .saturating_add(RocksDbWeight::get().reads(10 as u64)) + (Weight::from_parts(128_680_000, 0)) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) - // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:0) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLiquidityForSchedules` (r:2 w:1) + // Proof: `ProofOfStake::ActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(125_160_000, 0)) + (Weight::from_parts(132_380_000, 0)) .saturating_add(RocksDbWeight::get().reads(11 as u64)) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:0) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsTotal` (r:1 w:1) + // Proof: `ProofOfStake::ScheduleRewardsTotal` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn claim_3rdparty_rewards() -> Weight { - (Weight::from_parts(94_980_000, 0)) - .saturating_add(RocksDbWeight::get().reads(7 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + (Weight::from_parts(130_960_000, 0)) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } } diff --git a/runtime/mangata-kusama/src/weights/pallet_session.rs b/runtime/mangata-kusama/src/weights/pallet_session.rs index 3b9299b1a8..b9c3a66d7a 100644 --- a/runtime/mangata-kusama/src/weights/pallet_session.rs +++ b/runtime/mangata-kusama/src/weights/pallet_session.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -63,21 +63,21 @@ pub trait WeightInfo { /// Weights for pallet_session using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_session::WeightInfo for ModuleWeight { - // Storage: Session NextKeys (r:1 w:1) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Session KeyOwner (r:1 w:1) - // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + // Storage: `Session::NextKeys` (r:1 w:1) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::KeyOwner` (r:1 w:1) + // Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { - (Weight::from_parts(27_480_000, 0)) + (Weight::from_parts(28_000_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Session NextKeys (r:1 w:1) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Session KeyOwner (r:0 w:1) - // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + // Storage: `Session::NextKeys` (r:1 w:1) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::KeyOwner` (r:0 w:1) + // Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { - (Weight::from_parts(17_880_000, 0)) + (Weight::from_parts(17_750_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -85,21 +85,21 @@ impl pallet_session::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Session NextKeys (r:1 w:1) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Session KeyOwner (r:1 w:1) - // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + // Storage: `Session::NextKeys` (r:1 w:1) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::KeyOwner` (r:1 w:1) + // Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { - (Weight::from_parts(27_480_000, 0)) + (Weight::from_parts(28_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Session NextKeys (r:1 w:1) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Session KeyOwner (r:0 w:1) - // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + // Storage: `Session::NextKeys` (r:1 w:1) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::KeyOwner` (r:0 w:1) + // Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { - (Weight::from_parts(17_880_000, 0)) + (Weight::from_parts(17_750_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_timestamp.rs b/runtime/mangata-kusama/src/weights/pallet_timestamp.rs index a32d4dafb2..14a9eb72be 100644 --- a/runtime/mangata-kusama/src/weights/pallet_timestamp.rs +++ b/runtime/mangata-kusama/src/weights/pallet_timestamp.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -63,28 +63,28 @@ pub trait WeightInfo { /// Weights for pallet_timestamp using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_timestamp::WeightInfo for ModuleWeight { - // Storage: Timestamp Now (r:1 w:1) - // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + // Storage: `Timestamp::Now` (r:1 w:1) + // Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_350_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_220_000, 0)) + (Weight::from_parts(5_640_000, 0)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Timestamp Now (r:1 w:1) - // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + // Storage: `Timestamp::Now` (r:1 w:1) + // Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_350_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_220_000, 0)) + (Weight::from_parts(5_640_000, 0)) } } diff --git a/runtime/mangata-kusama/src/weights/pallet_treasury.rs b/runtime/mangata-kusama/src/weights/pallet_treasury.rs index 89616a60b5..08231f5480 100644 --- a/runtime/mangata-kusama/src/weights/pallet_treasury.rs +++ b/runtime/mangata-kusama/src/weights/pallet_treasury.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -68,62 +68,62 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_treasury::WeightInfo for ModuleWeight { fn spend() -> Weight { - (Weight::from_parts(530_000, 0)) + (Weight::from_parts(490_000, 0)) } - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury ProposalCount (r:1 w:1) - // Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Treasury Proposals (r:0 w:1) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::ProposalCount` (r:1 w:1) + // Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Treasury::Proposals` (r:0 w:1) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn propose_spend() -> Weight { - (Weight::from_parts(46_150_000, 0)) + (Weight::from_parts(42_860_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Treasury Proposals (r:1 w:1) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Treasury::Proposals` (r:1 w:1) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn reject_proposal() -> Weight { - (Weight::from_parts(52_520_000, 0)) + (Weight::from_parts(49_050_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Treasury Proposals (r:1 w:0) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + // Storage: `Treasury::Proposals` (r:1 w:0) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_564_531, 0)) - // Standard Error: 1_841 - .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_679_125, 0)) + // Standard Error: 2_153 + .saturating_add((Weight::from_parts(79_739, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { - (Weight::from_parts(12_011_000, 0)) + (Weight::from_parts(12_580_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury Deactivated (r:1 w:0) - // Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - // Storage: Treasury Proposals (r:100 w:0) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::Deactivated` (r:1 w:0) + // Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + // Storage: `Treasury::Proposals` (r:100 w:0) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(41_108_943, 0)) - // Standard Error: 7_113 - .saturating_add((Weight::from_parts(4_261_200, 0)).saturating_mul(p as u64)) + (Weight::from_parts(39_886_974, 0)) + // Standard Error: 12_844 + .saturating_add((Weight::from_parts(4_375_723, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -133,62 +133,62 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { fn spend() -> Weight { - (Weight::from_parts(530_000, 0)) + (Weight::from_parts(490_000, 0)) } - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury ProposalCount (r:1 w:1) - // Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Treasury Proposals (r:0 w:1) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::ProposalCount` (r:1 w:1) + // Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Treasury::Proposals` (r:0 w:1) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn propose_spend() -> Weight { - (Weight::from_parts(46_150_000, 0)) + (Weight::from_parts(42_860_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Treasury Proposals (r:1 w:1) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Treasury::Proposals` (r:1 w:1) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn reject_proposal() -> Weight { - (Weight::from_parts(52_520_000, 0)) + (Weight::from_parts(49_050_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Treasury Proposals (r:1 w:0) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + // Storage: `Treasury::Proposals` (r:1 w:0) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_564_531, 0)) - // Standard Error: 1_841 - .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_679_125, 0)) + // Standard Error: 2_153 + .saturating_add((Weight::from_parts(79_739, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { - (Weight::from_parts(12_011_000, 0)) + (Weight::from_parts(12_580_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury Deactivated (r:1 w:0) - // Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - // Storage: Treasury Proposals (r:100 w:0) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::Deactivated` (r:1 w:0) + // Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + // Storage: `Treasury::Proposals` (r:100 w:0) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(41_108_943, 0)) - // Standard Error: 7_113 - .saturating_add((Weight::from_parts(4_261_200, 0)).saturating_mul(p as u64)) + (Weight::from_parts(39_886_974, 0)) + // Standard Error: 12_844 + .saturating_add((Weight::from_parts(4_375_723, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) diff --git a/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs b/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs index 933c8abfba..ab1c2d730b 100644 --- a/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs +++ b/runtime/mangata-kusama/src/weights/pallet_utility_mangata.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_utility_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -67,49 +67,49 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_utility_mangata::WeightInfo for ModuleWeight { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(9_547_364, 0)) - // Standard Error: 3_907 - .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_549_165, 0)) + // Standard Error: 21_923 + .saturating_add((Weight::from_parts(9_941_900, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_100_000, 0)) + (Weight::from_parts(9_530_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(9_586_041, 0)) - // Standard Error: 3_411 - .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) + (Weight::from_parts(65_951_534, 0)) + // Standard Error: 21_524 + .saturating_add((Weight::from_parts(10_171_670, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(17_000_000, 0)) + (Weight::from_parts(15_020_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(13_747_173, 0)) - // Standard Error: 3_163 - .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) + (Weight::from_parts(10_184_050, 0)) + // Standard Error: 19_026 + .saturating_add((Weight::from_parts(9_809_616, 0)).saturating_mul(c as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(9_547_364, 0)) - // Standard Error: 3_907 - .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_549_165, 0)) + // Standard Error: 21_923 + .saturating_add((Weight::from_parts(9_941_900, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_100_000, 0)) + (Weight::from_parts(9_530_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(9_586_041, 0)) - // Standard Error: 3_411 - .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) + (Weight::from_parts(65_951_534, 0)) + // Standard Error: 21_524 + .saturating_add((Weight::from_parts(10_171_670, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(17_000_000, 0)) + (Weight::from_parts(15_020_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(13_747_173, 0)) - // Standard Error: 3_163 - .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) + (Weight::from_parts(10_184_050, 0)) + // Standard Error: 19_026 + .saturating_add((Weight::from_parts(9_809_616, 0)).saturating_mul(c as u64)) } } diff --git a/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs b/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs index 1c975632c9..8823347a8f 100644 --- a/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs +++ b/runtime/mangata-kusama/src/weights/pallet_vesting_mangata.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_vesting_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -68,98 +68,98 @@ pub trait WeightInfo { /// Weights for pallet_vesting_mangata using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_vesting_mangata::WeightInfo for ModuleWeight { - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_243_152, 0)) - // Standard Error: 7_939 - .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_037_878, 0)) + // Standard Error: 9_285 + .saturating_add((Weight::from_parts(189_118, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(73_252_114, 0)) - // Standard Error: 3_434 - .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) + (Weight::from_parts(69_031_270, 0)) + // Standard Error: 6_823 + .saturating_add((Weight::from_parts(81_042, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_977_339, 0)) - // Standard Error: 7_858 - .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_418_107, 0)) + // Standard Error: 8_402 + .saturating_add((Weight::from_parts(191_408, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(72_574_520, 0)) - // Standard Error: 3_250 - .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) + (Weight::from_parts(69_183_201, 0)) + // Standard Error: 7_105 + .saturating_add((Weight::from_parts(101_627, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:0) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:0) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(88_550_017, 0)) - // Standard Error: 13_455 - .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) + (Weight::from_parts(86_734_759, 0)) + // Standard Error: 14_469 + .saturating_add((Weight::from_parts(289_455, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_212_340, 0)) - // Standard Error: 8_032 - .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) + (Weight::from_parts(55_379_787, 0)) + // Standard Error: 8_568 + .saturating_add((Weight::from_parts(182_811, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_783_090, 0)) - // Standard Error: 13_737 - .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_037_972, 0)) + // Standard Error: 14_559 + .saturating_add((Weight::from_parts(297_864, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -167,98 +167,98 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_243_152, 0)) - // Standard Error: 7_939 - .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_037_878, 0)) + // Standard Error: 9_285 + .saturating_add((Weight::from_parts(189_118, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(73_252_114, 0)) - // Standard Error: 3_434 - .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) + (Weight::from_parts(69_031_270, 0)) + // Standard Error: 6_823 + .saturating_add((Weight::from_parts(81_042, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_977_339, 0)) - // Standard Error: 7_858 - .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_418_107, 0)) + // Standard Error: 8_402 + .saturating_add((Weight::from_parts(191_408, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(72_574_520, 0)) - // Standard Error: 3_250 - .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) + (Weight::from_parts(69_183_201, 0)) + // Standard Error: 7_105 + .saturating_add((Weight::from_parts(101_627, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:0) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:0) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(88_550_017, 0)) - // Standard Error: 13_455 - .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) + (Weight::from_parts(86_734_759, 0)) + // Standard Error: 14_469 + .saturating_add((Weight::from_parts(289_455, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_212_340, 0)) - // Standard Error: 8_032 - .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) + (Weight::from_parts(55_379_787, 0)) + // Standard Error: 8_568 + .saturating_add((Weight::from_parts(182_811, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_783_090, 0)) - // Standard Error: 13_737 - .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_037_972, 0)) + // Standard Error: 14_559 + .saturating_add((Weight::from_parts(297_864, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/pallet_xyk.rs b/runtime/mangata-kusama/src/weights/pallet_xyk.rs index c1f831ff19..9e0e7acb53 100644 --- a/runtime/mangata-kusama/src/weights/pallet_xyk.rs +++ b/runtime/mangata-kusama/src/weights/pallet_xyk.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_xyk //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -71,235 +71,237 @@ pub trait WeightInfo { /// Weights for pallet_xyk using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_xyk::WeightInfo for ModuleWeight { - // Storage: AssetRegistry Metadata (r:3 w:1) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk Pools (r:2 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:1) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:0 w:1) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: `AssetRegistry::Metadata` (r:3 w:1) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::Pools` (r:2 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:1) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:0 w:1) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityPools` (r:0 w:1) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) fn create_pool() -> Weight { - (Weight::from_parts(202_790_000, 0)) + (Weight::from_parts(206_040_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:3 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:6 w:6) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:3 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:6 w:6) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn sell_asset() -> Weight { - (Weight::from_parts(244_940_000, 0)) + (Weight::from_parts(243_550_000, 0)) .saturating_add(T::DbWeight::get().reads(16 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:99 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:100 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:100 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk Pools (r:297 w:198) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:400 w:400) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:99 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:100 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:100 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:297 w:198) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:400 w:400) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(661_629_000, 0)) - // Standard Error: 425_962 - .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + (Weight::from_parts(628_100_000, 0)) + // Standard Error: 450_557 + .saturating_add((Weight::from_parts(274_044_457, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(29 as u64)) .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:4 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:6 w:6) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:4 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:6 w:6) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn buy_asset() -> Weight { - (Weight::from_parts(253_260_000, 0)) + (Weight::from_parts(261_921_000, 0)) .saturating_add(T::DbWeight::get().reads(18 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:100 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:99 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:100 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:297 w:198) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:400 w:400) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:100 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:99 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:100 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:297 w:198) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:400 w:400) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(691_040_000, 0)) - // Standard Error: 480_931 - .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + (Weight::from_parts(699_390_000, 0)) + // Standard Error: 516_256 + .saturating_add((Weight::from_parts(290_225_626, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(29 as u64)) .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn mint_liquidity() -> Weight { - (Weight::from_parts(241_610_000, 0)) + (Weight::from_parts(246_950_000, 0)) .saturating_add(T::DbWeight::get().reads(15 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:2 w:2) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:2 w:2) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:2 w:2) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:2 w:2) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(277_529_000, 0)) + (Weight::from_parts(284_941_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:0) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn burn_liquidity() -> Weight { - (Weight::from_parts(223_960_000, 0)) - .saturating_add(T::DbWeight::get().reads(14 as u64)) + (Weight::from_parts(223_050_000, 0)) + .saturating_add(T::DbWeight::get().reads(15 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:4 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:7 w:7) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:4 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:7 w:7) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(386_749_000, 0)) + (Weight::from_parts(394_410_000, 0)) .saturating_add(T::DbWeight::get().reads(22 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:8 w:8) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:2 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:8 w:8) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:2 w:2) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:2 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn compound_rewards() -> Weight { - (Weight::from_parts(546_000_000, 0)) + (Weight::from_parts(543_550_000, 0)) .saturating_add(T::DbWeight::get().reads(25 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } @@ -307,235 +309,237 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: AssetRegistry Metadata (r:3 w:1) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk Pools (r:2 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:1) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:0 w:1) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: `AssetRegistry::Metadata` (r:3 w:1) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::Pools` (r:2 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:1) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:0 w:1) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityPools` (r:0 w:1) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) fn create_pool() -> Weight { - (Weight::from_parts(202_790_000, 0)) + (Weight::from_parts(206_040_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(12 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:3 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:6 w:6) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:3 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:6 w:6) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn sell_asset() -> Weight { - (Weight::from_parts(244_940_000, 0)) + (Weight::from_parts(243_550_000, 0)) .saturating_add(RocksDbWeight::get().reads(16 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:99 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:100 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:100 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk Pools (r:297 w:198) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:400 w:400) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:99 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:100 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:100 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:297 w:198) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:400 w:400) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(661_629_000, 0)) - // Standard Error: 425_962 - .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + (Weight::from_parts(628_100_000, 0)) + // Standard Error: 450_557 + .saturating_add((Weight::from_parts(274_044_457, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(29 as u64)) .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:4 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:6 w:6) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:4 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:6 w:6) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn buy_asset() -> Weight { - (Weight::from_parts(253_260_000, 0)) + (Weight::from_parts(261_921_000, 0)) .saturating_add(RocksDbWeight::get().reads(18 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:100 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:99 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:100 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:297 w:198) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:400 w:400) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:100 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:99 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:100 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:297 w:198) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:400 w:400) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(691_040_000, 0)) - // Standard Error: 480_931 - .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + (Weight::from_parts(699_390_000, 0)) + // Standard Error: 516_256 + .saturating_add((Weight::from_parts(290_225_626, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(29 as u64)) .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn mint_liquidity() -> Weight { - (Weight::from_parts(241_610_000, 0)) + (Weight::from_parts(246_950_000, 0)) .saturating_add(RocksDbWeight::get().reads(15 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:2 w:2) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:2 w:2) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:2 w:2) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:2 w:2) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(277_529_000, 0)) + (Weight::from_parts(284_941_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:0) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn burn_liquidity() -> Weight { - (Weight::from_parts(223_960_000, 0)) - .saturating_add(RocksDbWeight::get().reads(14 as u64)) + (Weight::from_parts(223_050_000, 0)) + .saturating_add(RocksDbWeight::get().reads(15 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:4 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:7 w:7) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:4 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:7 w:7) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(386_749_000, 0)) + (Weight::from_parts(394_410_000, 0)) .saturating_add(RocksDbWeight::get().reads(22 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:8 w:8) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:2 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:8 w:8) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:2 w:2) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:2 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn compound_rewards() -> Weight { - (Weight::from_parts(546_000_000, 0)) + (Weight::from_parts(543_550_000, 0)) .saturating_add(RocksDbWeight::get().reads(25 as u64)) .saturating_add(RocksDbWeight::get().writes(16 as u64)) } diff --git a/runtime/mangata-kusama/src/weights/parachain_staking.rs b/runtime/mangata-kusama/src/weights/parachain_staking.rs index aa9ad00b32..bac93023e0 100644 --- a/runtime/mangata-kusama/src/weights/parachain_staking.rs +++ b/runtime/mangata-kusama/src/weights/parachain_staking.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for parachain_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -96,1030 +96,1022 @@ pub trait WeightInfo { /// Weights for parachain_staking using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl parachain_staking::WeightInfo for ModuleWeight { - // Storage: ParachainStaking TotalSelected (r:1 w:1) - // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::TotalSelected` (r:1 w:1) + // Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_total_selected() -> Weight { - (Weight::from_parts(18_150_000, 0)) + (Weight::from_parts(18_870_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CollatorCommission (r:1 w:1) - // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CollatorCommission` (r:1 w:1) + // Proof: `ParachainStaking::CollatorCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_530_000, 0)) + (Weight::from_parts(18_720_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:1 w:0) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:0) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:0) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:0) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:0) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(128_769_592, 0)) - // Standard Error: 5_183 - .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) - // Standard Error: 5_120 - .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) + (Weight::from_parts(130_382_781, 0)) + // Standard Error: 6_193 + .saturating_add((Weight::from_parts(115_219, 0)).saturating_mul(x as u64)) + // Standard Error: 6_117 + .saturating_add((Weight::from_parts(207_374, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(40_966_197, 0)) - // Standard Error: 1_766 - .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_947_760, 0)) + // Standard Error: 1_971 + .saturating_add((Weight::from_parts(125_665, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:30 w:30) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:29 w:29) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:30 w:30) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:30 w:30) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::DelegatorState` (r:29 w:29) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:0) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(61_759_888, 0)) - // Standard Error: 25_405 - .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) + (Weight::from_parts(70_829_514, 0)) + // Standard Error: 37_509 + .saturating_add((Weight::from_parts(31_438_101, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(x as u64))) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_197_562, 0)) - // Standard Error: 1_699 - .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_042_058, 0)) + // Standard Error: 1_850 + .saturating_add((Weight::from_parts(121_294, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_offline() -> Weight { - (Weight::from_parts(39_200_000, 0)) + (Weight::from_parts(38_830_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_online() -> Weight { - (Weight::from_parts(38_610_000, 0)) + (Weight::from_parts(38_480_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:0) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:0) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(56_000_000, 0)) + (Weight::from_parts(55_820_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_740_000, 0)) + (Weight::from_parts(58_110_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(90_910_000, 0)) + (Weight::from_parts(93_820_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(87_720_000, 0)) + (Weight::from_parts(90_010_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(30_420_000, 0)) + (Weight::from_parts(30_160_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_860_000, 0)) + (Weight::from_parts(29_260_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking AggregatorMetadata (r:1 w:0) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:0) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(127_734_458, 0)) - // Standard Error: 7_698 - .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) - // Standard Error: 7_439 - .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) + (Weight::from_parts(131_821_406, 0)) + // Standard Error: 12_029 + .saturating_add((Weight::from_parts(301_209, 0)).saturating_mul(x as u64)) + // Standard Error: 11_624 + .saturating_add((Weight::from_parts(224_017, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(33_410_000, 0)) + (Weight::from_parts(32_940_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:29 w:29) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:29 w:29) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_848_761, 0)) - // Standard Error: 26_767 - .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) + (Weight::from_parts(26_832_067, 0)) + // Standard Error: 59_764 + .saturating_add((Weight::from_parts(38_917_836, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(x as u64))) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(31_130_000, 0)) + (Weight::from_parts(30_051_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(34_070_000, 0)) + (Weight::from_parts(33_500_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:0) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:0) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_650_000, 0)) + (Weight::from_parts(56_461_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(34_280_000, 0)) + (Weight::from_parts(33_200_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(111_770_000, 0)) + (Weight::from_parts(114_090_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(103_940_000, 0)) + (Weight::from_parts(110_800_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(99_690_000, 0)) + (Weight::from_parts(104_330_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(31_370_000, 0)) + (Weight::from_parts(31_231_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_290_000, 0)) + (Weight::from_parts(38_000_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_540_000, 0)) + (Weight::from_parts(38_200_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_340_872, 0)) - // Standard Error: 2_236 - .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_650_335, 0)) + // Standard Error: 2_597 + .saturating_add((Weight::from_parts(191_843, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_686_950, 0)) - // Standard Error: 1_638 - .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) + (Weight::from_parts(21_308_475, 0)) + // Standard Error: 2_044 + .saturating_add((Weight::from_parts(166_169, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:99 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:1 w:1) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:99 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:0) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:1) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:1) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(1_946_910_000, 0)) + (Weight::from_parts(1_823_320_000, 0)) .saturating_add(T::DbWeight::get().reads(102 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:1) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:2 w:2) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(122_120_000, 0)) + (Weight::from_parts(116_050_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:32 w:32) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:32 w:31) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:2 w:1) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:32 w:32) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:32 w:31) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(1_493_000_000, 0)) + (Weight::from_parts(1_509_570_000, 0)) .saturating_add(T::DbWeight::get().reads(66 as u64)) .saturating_add(T::DbWeight::get().writes(64 as u64)) } - // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:1 w:1) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(87_790_000, 0)) + (Weight::from_parts(83_300_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn passive_session_change() -> Weight { - (Weight::from_parts(7_670_000, 0)) + (Weight::from_parts(7_830_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // Storage: ParachainStaking Round (r:1 w:1) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session CurrentIndex (r:1 w:1) - // Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session QueuedChanged (r:1 w:1) - // Proof Skipped: Session QueuedChanged (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session QueuedKeys (r:1 w:1) - // Proof Skipped: Session QueuedKeys (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session DisabledValidators (r:1 w:0) - // Proof Skipped: Session DisabledValidators (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Points (r:1 w:1) - // Proof Skipped: ParachainStaking Points (max_values: None, max_size: None, mode: Measured) - // Storage: Issuance SessionIssuance (r:1 w:1) - // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) - // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:52 w:51) - // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:51 w:102) - // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CollatorCommission (r:1 w:0) - // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:100 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:100 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:101 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:0) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:51 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: Issuance IssuanceConfigStore (r:1 w:0) - // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsSchedules (r:1 w:0) - // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:51 w:0) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Aura Authorities (r:1 w:0) - // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) - // Storage: ParachainStaking SelectedCandidates (r:0 w:1) - // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Session Validators (r:0 w:1) - // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::Round` (r:1 w:1) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::CurrentIndex` (r:1 w:1) + // Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::QueuedChanged` (r:1 w:1) + // Proof: `Session::QueuedChanged` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::QueuedKeys` (r:1 w:1) + // Proof: `Session::QueuedKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::DisabledValidators` (r:1 w:0) + // Proof: `Session::DisabledValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Points` (r:1 w:1) + // Proof: `ParachainStaking::Points` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Issuance::SessionIssuance` (r:1 w:1) + // Proof: `Issuance::SessionIssuance` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::RoundAggregatorInfo` (r:1 w:2) + // Proof: `ParachainStaking::RoundAggregatorInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AwardedPts` (r:52 w:51) + // Proof: `ParachainStaking::AwardedPts` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AtStake` (r:51 w:102) + // Proof: `ParachainStaking::AtStake` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CollatorCommission` (r:1 w:0) + // Proof: `ParachainStaking::CollatorCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:100 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:100 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:101 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:0) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:0) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::TotalSelected` (r:1 w:0) + // Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:51 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Issuance::IssuanceConfigStore` (r:1 w:0) + // Proof: `Issuance::IssuanceConfigStore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:1) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:100 w:0) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Session::NextKeys` (r:51 w:0) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Aura::Authorities` (r:1 w:0) + // Proof: `Aura::Authorities` (`max_values`: Some(1), `max_size`: Some(3200004), added: 3200499, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::SelectedCandidates` (r:0 w:1) + // Proof: `ParachainStaking::SelectedCandidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:0 w:51) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::Validators` (r:0 w:1) + // Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(1_634_783_507, 0)) - // Standard Error: 32_199 - .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) - // Standard Error: 66_033 - .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) - // Standard Error: 114_378 - .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(226 as u64)) + (Weight::from_parts(1_800_080_164, 0)) + // Standard Error: 52_977 + .saturating_add((Weight::from_parts(19_522_895, 0)).saturating_mul(x as u64)) + // Standard Error: 108_644 + .saturating_add((Weight::from_parts(7_314_007, 0)).saturating_mul(y as u64)) + // Standard Error: 188_185 + .saturating_add((Weight::from_parts(46_450_704, 0)).saturating_mul(z as u64)) + .saturating_add(T::DbWeight::get().reads(224 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(220 as u64)) + .saturating_add(T::DbWeight::get().writes(219 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: ParachainStaking TotalSelected (r:1 w:1) - // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::TotalSelected` (r:1 w:1) + // Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_total_selected() -> Weight { - (Weight::from_parts(18_150_000, 0)) + (Weight::from_parts(18_870_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CollatorCommission (r:1 w:1) - // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CollatorCommission` (r:1 w:1) + // Proof: `ParachainStaking::CollatorCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_530_000, 0)) + (Weight::from_parts(18_720_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:1 w:0) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:0) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:0) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:0) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:0) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(128_769_592, 0)) - // Standard Error: 5_183 - .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) - // Standard Error: 5_120 - .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) + (Weight::from_parts(130_382_781, 0)) + // Standard Error: 6_193 + .saturating_add((Weight::from_parts(115_219, 0)).saturating_mul(x as u64)) + // Standard Error: 6_117 + .saturating_add((Weight::from_parts(207_374, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(40_966_197, 0)) - // Standard Error: 1_766 - .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_947_760, 0)) + // Standard Error: 1_971 + .saturating_add((Weight::from_parts(125_665, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:30 w:30) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:29 w:29) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:30 w:30) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:30 w:30) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::DelegatorState` (r:29 w:29) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:0) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(61_759_888, 0)) - // Standard Error: 25_405 - .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) + (Weight::from_parts(70_829_514, 0)) + // Standard Error: 37_509 + .saturating_add((Weight::from_parts(31_438_101, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(x as u64))) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_197_562, 0)) - // Standard Error: 1_699 - .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_042_058, 0)) + // Standard Error: 1_850 + .saturating_add((Weight::from_parts(121_294, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_offline() -> Weight { - (Weight::from_parts(39_200_000, 0)) + (Weight::from_parts(38_830_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_online() -> Weight { - (Weight::from_parts(38_610_000, 0)) + (Weight::from_parts(38_480_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:0) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:0) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(56_000_000, 0)) + (Weight::from_parts(55_820_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_740_000, 0)) + (Weight::from_parts(58_110_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(90_910_000, 0)) + (Weight::from_parts(93_820_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(87_720_000, 0)) + (Weight::from_parts(90_010_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(30_420_000, 0)) + (Weight::from_parts(30_160_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_860_000, 0)) + (Weight::from_parts(29_260_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking AggregatorMetadata (r:1 w:0) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:0) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(127_734_458, 0)) - // Standard Error: 7_698 - .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) - // Standard Error: 7_439 - .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) + (Weight::from_parts(131_821_406, 0)) + // Standard Error: 12_029 + .saturating_add((Weight::from_parts(301_209, 0)).saturating_mul(x as u64)) + // Standard Error: 11_624 + .saturating_add((Weight::from_parts(224_017, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(33_410_000, 0)) + (Weight::from_parts(32_940_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:29 w:29) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:29 w:29) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_848_761, 0)) - // Standard Error: 26_767 - .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) + (Weight::from_parts(26_832_067, 0)) + // Standard Error: 59_764 + .saturating_add((Weight::from_parts(38_917_836, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(4 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(x as u64))) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(31_130_000, 0)) + (Weight::from_parts(30_051_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(34_070_000, 0)) + (Weight::from_parts(33_500_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:0) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:0) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_650_000, 0)) + (Weight::from_parts(56_461_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(34_280_000, 0)) + (Weight::from_parts(33_200_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(111_770_000, 0)) + (Weight::from_parts(114_090_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(103_940_000, 0)) + (Weight::from_parts(110_800_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(99_690_000, 0)) + (Weight::from_parts(104_330_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(31_370_000, 0)) + (Weight::from_parts(31_231_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_290_000, 0)) + (Weight::from_parts(38_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_540_000, 0)) + (Weight::from_parts(38_200_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_340_872, 0)) - // Standard Error: 2_236 - .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_650_335, 0)) + // Standard Error: 2_597 + .saturating_add((Weight::from_parts(191_843, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_686_950, 0)) - // Standard Error: 1_638 - .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) + (Weight::from_parts(21_308_475, 0)) + // Standard Error: 2_044 + .saturating_add((Weight::from_parts(166_169, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:99 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:1 w:1) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:99 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:0) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:1) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:1) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(1_946_910_000, 0)) + (Weight::from_parts(1_823_320_000, 0)) .saturating_add(RocksDbWeight::get().reads(102 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:1) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:2 w:2) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(122_120_000, 0)) + (Weight::from_parts(116_050_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:32 w:32) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:32 w:31) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:2 w:1) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:32 w:32) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:32 w:31) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(1_493_000_000, 0)) + (Weight::from_parts(1_509_570_000, 0)) .saturating_add(RocksDbWeight::get().reads(66 as u64)) .saturating_add(RocksDbWeight::get().writes(64 as u64)) } - // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:1 w:1) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(87_790_000, 0)) + (Weight::from_parts(83_300_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn passive_session_change() -> Weight { - (Weight::from_parts(7_670_000, 0)) + (Weight::from_parts(7_830_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } - // Storage: ParachainStaking Round (r:1 w:1) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session CurrentIndex (r:1 w:1) - // Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session QueuedChanged (r:1 w:1) - // Proof Skipped: Session QueuedChanged (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session QueuedKeys (r:1 w:1) - // Proof Skipped: Session QueuedKeys (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session DisabledValidators (r:1 w:0) - // Proof Skipped: Session DisabledValidators (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Points (r:1 w:1) - // Proof Skipped: ParachainStaking Points (max_values: None, max_size: None, mode: Measured) - // Storage: Issuance SessionIssuance (r:1 w:1) - // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) - // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:52 w:51) - // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:51 w:102) - // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CollatorCommission (r:1 w:0) - // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:100 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:100 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:101 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:0) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:51 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: Issuance IssuanceConfigStore (r:1 w:0) - // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsSchedules (r:1 w:0) - // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:51 w:0) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Aura Authorities (r:1 w:0) - // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) - // Storage: ParachainStaking SelectedCandidates (r:0 w:1) - // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Session Validators (r:0 w:1) - // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::Round` (r:1 w:1) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::CurrentIndex` (r:1 w:1) + // Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::QueuedChanged` (r:1 w:1) + // Proof: `Session::QueuedChanged` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::QueuedKeys` (r:1 w:1) + // Proof: `Session::QueuedKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::DisabledValidators` (r:1 w:0) + // Proof: `Session::DisabledValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Points` (r:1 w:1) + // Proof: `ParachainStaking::Points` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Issuance::SessionIssuance` (r:1 w:1) + // Proof: `Issuance::SessionIssuance` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::RoundAggregatorInfo` (r:1 w:2) + // Proof: `ParachainStaking::RoundAggregatorInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AwardedPts` (r:52 w:51) + // Proof: `ParachainStaking::AwardedPts` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AtStake` (r:51 w:102) + // Proof: `ParachainStaking::AtStake` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CollatorCommission` (r:1 w:0) + // Proof: `ParachainStaking::CollatorCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:100 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:100 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:101 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:0) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:0) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::TotalSelected` (r:1 w:0) + // Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:51 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Issuance::IssuanceConfigStore` (r:1 w:0) + // Proof: `Issuance::IssuanceConfigStore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:1) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:100 w:0) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Session::NextKeys` (r:51 w:0) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Aura::Authorities` (r:1 w:0) + // Proof: `Aura::Authorities` (`max_values`: Some(1), `max_size`: Some(3200004), added: 3200499, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::SelectedCandidates` (r:0 w:1) + // Proof: `ParachainStaking::SelectedCandidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:0 w:51) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::Validators` (r:0 w:1) + // Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(1_634_783_507, 0)) - // Standard Error: 32_199 - .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) - // Standard Error: 66_033 - .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) - // Standard Error: 114_378 - .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) - .saturating_add(RocksDbWeight::get().reads(226 as u64)) + (Weight::from_parts(1_800_080_164, 0)) + // Standard Error: 52_977 + .saturating_add((Weight::from_parts(19_522_895, 0)).saturating_mul(x as u64)) + // Standard Error: 108_644 + .saturating_add((Weight::from_parts(7_314_007, 0)).saturating_mul(y as u64)) + // Standard Error: 188_185 + .saturating_add((Weight::from_parts(46_450_704, 0)).saturating_mul(z as u64)) + .saturating_add(RocksDbWeight::get().reads(224 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(220 as u64)) + .saturating_add(RocksDbWeight::get().writes(219 as u64)) } } diff --git a/runtime/mangata-rococo/src/weights/block_weights.rs b/runtime/mangata-rococo/src/weights/block_weights.rs index 6d27c66767..453ca090b8 100644 --- a/runtime/mangata-rococo/src/weights/block_weights.rs +++ b/runtime/mangata-rococo/src/weights/block_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02 (Y/M/D) -//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-11-20 (Y/M/D) +//! HOSTNAME: `684038c95a2b`, CPU: `AMD EPYC 7B12` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -14,7 +14,7 @@ // --execution // native // --chain -// kusama-local +// mangata-kusama-local // -lblock_builder=debug // --max-ext-per-block // 50000 @@ -29,17 +29,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 7_983_500, 8_609_050 - /// Average: 8_057_882 - /// Median: 8_023_430 - /// Std-Dev: 118109.32 + /// Min, Max: 30_753_089, 35_201_220 + /// Average: 32_433_544 + /// Median: 32_374_100 + /// Std-Dev: 874589.44 /// /// Percentiles nanoseconds: - /// 99th: 8_567_140 - /// 95th: 8_382_280 - /// 75th: 8_036_000 + /// 99th: 34_758_140 + /// 95th: 33_863_539 + /// 75th: 32_883_169 pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(8_057_882), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(32_433_544), 0); } #[cfg(test)] diff --git a/runtime/mangata-rococo/src/weights/extrinsic_weights.rs b/runtime/mangata-rococo/src/weights/extrinsic_weights.rs index ddceb8ee70..8ee78142f6 100644 --- a/runtime/mangata-rococo/src/weights/extrinsic_weights.rs +++ b/runtime/mangata-rococo/src/weights/extrinsic_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02 (Y/M/D) -//! HOSTNAME: `4f854f261503`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-11-20 (Y/M/D) +//! HOSTNAME: `684038c95a2b`, CPU: `AMD EPYC 7B12` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Mangata Kusama Local` //! WARMUPS: `10`, REPEAT: `100` @@ -14,7 +14,7 @@ // --execution // native // --chain -// kusama-local +// mangata-kusama-local // -lblock_builder=debug // --max-ext-per-block // 50000 @@ -29,17 +29,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 116_665, 118_803 - /// Average: 117_078 - /// Median: 117_010 - /// Std-Dev: 306.32 + /// Min, Max: 188_900, 204_340 + /// Average: 196_710 + /// Median: 196_855 + /// Std-Dev: 3080.34 /// /// Percentiles nanoseconds: - /// 99th: 118_109 - /// 95th: 117_513 - /// 75th: 117_236 + /// 99th: 203_409 + /// 95th: 200_933 + /// 75th: 199_160 pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(117_078), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(196_710), 0); } #[cfg(test)] diff --git a/runtime/mangata-rococo/src/weights/frame_system.rs b/runtime/mangata-rococo/src/weights/frame_system.rs index b74e371128..c523803c6e 100644 --- a/runtime/mangata-rococo/src/weights/frame_system.rs +++ b/runtime/mangata-rococo/src/weights/frame_system.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -59,6 +59,7 @@ pub trait WeightInfo { fn remark(b: u32, ) -> Weight; fn remark_with_event(b: u32, ) -> Weight; fn set_heap_pages() -> Weight; + fn set_code() -> Weight; fn set_storage(i: u32, ) -> Weight; fn kill_storage(i: u32, ) -> Weight; fn kill_prefix(p: u32, ) -> Weight; @@ -68,98 +69,132 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl frame_system::WeightInfo for ModuleWeight { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(9_964_525, 0)) - // Standard Error: 0 - .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) + (Weight::from_parts(104_149_921, 0)) + // Standard Error: 10 + .saturating_add((Weight::from_parts(342, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(29_205_376, 0)) - // Standard Error: 0 - .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) + (Weight::from_parts(36_476_892, 0)) + // Standard Error: 1 + .saturating_add((Weight::from_parts(1_578, 0)).saturating_mul(b as u64)) } - // Storage: System Digest (r:1 w:1) - // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - // Storage: unknown `0x3a686561707061676573` (r:0 w:1) - // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + // Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_610_000, 0)) + (Weight::from_parts(7_260_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainSystem::ValidationData` (r:1 w:0) + // Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::UpgradeRestrictionSignal` (r:1 w:0) + // Proof: `ParachainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::PendingValidationCode` (r:1 w:1) + // Proof: `ParachainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::NewValidationCode` (r:0 w:1) + // Proof: `ParachainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::DidSetValidationCode` (r:0 w:1) + // Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_code() -> Weight { + (Weight::from_parts(163_229_366_000, 0)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_160_000, 0)) - // Standard Error: 2_435 - .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) + (Weight::from_parts(3_940_000, 0)) + // Standard Error: 2_890 + .saturating_add((Weight::from_parts(1_342_924, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_090_000, 0)) - // Standard Error: 1_110 - .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_040_000, 0)) + // Standard Error: 1_224 + .saturating_add((Weight::from_parts(915_962, 0)).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_640_000, 0)) - // Standard Error: 1_374 - .saturating_add((Weight::from_parts(1_459_706, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_650_000, 0)) + // Standard Error: 1_634 + .saturating_add((Weight::from_parts(1_599_167, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } - - fn set_code() -> Weight { - Weight::from_parts(0, 0) - } } // For backwards compatibility and tests impl WeightInfo for () { fn remark(b: u32, ) -> Weight { - (Weight::from_parts(9_964_525, 0)) - // Standard Error: 0 - .saturating_add((Weight::from_parts(589, 0)).saturating_mul(b as u64)) + (Weight::from_parts(104_149_921, 0)) + // Standard Error: 10 + .saturating_add((Weight::from_parts(342, 0)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (Weight::from_parts(29_205_376, 0)) - // Standard Error: 0 - .saturating_add((Weight::from_parts(1_778, 0)).saturating_mul(b as u64)) + (Weight::from_parts(36_476_892, 0)) + // Standard Error: 1 + .saturating_add((Weight::from_parts(1_578, 0)).saturating_mul(b as u64)) } - // Storage: System Digest (r:1 w:1) - // Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - // Storage: unknown `0x3a686561707061676573` (r:0 w:1) - // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) + // Storage: `System::Digest` (r:1 w:1) + // Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + // Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - (Weight::from_parts(7_610_000, 0)) + (Weight::from_parts(7_260_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainSystem::ValidationData` (r:1 w:0) + // Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::UpgradeRestrictionSignal` (r:1 w:0) + // Proof: `ParachainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `ParachainSystem::PendingValidationCode` (r:1 w:1) + // Proof: `ParachainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + // Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::NewValidationCode` (r:0 w:1) + // Proof: `ParachainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainSystem::DidSetValidationCode` (r:0 w:1) + // Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_code() -> Weight { + (Weight::from_parts(163_229_366_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) + } + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_160_000, 0)) - // Standard Error: 2_435 - .saturating_add((Weight::from_parts(1_226_647, 0)).saturating_mul(i as u64)) + (Weight::from_parts(3_940_000, 0)) + // Standard Error: 2_890 + .saturating_add((Weight::from_parts(1_342_924, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn kill_storage(i: u32, ) -> Weight { - (Weight::from_parts(4_090_000, 0)) - // Standard Error: 1_110 - .saturating_add((Weight::from_parts(840_132, 0)).saturating_mul(i as u64)) + (Weight::from_parts(4_040_000, 0)) + // Standard Error: 1_224 + .saturating_add((Weight::from_parts(915_962, 0)).saturating_mul(i as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } - // Storage: Skipped Metadata (r:0 w:0) - // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + // Storage: `Skipped::Metadata` (r:0 w:0) + // Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn kill_prefix(p: u32, ) -> Weight { - (Weight::from_parts(7_640_000, 0)) - // Standard Error: 1_374 - .saturating_add((Weight::from_parts(1_459_706, 0)).saturating_mul(p as u64)) + (Weight::from_parts(7_650_000, 0)) + // Standard Error: 1_634 + .saturating_add((Weight::from_parts(1_599_167, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } diff --git a/runtime/mangata-rococo/src/weights/orml_asset_registry.rs b/runtime/mangata-rococo/src/weights/orml_asset_registry.rs index 8242233fca..1a1b3efba3 100644 --- a/runtime/mangata-rococo/src/weights/orml_asset_registry.rs +++ b/runtime/mangata-rococo/src/weights/orml_asset_registry.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for orml_asset_registry //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -63,25 +63,25 @@ pub trait WeightInfo { /// Weights for orml_asset_registry using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl orml_asset_registry::WeightInfo for ModuleWeight { - // Storage: Tokens NextCurrencyId (r:1 w:1) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:1 w:1) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: AssetRegistry LocationToAssetId (r:1 w:1) - // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::NextCurrencyId` (r:1 w:1) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:1 w:1) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::LocationToAssetId` (r:1 w:1) + // Proof: `AssetRegistry::LocationToAssetId` (`max_values`: None, `max_size`: Some(614), added: 3089, mode: `MaxEncodedLen`) fn register_asset() -> Weight { - (Weight::from_parts(48_560_000, 0)) + (Weight::from_parts(44_771_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: AssetRegistry Metadata (r:1 w:1) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: AssetRegistry LocationToAssetId (r:1 w:1) - // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + // Storage: `AssetRegistry::Metadata` (r:1 w:1) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::LocationToAssetId` (r:1 w:1) + // Proof: `AssetRegistry::LocationToAssetId` (`max_values`: None, `max_size`: Some(614), added: 3089, mode: `MaxEncodedLen`) fn update_asset() -> Weight { - (Weight::from_parts(33_480_000, 0)) + (Weight::from_parts(29_691_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -89,25 +89,25 @@ impl orml_asset_registry::WeightInfo for ModuleWeight Weight { - (Weight::from_parts(48_560_000, 0)) + (Weight::from_parts(44_771_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: AssetRegistry Metadata (r:1 w:1) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: AssetRegistry LocationToAssetId (r:1 w:1) - // Proof Skipped: AssetRegistry LocationToAssetId (max_values: None, max_size: None, mode: Measured) + // Storage: `AssetRegistry::Metadata` (r:1 w:1) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::LocationToAssetId` (r:1 w:1) + // Proof: `AssetRegistry::LocationToAssetId` (`max_values`: None, `max_size`: Some(614), added: 3089, mode: `MaxEncodedLen`) fn update_asset() -> Weight { - (Weight::from_parts(33_480_000, 0)) + (Weight::from_parts(29_691_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/orml_tokens.rs b/runtime/mangata-rococo/src/weights/orml_tokens.rs index 5508f3d7cb..9b9165149d 100644 --- a/runtime/mangata-rococo/src/weights/orml_tokens.rs +++ b/runtime/mangata-rococo/src/weights/orml_tokens.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for orml_tokens //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -68,74 +68,74 @@ pub trait WeightInfo { /// Weights for orml_tokens using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl orml_tokens::WeightInfo for ModuleWeight { - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer() -> Weight { - (Weight::from_parts(54_300_000, 0)) + (Weight::from_parts(54_440_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer_all() -> Weight { - (Weight::from_parts(56_740_000, 0)) + (Weight::from_parts(57_580_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(52_380_000, 0)) + (Weight::from_parts(52_920_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { - (Weight::from_parts(58_360_000, 0)) + (Weight::from_parts(59_130_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn set_balance() -> Weight { - (Weight::from_parts(32_250_000, 0)) + (Weight::from_parts(33_340_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Tokens NextCurrencyId (r:1 w:1) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::NextCurrencyId` (r:1 w:1) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn create() -> Weight { - (Weight::from_parts(58_930_000, 0)) + (Weight::from_parts(60_371_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn mint() -> Weight { - (Weight::from_parts(59_170_000, 0)) + (Weight::from_parts(60_580_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -143,74 +143,74 @@ impl orml_tokens::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer() -> Weight { - (Weight::from_parts(54_300_000, 0)) + (Weight::from_parts(54_440_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer_all() -> Weight { - (Weight::from_parts(56_740_000, 0)) + (Weight::from_parts(57_580_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { - (Weight::from_parts(52_380_000, 0)) + (Weight::from_parts(52_920_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { - (Weight::from_parts(58_360_000, 0)) + (Weight::from_parts(59_130_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn set_balance() -> Weight { - (Weight::from_parts(32_250_000, 0)) + (Weight::from_parts(33_340_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Tokens NextCurrencyId (r:1 w:1) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::NextCurrencyId` (r:1 w:1) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn create() -> Weight { - (Weight::from_parts(58_930_000, 0)) + (Weight::from_parts(60_371_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn mint() -> Weight { - (Weight::from_parts(59_170_000, 0)) + (Weight::from_parts(60_580_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs b/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs index 7ebdf94b14..6f982c5c4d 100644 --- a/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs +++ b/runtime/mangata-rococo/src/weights/pallet_bootstrap.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_bootstrap //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -65,109 +65,109 @@ pub trait WeightInfo { /// Weights for pallet_bootstrap using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_bootstrap::WeightInfo for ModuleWeight { - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap BootstrapSchedule (r:1 w:1) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:2 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Bootstrap PromoteBootstrapPool (r:0 w:1) - // Proof Skipped: Bootstrap PromoteBootstrapPool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:0 w:1) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:1) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:2 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::PromoteBootstrapPool` (r:0 w:1) + // Proof: `Bootstrap::PromoteBootstrapPool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:0 w:1) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_000_000, 0)) + (Weight::from_parts(34_540_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap WhitelistedAccount (r:1 w:0) - // Proof Skipped: Bootstrap WhitelistedAccount (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap BootstrapSchedule (r:1 w:0) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:1 w:1) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:1 w:1) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:0 w:1) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::WhitelistedAccount` (r:1 w:0) + // Proof: `Bootstrap::WhitelistedAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:0) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::Provisions` (r:1 w:1) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:1 w:1) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:0 w:1) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn provision() -> Weight { - (Weight::from_parts(106_729_000, 0)) + (Weight::from_parts(105_711_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap MintedLiquidity (r:1 w:0) - // Proof Skipped: Bootstrap MintedLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ArchivedBootstrap (r:1 w:0) - // Proof Skipped: Bootstrap ArchivedBootstrap (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ClaimedRewards (r:2 w:2) - // Proof Skipped: Bootstrap ClaimedRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:1 w:0) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:2 w:0) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap VestedProvisions (r:2 w:0) - // Proof Skipped: Bootstrap VestedProvisions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:0 w:1) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::MintedLiquidity` (r:1 w:0) + // Proof: `Bootstrap::MintedLiquidity` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ArchivedBootstrap` (r:1 w:0) + // Proof: `Bootstrap::ArchivedBootstrap` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ClaimedRewards` (r:2 w:2) + // Proof: `Bootstrap::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:1 w:0) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Provisions` (r:2 w:0) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::VestedProvisions` (r:2 w:0) + // Proof: `Bootstrap::VestedProvisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:0 w:1) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(226_960_000, 0)) + (Weight::from_parts(239_040_000, 0)) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } - // Storage: Bootstrap Phase (r:1 w:1) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:1 w:0) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap VestedProvisions (r:1 w:0) - // Proof Skipped: Bootstrap VestedProvisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap WhitelistedAccount (r:1 w:0) - // Proof Skipped: Bootstrap WhitelistedAccount (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ClaimedRewards (r:1 w:0) - // Proof Skipped: Bootstrap ClaimedRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:1 w:0) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap MintedLiquidity (r:1 w:1) - // Proof Skipped: Bootstrap MintedLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Bootstrap BootstrapSchedule (r:1 w:1) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ArchivedBootstrap (r:1 w:1) - // Proof Skipped: Bootstrap ArchivedBootstrap (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:0 w:1) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap PromoteBootstrapPool (r:0 w:1) - // Proof Skipped: Bootstrap PromoteBootstrapPool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:0 w:1) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:1) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:1 w:0) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::VestedProvisions` (r:1 w:0) + // Proof: `Bootstrap::VestedProvisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::WhitelistedAccount` (r:1 w:0) + // Proof: `Bootstrap::WhitelistedAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ClaimedRewards` (r:1 w:0) + // Proof: `Bootstrap::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Provisions` (r:1 w:0) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::MintedLiquidity` (r:1 w:1) + // Proof: `Bootstrap::MintedLiquidity` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:1) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ArchivedBootstrap` (r:1 w:1) + // Proof: `Bootstrap::ArchivedBootstrap` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:0 w:1) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::PromoteBootstrapPool` (r:0 w:1) + // Proof: `Bootstrap::PromoteBootstrapPool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:0 w:1) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalize() -> Weight { - (Weight::from_parts(79_150_000, 0)) + (Weight::from_parts(83_640_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -175,109 +175,109 @@ impl pallet_bootstrap::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap BootstrapSchedule (r:1 w:1) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:2 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Bootstrap PromoteBootstrapPool (r:0 w:1) - // Proof Skipped: Bootstrap PromoteBootstrapPool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:0 w:1) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:1) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:2 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::PromoteBootstrapPool` (r:0 w:1) + // Proof: `Bootstrap::PromoteBootstrapPool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:0 w:1) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_bootstrap() -> Weight { - (Weight::from_parts(34_000_000, 0)) + (Weight::from_parts(34_540_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap WhitelistedAccount (r:1 w:0) - // Proof Skipped: Bootstrap WhitelistedAccount (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap BootstrapSchedule (r:1 w:0) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:1 w:1) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:1 w:1) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:0 w:1) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::WhitelistedAccount` (r:1 w:0) + // Proof: `Bootstrap::WhitelistedAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:0) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::Provisions` (r:1 w:1) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:1 w:1) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:0 w:1) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn provision() -> Weight { - (Weight::from_parts(106_729_000, 0)) + (Weight::from_parts(105_711_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: Bootstrap Phase (r:1 w:0) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap MintedLiquidity (r:1 w:0) - // Proof Skipped: Bootstrap MintedLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ArchivedBootstrap (r:1 w:0) - // Proof Skipped: Bootstrap ArchivedBootstrap (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ClaimedRewards (r:2 w:2) - // Proof Skipped: Bootstrap ClaimedRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:1 w:0) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:2 w:0) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap VestedProvisions (r:2 w:0) - // Proof Skipped: Bootstrap VestedProvisions (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:0 w:1) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:0) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::MintedLiquidity` (r:1 w:0) + // Proof: `Bootstrap::MintedLiquidity` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ArchivedBootstrap` (r:1 w:0) + // Proof: `Bootstrap::ArchivedBootstrap` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ClaimedRewards` (r:2 w:2) + // Proof: `Bootstrap::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:1 w:0) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Provisions` (r:2 w:0) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::VestedProvisions` (r:2 w:0) + // Proof: `Bootstrap::VestedProvisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:0 w:1) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim_and_activate_liquidity_tokens() -> Weight { - (Weight::from_parts(226_960_000, 0)) + (Weight::from_parts(239_040_000, 0)) .saturating_add(RocksDbWeight::get().reads(17 as u64)) .saturating_add(RocksDbWeight::get().writes(8 as u64)) } - // Storage: Bootstrap Phase (r:1 w:1) - // Proof Skipped: Bootstrap Phase (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ProvisionAccounts (r:1 w:0) - // Proof Skipped: Bootstrap ProvisionAccounts (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap VestedProvisions (r:1 w:0) - // Proof Skipped: Bootstrap VestedProvisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap WhitelistedAccount (r:1 w:0) - // Proof Skipped: Bootstrap WhitelistedAccount (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ClaimedRewards (r:1 w:0) - // Proof Skipped: Bootstrap ClaimedRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap Provisions (r:1 w:0) - // Proof Skipped: Bootstrap Provisions (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap MintedLiquidity (r:1 w:1) - // Proof Skipped: Bootstrap MintedLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Bootstrap BootstrapSchedule (r:1 w:1) - // Proof Skipped: Bootstrap BootstrapSchedule (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ArchivedBootstrap (r:1 w:1) - // Proof Skipped: Bootstrap ArchivedBootstrap (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap Valuations (r:0 w:1) - // Proof Skipped: Bootstrap Valuations (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap PromoteBootstrapPool (r:0 w:1) - // Proof Skipped: Bootstrap PromoteBootstrapPool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:0 w:1) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Bootstrap::Phase` (r:1 w:1) + // Proof: `Bootstrap::Phase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ProvisionAccounts` (r:1 w:0) + // Proof: `Bootstrap::ProvisionAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::VestedProvisions` (r:1 w:0) + // Proof: `Bootstrap::VestedProvisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::WhitelistedAccount` (r:1 w:0) + // Proof: `Bootstrap::WhitelistedAccount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ClaimedRewards` (r:1 w:0) + // Proof: `Bootstrap::ClaimedRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Provisions` (r:1 w:0) + // Proof: `Bootstrap::Provisions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::MintedLiquidity` (r:1 w:1) + // Proof: `Bootstrap::MintedLiquidity` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::BootstrapSchedule` (r:1 w:1) + // Proof: `Bootstrap::BootstrapSchedule` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ArchivedBootstrap` (r:1 w:1) + // Proof: `Bootstrap::ArchivedBootstrap` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::Valuations` (r:0 w:1) + // Proof: `Bootstrap::Valuations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::PromoteBootstrapPool` (r:0 w:1) + // Proof: `Bootstrap::PromoteBootstrapPool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Bootstrap::ActivePair` (r:0 w:1) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalize() -> Weight { - (Weight::from_parts(79_150_000, 0)) + (Weight::from_parts(83_640_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(7 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs b/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs index ded612958c..1fd6a78ffc 100644 --- a/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs +++ b/runtime/mangata-rococo/src/weights/pallet_collective_mangata.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_collective_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -71,177 +71,175 @@ pub trait WeightInfo { /// Weights for pallet_collective_mangata using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_collective_mangata::WeightInfo for ModuleWeight { - // Storage: Council Members (r:1 w:1) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:0) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:100 w:100) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:0 w:1) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:1) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:0) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:100 w:100) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:0 w:1) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_800_000, 0)) - // Standard Error: 69_203 - .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) - // Standard Error: 69_203 - .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) + (Weight::from_parts(56_930_000, 0)) + // Standard Error: 75_983 + .saturating_add((Weight::from_parts(5_656_190, 0)).saturating_mul(m as u64)) + // Standard Error: 75_983 + .saturating_add((Weight::from_parts(10_752_628, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(31_313_537, 0)) - // Standard Error: 94 - .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) - // Standard Error: 972 - .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn execute(_b: u32, m: u32, ) -> Weight { + (Weight::from_parts(32_347_546, 0)) + // Standard Error: 1_733 + .saturating_add((Weight::from_parts(20_109, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:0) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:0) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(34_536_810, 0)) - // Standard Error: 85 - .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) - // Standard Error: 883 - .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_280_801, 0)) + // Standard Error: 220 + .saturating_add((Weight::from_parts(2_579, 0)).saturating_mul(b as u64)) + // Standard Error: 2_276 + .saturating_add((Weight::from_parts(45_962, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalCount (r:1 w:1) - // Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:0 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Voting (r:0 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalCount` (r:1 w:1) + // Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:0 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:0 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(49_784_354, 0)) - // Standard Error: 163 - .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) - // Standard Error: 1_705 - .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) - // Standard Error: 1_683 - .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_638_444, 0)) + // Standard Error: 319 + .saturating_add((Weight::from_parts(4_413, 0)).saturating_mul(b as u64)) + // Standard Error: 3_330 + .saturating_add((Weight::from_parts(34_950, 0)).saturating_mul(m as u64)) + // Standard Error: 3_288 + .saturating_add((Weight::from_parts(344_067, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_999_012, 0)) - // Standard Error: 944 - .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) + (Weight::from_parts(48_255_187, 0)) + // Standard Error: 3_028 + .saturating_add((Weight::from_parts(59_613, 0)).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(67_599_850, 0)) - // Standard Error: 1_737 - .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) - // Standard Error: 1_694 - .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) + (Weight::from_parts(69_456_397, 0)) + // Standard Error: 4_288 + .saturating_add((Weight::from_parts(98_520, 0)).saturating_mul(m as u64)) + // Standard Error: 4_181 + .saturating_add((Weight::from_parts(345_792, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(94_619_427, 0)) - // Standard Error: 307 - .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) - // Standard Error: 3_251 - .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) - // Standard Error: 3_169 - .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_575_321, 0)) + // Standard Error: 532 + .saturating_add((Weight::from_parts(8_199, 0)).saturating_mul(b as u64)) + // Standard Error: 5_623 + .saturating_add((Weight::from_parts(72_246, 0)).saturating_mul(m as u64)) + // Standard Error: 5_481 + .saturating_add((Weight::from_parts(403_035, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:1 w:0) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:1 w:0) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(71_391_246, 0)) - // Standard Error: 1_912 - .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) - // Standard Error: 1_865 - .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) + (Weight::from_parts(75_627_064, 0)) + // Standard Error: 4_313 + .saturating_add((Weight::from_parts(82_419, 0)).saturating_mul(m as u64)) + // Standard Error: 4_206 + .saturating_add((Weight::from_parts(337_204, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:1 w:0) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:1 w:0) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(98_330_423, 0)) - // Standard Error: 297 - .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) - // Standard Error: 3_149 - .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) - // Standard Error: 3_070 - .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) + (Weight::from_parts(99_748_377, 0)) + // Standard Error: 568 + .saturating_add((Weight::from_parts(8_301, 0)).saturating_mul(b as u64)) + // Standard Error: 6_004 + .saturating_add((Weight::from_parts(54_155, 0)).saturating_mul(m as u64)) + // Standard Error: 5_853 + .saturating_add((Weight::from_parts(417_747, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:0 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Voting (r:0 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:0 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:0 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_844_726, 0)) - // Standard Error: 1_413 - .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_703_019, 0)) + // Standard Error: 2_935 + .saturating_add((Weight::from_parts(312_935, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -249,177 +247,175 @@ impl pallet_collective_mangata::WeightInfo for ModuleWe // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Council Members (r:1 w:1) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:0) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:100 w:100) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:0 w:1) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:1) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:0) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:100 w:100) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:0 w:1) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - (Weight::from_parts(90_800_000, 0)) - // Standard Error: 69_203 - .saturating_add((Weight::from_parts(5_566_250, 0)).saturating_mul(m as u64)) - // Standard Error: 69_203 - .saturating_add((Weight::from_parts(10_729_781, 0)).saturating_mul(p as u64)) + (Weight::from_parts(56_930_000, 0)) + // Standard Error: 75_983 + .saturating_add((Weight::from_parts(5_656_190, 0)).saturating_mul(m as u64)) + // Standard Error: 75_983 + .saturating_add((Weight::from_parts(10_752_628, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - fn execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(31_313_537, 0)) - // Standard Error: 94 - .saturating_add((Weight::from_parts(1_862, 0)).saturating_mul(b as u64)) - // Standard Error: 972 - .saturating_add((Weight::from_parts(25_991, 0)).saturating_mul(m as u64)) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn execute(_b: u32, m: u32, ) -> Weight { + (Weight::from_parts(32_347_546, 0)) + // Standard Error: 1_733 + .saturating_add((Weight::from_parts(20_109, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:0) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:0) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose_execute(b: u32, m: u32, ) -> Weight { - (Weight::from_parts(34_536_810, 0)) - // Standard Error: 85 - .saturating_add((Weight::from_parts(2_168, 0)).saturating_mul(b as u64)) - // Standard Error: 883 - .saturating_add((Weight::from_parts(45_007, 0)).saturating_mul(m as u64)) + (Weight::from_parts(34_280_801, 0)) + // Standard Error: 220 + .saturating_add((Weight::from_parts(2_579, 0)).saturating_mul(b as u64)) + // Standard Error: 2_276 + .saturating_add((Weight::from_parts(45_962, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalCount (r:1 w:1) - // Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:0 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Voting (r:0 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalCount` (r:1 w:1) + // Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:0 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:0 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(49_784_354, 0)) - // Standard Error: 163 - .saturating_add((Weight::from_parts(4_191, 0)).saturating_mul(b as u64)) - // Standard Error: 1_705 - .saturating_add((Weight::from_parts(35_364, 0)).saturating_mul(m as u64)) - // Standard Error: 1_683 - .saturating_add((Weight::from_parts(301_218, 0)).saturating_mul(p as u64)) + (Weight::from_parts(49_638_444, 0)) + // Standard Error: 319 + .saturating_add((Weight::from_parts(4_413, 0)).saturating_mul(b as u64)) + // Standard Error: 3_330 + .saturating_add((Weight::from_parts(34_950, 0)).saturating_mul(m as u64)) + // Standard Error: 3_288 + .saturating_add((Weight::from_parts(344_067, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) fn vote(m: u32, ) -> Weight { - (Weight::from_parts(45_999_012, 0)) - // Standard Error: 944 - .saturating_add((Weight::from_parts(70_544, 0)).saturating_mul(m as u64)) + (Weight::from_parts(48_255_187, 0)) + // Standard Error: 3_028 + .saturating_add((Weight::from_parts(59_613, 0)).saturating_mul(m as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(67_599_850, 0)) - // Standard Error: 1_737 - .saturating_add((Weight::from_parts(80_078, 0)).saturating_mul(m as u64)) - // Standard Error: 1_694 - .saturating_add((Weight::from_parts(294_524, 0)).saturating_mul(p as u64)) + (Weight::from_parts(69_456_397, 0)) + // Standard Error: 4_288 + .saturating_add((Weight::from_parts(98_520, 0)).saturating_mul(m as u64)) + // Standard Error: 4_181 + .saturating_add((Weight::from_parts(345_792, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(94_619_427, 0)) - // Standard Error: 307 - .saturating_add((Weight::from_parts(2_144, 0)).saturating_mul(b as u64)) - // Standard Error: 3_251 - .saturating_add((Weight::from_parts(94_352, 0)).saturating_mul(m as u64)) - // Standard Error: 3_169 - .saturating_add((Weight::from_parts(315_046, 0)).saturating_mul(p as u64)) + (Weight::from_parts(94_575_321, 0)) + // Standard Error: 532 + .saturating_add((Weight::from_parts(8_199, 0)).saturating_mul(b as u64)) + // Standard Error: 5_623 + .saturating_add((Weight::from_parts(72_246, 0)).saturating_mul(m as u64)) + // Standard Error: 5_481 + .saturating_add((Weight::from_parts(403_035, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:1 w:0) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:1 w:0) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (Weight::from_parts(71_391_246, 0)) - // Standard Error: 1_912 - .saturating_add((Weight::from_parts(92_748, 0)).saturating_mul(m as u64)) - // Standard Error: 1_865 - .saturating_add((Weight::from_parts(298_046, 0)).saturating_mul(p as u64)) + (Weight::from_parts(75_627_064, 0)) + // Standard Error: 4_313 + .saturating_add((Weight::from_parts(82_419, 0)).saturating_mul(m as u64)) + // Standard Error: 4_206 + .saturating_add((Weight::from_parts(337_204, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Council Members (r:1 w:0) - // Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council Voting (r:1 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:1 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Prime (r:1 w:0) - // Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:1 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Council::Members` (r:1 w:0) + // Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:1 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:1 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Prime` (r:1 w:0) + // Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:1 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (Weight::from_parts(98_330_423, 0)) - // Standard Error: 297 - .saturating_add((Weight::from_parts(3_678, 0)).saturating_mul(b as u64)) - // Standard Error: 3_149 - .saturating_add((Weight::from_parts(97_124, 0)).saturating_mul(m as u64)) - // Standard Error: 3_070 - .saturating_add((Weight::from_parts(313_849, 0)).saturating_mul(p as u64)) + (Weight::from_parts(99_748_377, 0)) + // Standard Error: 568 + .saturating_add((Weight::from_parts(8_301, 0)).saturating_mul(b as u64)) + // Standard Error: 6_004 + .saturating_add((Weight::from_parts(54_155, 0)).saturating_mul(m as u64)) + // Standard Error: 5_853 + .saturating_add((Weight::from_parts(417_747, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Council Proposals (r:1 w:1) - // Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Council ProposalProposedTime (r:0 w:1) - // Proof Skipped: Council ProposalProposedTime (max_values: None, max_size: None, mode: Measured) - // Storage: Council Voting (r:0 w:1) - // Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - // Storage: Council ProposalOf (r:0 w:1) - // Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + // Storage: `Council::Proposals` (r:1 w:1) + // Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalProposedTime` (r:0 w:1) + // Proof: `Council::ProposalProposedTime` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::Voting` (r:0 w:1) + // Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Council::ProposalOf` (r:0 w:1) + // Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) fn disapprove_proposal(p: u32, ) -> Weight { - (Weight::from_parts(36_844_726, 0)) - // Standard Error: 1_413 - .saturating_add((Weight::from_parts(281_628, 0)).saturating_mul(p as u64)) + (Weight::from_parts(36_703_019, 0)) + // Standard Error: 2_935 + .saturating_add((Weight::from_parts(312_935, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs b/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs index a0016cb225..5f37b8288f 100644 --- a/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs +++ b/runtime/mangata-rococo/src/weights/pallet_crowdloan_rewards.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_crowdloan_rewards //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -68,116 +68,116 @@ pub trait WeightInfo { /// Weights for pallet_crowdloan_rewards using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_crowdloan_rewards::WeightInfo for ModuleWeight { - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:0) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:0 w:1) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(13_860_000, 0)) + (Weight::from_parts(13_910_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) - // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan UnassociatedContributions (r:100 w:0) - // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:100 w:100) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:1) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::TotalContributors` (r:1 w:1) + // Proof: `Crowdloan::TotalContributors` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::ClaimedRelayChainIds` (r:100 w:100) + // Proof: `Crowdloan::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::UnassociatedContributions` (r:100 w:0) + // Proof: `Crowdloan::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:100 w:100) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(95_783_300, 0)) - // Standard Error: 25_873 - .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + (Weight::from_parts(123_974_567, 0)) + // Standard Error: 61_847 + .saturating_add((Weight::from_parts(25_859_849, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } - // Storage: Crowdloan Initialized (r:1 w:1) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:1) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:0) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::TotalContributors` (r:1 w:0) + // Proof: `Crowdloan::TotalContributors` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanPeriod` (r:0 w:1) + // Proof: `Crowdloan::CrowdloanPeriod` (`max_values`: None, `max_size`: None, mode: `Measured`) fn complete_initialization() -> Weight { - (Weight::from_parts(27_331_000, 0)) + (Weight::from_parts(28_570_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:1 w:1) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:1 w:1) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Crowdloan::CrowdloanPeriod` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanPeriod` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn claim() -> Weight { - (Weight::from_parts(129_060_000, 0)) + (Weight::from_parts(129_160_000, 0)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:2 w:2) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:2 w:2) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_reward_address() -> Weight { - (Weight::from_parts(34_900_000, 0)) + (Weight::from_parts(35_100_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan UnassociatedContributions (r:1 w:1) - // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) - // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:1 w:1) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::UnassociatedContributions` (r:1 w:1) + // Proof: `Crowdloan::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::ClaimedRelayChainIds` (r:1 w:1) + // Proof: `Crowdloan::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:1 w:1) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn associate_native_identity() -> Weight { - (Weight::from_parts(114_790_000, 0)) + (Weight::from_parts(118_910_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:2 w:2) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:2 w:2) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(42_648_512, 0)) - // Standard Error: 10_539 - .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + (Weight::from_parts(50_224_766, 0)) + // Standard Error: 121_712 + .saturating_add((Weight::from_parts(65_897_329, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -185,116 +185,116 @@ impl pallet_crowdloan_rewards::WeightInfo for ModuleWei // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:0) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:0 w:1) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_crowdloan_allocation() -> Weight { - (Weight::from_parts(13_860_000, 0)) + (Weight::from_parts(13_910_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:1) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan TotalContributors (r:1 w:1) - // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan ClaimedRelayChainIds (r:100 w:100) - // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan UnassociatedContributions (r:100 w:0) - // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:100 w:100) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:1) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::TotalContributors` (r:1 w:1) + // Proof: `Crowdloan::TotalContributors` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::ClaimedRelayChainIds` (r:100 w:100) + // Proof: `Crowdloan::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::UnassociatedContributions` (r:100 w:0) + // Proof: `Crowdloan::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:100 w:100) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn initialize_reward_vec(x: u32, ) -> Weight { - (Weight::from_parts(95_783_300, 0)) - // Standard Error: 25_873 - .saturating_add((Weight::from_parts(24_362_858, 0)).saturating_mul(x as u64)) + (Weight::from_parts(123_974_567, 0)) + // Standard Error: 61_847 + .saturating_add((Weight::from_parts(25_859_849, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(x as u64))) } - // Storage: Crowdloan Initialized (r:1 w:1) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan InitializedRewardAmount (r:1 w:0) - // Proof Skipped: Crowdloan InitializedRewardAmount (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanAllocation (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanAllocation (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan TotalContributors (r:1 w:0) - // Proof Skipped: Crowdloan TotalContributors (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan CrowdloanPeriod (r:0 w:1) - // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::Initialized` (r:1 w:1) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::InitializedRewardAmount` (r:1 w:0) + // Proof: `Crowdloan::InitializedRewardAmount` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanAllocation` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanAllocation` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::TotalContributors` (r:1 w:0) + // Proof: `Crowdloan::TotalContributors` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::CrowdloanPeriod` (r:0 w:1) + // Proof: `Crowdloan::CrowdloanPeriod` (`max_values`: None, `max_size`: None, mode: `Measured`) fn complete_initialization() -> Weight { - (Weight::from_parts(27_331_000, 0)) + (Weight::from_parts(28_570_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan Initialized (r:1 w:0) - // Proof Skipped: Crowdloan Initialized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:1 w:1) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Crowdloan CrowdloanPeriod (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanPeriod (max_values: None, max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::Initialized` (r:1 w:0) + // Proof: `Crowdloan::Initialized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:1 w:1) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Crowdloan::CrowdloanPeriod` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanPeriod` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn claim() -> Weight { - (Weight::from_parts(129_060_000, 0)) + (Weight::from_parts(129_160_000, 0)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:2 w:2) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:2 w:2) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_reward_address() -> Weight { - (Weight::from_parts(34_900_000, 0)) + (Weight::from_parts(35_100_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan UnassociatedContributions (r:1 w:1) - // Proof Skipped: Crowdloan UnassociatedContributions (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan ClaimedRelayChainIds (r:1 w:1) - // Proof Skipped: Crowdloan ClaimedRelayChainIds (max_values: None, max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:1 w:1) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::UnassociatedContributions` (r:1 w:1) + // Proof: `Crowdloan::UnassociatedContributions` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::ClaimedRelayChainIds` (r:1 w:1) + // Proof: `Crowdloan::ClaimedRelayChainIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:1 w:1) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn associate_native_identity() -> Weight { - (Weight::from_parts(114_790_000, 0)) + (Weight::from_parts(118_910_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Crowdloan CrowdloanId (r:1 w:0) - // Proof Skipped: Crowdloan CrowdloanId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Crowdloan AccountsPayable (r:2 w:2) - // Proof Skipped: Crowdloan AccountsPayable (max_values: None, max_size: None, mode: Measured) + // Storage: `Crowdloan::CrowdloanId` (r:1 w:0) + // Proof: `Crowdloan::CrowdloanId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Crowdloan::AccountsPayable` (r:2 w:2) + // Proof: `Crowdloan::AccountsPayable` (`max_values`: None, `max_size`: None, mode: `Measured`) fn change_association_with_relay_keys(x: u32, ) -> Weight { - (Weight::from_parts(42_648_512, 0)) - // Standard Error: 10_539 - .saturating_add((Weight::from_parts(63_038_369, 0)).saturating_mul(x as u64)) + (Weight::from_parts(50_224_766, 0)) + // Standard Error: 121_712 + .saturating_add((Weight::from_parts(65_897_329, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs b/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs index 7057d5cf29..0ed5e75bb0 100644 --- a/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs +++ b/runtime/mangata-rococo/src/weights/pallet_fee_lock.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_fee_lock //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -63,25 +63,25 @@ pub trait WeightInfo { /// Weights for pallet_fee_lock using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_fee_lock::WeightInfo for ModuleWeight { - // Storage: FeeLock FeeLockMetadata (r:1 w:1) - // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) + // Storage: `FeeLock::FeeLockMetadata` (r:1 w:1) + // Proof: `FeeLock::FeeLockMetadata` (`max_values`: Some(1), `max_size`: Some(438), added: 933, mode: `MaxEncodedLen`) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(31_000_000, 0)) + (Weight::from_parts(27_060_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: FeeLock AccountFeeLockData (r:1 w:1) - // Proof: FeeLock AccountFeeLockData (max_values: None, max_size: Some(60), added: 2535, mode: MaxEncodedLen) - // Storage: FeeLock FeeLockMetadata (r:1 w:0) - // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: FeeLock FeeLockMetadataQeueuePosition (r:1 w:1) - // Proof: FeeLock FeeLockMetadataQeueuePosition (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: FeeLock UnlockQueue (r:1 w:1) - // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: `FeeLock::AccountFeeLockData` (r:1 w:1) + // Proof: `FeeLock::AccountFeeLockData` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `FeeLock::FeeLockMetadata` (r:1 w:0) + // Proof: `FeeLock::FeeLockMetadata` (`max_values`: Some(1), `max_size`: Some(438), added: 933, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `FeeLock::FeeLockMetadataQeueuePosition` (r:1 w:1) + // Proof: `FeeLock::FeeLockMetadataQeueuePosition` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + // Storage: `FeeLock::UnlockQueue` (r:1 w:1) + // Proof: `FeeLock::UnlockQueue` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn unlock_fee() -> Weight { - (Weight::from_parts(56_920_000, 0)) + (Weight::from_parts(52_860_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -89,25 +89,25 @@ impl pallet_fee_lock::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: FeeLock FeeLockMetadata (r:1 w:1) - // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) + // Storage: `FeeLock::FeeLockMetadata` (r:1 w:1) + // Proof: `FeeLock::FeeLockMetadata` (`max_values`: Some(1), `max_size`: Some(438), added: 933, mode: `MaxEncodedLen`) fn update_fee_lock_metadata() -> Weight { - (Weight::from_parts(31_000_000, 0)) + (Weight::from_parts(27_060_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: FeeLock AccountFeeLockData (r:1 w:1) - // Proof: FeeLock AccountFeeLockData (max_values: None, max_size: Some(60), added: 2535, mode: MaxEncodedLen) - // Storage: FeeLock FeeLockMetadata (r:1 w:0) - // Proof: FeeLock FeeLockMetadata (max_values: Some(1), max_size: Some(438), added: 933, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: FeeLock FeeLockMetadataQeueuePosition (r:1 w:1) - // Proof: FeeLock FeeLockMetadataQeueuePosition (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: FeeLock UnlockQueue (r:1 w:1) - // Proof: FeeLock UnlockQueue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: `FeeLock::AccountFeeLockData` (r:1 w:1) + // Proof: `FeeLock::AccountFeeLockData` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`) + // Storage: `FeeLock::FeeLockMetadata` (r:1 w:0) + // Proof: `FeeLock::FeeLockMetadata` (`max_values`: Some(1), `max_size`: Some(438), added: 933, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `FeeLock::FeeLockMetadataQeueuePosition` (r:1 w:1) + // Proof: `FeeLock::FeeLockMetadataQeueuePosition` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) + // Storage: `FeeLock::UnlockQueue` (r:1 w:1) + // Proof: `FeeLock::UnlockQueue` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) fn unlock_fee() -> Weight { - (Weight::from_parts(56_920_000, 0)) + (Weight::from_parts(52_860_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_issuance.rs b/runtime/mangata-rococo/src/weights/pallet_issuance.rs index c7f3821ac2..676fb87bf5 100644 --- a/runtime/mangata-rococo/src/weights/pallet_issuance.rs +++ b/runtime/mangata-rococo/src/weights/pallet_issuance.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_issuance //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -64,42 +64,42 @@ pub trait WeightInfo { /// Weights for pallet_issuance using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_issuance::WeightInfo for ModuleWeight { - // Storage: Issuance IssuanceConfigStore (r:1 w:1) - // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Issuance IsTGEFinalized (r:1 w:0) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Issuance::IssuanceConfigStore` (r:1 w:1) + // Proof: `Issuance::IssuanceConfigStore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:0) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_870_000, 0)) + (Weight::from_parts(25_240_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Issuance IsTGEFinalized (r:1 w:1) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:1) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalize_tge() -> Weight { - (Weight::from_parts(15_920_000, 0)) + (Weight::from_parts(15_000_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Issuance IsTGEFinalized (r:1 w:0) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:100 w:100) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Locks (r:100 w:100) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Issuance TGETotal (r:1 w:1) - // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:0) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:100 w:100) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:100 w:100) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:100 w:100) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:100 w:100) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Issuance::TGETotal` (r:1 w:1) + // Proof: `Issuance::TGETotal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(32_064_606, 0)) - // Standard Error: 26_264 - .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_711_551, 0)) + // Standard Error: 186_543 + .saturating_add((Weight::from_parts(84_103_494, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(2 as u64)) @@ -109,42 +109,42 @@ impl pallet_issuance::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Issuance IssuanceConfigStore (r:1 w:1) - // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Issuance IsTGEFinalized (r:1 w:0) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Issuance::IssuanceConfigStore` (r:1 w:1) + // Proof: `Issuance::IssuanceConfigStore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:0) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn init_issuance_config() -> Weight { - (Weight::from_parts(27_870_000, 0)) + (Weight::from_parts(25_240_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Issuance IsTGEFinalized (r:1 w:1) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:1) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn finalize_tge() -> Weight { - (Weight::from_parts(15_920_000, 0)) + (Weight::from_parts(15_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Issuance IsTGEFinalized (r:1 w:0) - // Proof Skipped: Issuance IsTGEFinalized (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:100 w:100) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:100 w:100) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: System Account (r:100 w:100) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Locks (r:100 w:100) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Issuance TGETotal (r:1 w:1) - // Proof Skipped: Issuance TGETotal (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Issuance::IsTGEFinalized` (r:1 w:0) + // Proof: `Issuance::IsTGEFinalized` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:100 w:100) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:100 w:100) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:100 w:100) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:100 w:100) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Issuance::TGETotal` (r:1 w:1) + // Proof: `Issuance::TGETotal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_tge(x: u32, ) -> Weight { - (Weight::from_parts(32_064_606, 0)) - // Standard Error: 26_264 - .saturating_add((Weight::from_parts(85_431_002, 0)).saturating_mul(x as u64)) + (Weight::from_parts(32_711_551, 0)) + // Standard Error: 186_543 + .saturating_add((Weight::from_parts(84_103_494, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(2 as u64)) diff --git a/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs b/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs index 4e536d93e4..f5a40317bf 100644 --- a/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs +++ b/runtime/mangata-rococo/src/weights/pallet_multipurpose_liquidity.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_multipurpose_liquidity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -63,35 +63,35 @@ pub trait WeightInfo { /// Weights for pallet_multipurpose_liquidity using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_multipurpose_liquidity::WeightInfo for ModuleWeight { - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::RelockStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::RelockStatus` (`max_values`: None, `max_size`: Some(1845), added: 4320, mode: `MaxEncodedLen`) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(130_870_000, 0)) + (Weight::from_parts(134_170_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: `MultiPurposeLiquidity::RelockStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::RelockStatus` (`max_values`: None, `max_size`: Some(1845), added: 4320, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(126_300_000, 0)) + (Weight::from_parts(115_390_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -99,35 +99,35 @@ impl pallet_multipurpose_liquidity::WeightInfo for Modu // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::RelockStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::RelockStatus` (`max_values`: None, `max_size`: Some(1845), added: 4320, mode: `MaxEncodedLen`) fn reserve_vesting_liquidity_tokens() -> Weight { - (Weight::from_parts(130_870_000, 0)) + (Weight::from_parts(134_170_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: MultiPurposeLiquidity RelockStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity RelockStatus (max_values: None, max_size: Some(1845), added: 4320, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: `MultiPurposeLiquidity::RelockStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::RelockStatus` (`max_values`: None, `max_size`: Some(1845), added: 4320, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) fn unreserve_and_relock_instance() -> Weight { - (Weight::from_parts(126_300_000, 0)) + (Weight::from_parts(115_390_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs b/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs index 6aac9c8080..8f048650a6 100644 --- a/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs +++ b/runtime/mangata-rococo/src/weights/pallet_proof_of_stake.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_proof_of_stake //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -69,272 +69,276 @@ pub trait WeightInfo { /// Weights for pallet_proof_of_stake using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_proof_of_stake::WeightInfo for ModuleWeight { - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn claim_native_rewards() -> Weight { - (Weight::from_parts(86_750_000, 0)) + (Weight::from_parts(94_580_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:1) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_530_000, 0)) + (Weight::from_parts(17_030_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn activate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(100_109_000, 0)) + (Weight::from_parts(101_730_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:0) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn deactivate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(91_990_000, 0)) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + (Weight::from_parts(101_190_000, 0)) + .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleId (r:1 w:1) - // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::SchedulesListMetadata` (r:1 w:1) + // Proof: `ProofOfStake::SchedulesListMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsSchedulesList` (r:1 w:2) + // Proof: `ProofOfStake::RewardsSchedulesList` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:0 w:1) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reward_pool() -> Weight { - (Weight::from_parts(179_050_000, 0)) + (Weight::from_parts(140_880_000, 0)) .saturating_add(T::DbWeight::get().reads(9 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:0) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) fn activate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(120_360_000, 0)) - .saturating_add(T::DbWeight::get().reads(10 as u64)) + (Weight::from_parts(128_680_000, 0)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) - // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:0) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLiquidityForSchedules` (r:2 w:1) + // Proof: `ProofOfStake::ActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(125_160_000, 0)) + (Weight::from_parts(132_380_000, 0)) .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:0) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsTotal` (r:1 w:1) + // Proof: `ProofOfStake::ScheduleRewardsTotal` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn claim_3rdparty_rewards() -> Weight { - (Weight::from_parts(94_980_000, 0)) - .saturating_add(T::DbWeight::get().reads(7 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + (Weight::from_parts(130_960_000, 0)) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn claim_native_rewards() -> Weight { - (Weight::from_parts(86_750_000, 0)) + (Weight::from_parts(94_580_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:1) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn update_pool_promotion() -> Weight { - (Weight::from_parts(18_530_000, 0)) + (Weight::from_parts(17_030_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn activate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(100_109_000, 0)) + (Weight::from_parts(101_730_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:0) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn deactivate_liquidity_for_native_rewards() -> Weight { - (Weight::from_parts(91_990_000, 0)) - .saturating_add(RocksDbWeight::get().reads(5 as u64)) + (Weight::from_parts(101_190_000, 0)) + .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleId (r:1 w:1) - // Proof Skipped: ProofOfStake ScheduleId (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:0 w:1) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::SchedulesListMetadata` (r:1 w:1) + // Proof: `ProofOfStake::SchedulesListMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsSchedulesList` (r:1 w:2) + // Proof: `ProofOfStake::RewardsSchedulesList` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:0 w:1) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reward_pool() -> Weight { - (Weight::from_parts(179_050_000, 0)) + (Weight::from_parts(140_880_000, 0)) .saturating_add(RocksDbWeight::get().reads(9 as u64)) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:0) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) fn activate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(120_360_000, 0)) - .saturating_add(RocksDbWeight::get().reads(10 as u64)) + (Weight::from_parts(128_680_000, 0)) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLiquidityForSchedules (r:2 w:1) - // Proof Skipped: ProofOfStake ActivatedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ActivatedLockedLiquidityForSchedules (r:1 w:1) - // Proof Skipped: ProofOfStake ActivatedLockedLiquidityForSchedules (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:0) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLiquidityForSchedules` (r:2 w:1) + // Proof: `ProofOfStake::ActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedLockedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:1) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) fn deactivate_liquidity_for_3rdparty_rewards() -> Weight { - (Weight::from_parts(125_160_000, 0)) + (Weight::from_parts(132_380_000, 0)) .saturating_add(RocksDbWeight::get().reads(11 as u64)) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) } - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardTokensPerPool (r:2 w:0) - // Proof Skipped: ProofOfStake RewardTokensPerPool (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:0) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfoForScheduleRewards (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfoForScheduleRewards (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `ProofOfStake::ScheduleRewardsPerLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::ScheduleRewardsPerLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidityForSchedules` (r:1 w:0) + // Proof: `ProofOfStake::TotalActivatedLiquidityForSchedules` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ScheduleRewardsTotal` (r:1 w:1) + // Proof: `ProofOfStake::ScheduleRewardsTotal` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardTokensPerPool` (r:2 w:0) + // Proof: `ProofOfStake::RewardTokensPerPool` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfoForScheduleRewards` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfoForScheduleRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn claim_3rdparty_rewards() -> Weight { - (Weight::from_parts(94_980_000, 0)) - .saturating_add(RocksDbWeight::get().reads(7 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + (Weight::from_parts(130_960_000, 0)) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } } diff --git a/runtime/mangata-rococo/src/weights/pallet_session.rs b/runtime/mangata-rococo/src/weights/pallet_session.rs index 3b9299b1a8..b9c3a66d7a 100644 --- a/runtime/mangata-rococo/src/weights/pallet_session.rs +++ b/runtime/mangata-rococo/src/weights/pallet_session.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -63,21 +63,21 @@ pub trait WeightInfo { /// Weights for pallet_session using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_session::WeightInfo for ModuleWeight { - // Storage: Session NextKeys (r:1 w:1) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Session KeyOwner (r:1 w:1) - // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + // Storage: `Session::NextKeys` (r:1 w:1) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::KeyOwner` (r:1 w:1) + // Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { - (Weight::from_parts(27_480_000, 0)) + (Weight::from_parts(28_000_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Session NextKeys (r:1 w:1) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Session KeyOwner (r:0 w:1) - // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + // Storage: `Session::NextKeys` (r:1 w:1) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::KeyOwner` (r:0 w:1) + // Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { - (Weight::from_parts(17_880_000, 0)) + (Weight::from_parts(17_750_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -85,21 +85,21 @@ impl pallet_session::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Session NextKeys (r:1 w:1) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Session KeyOwner (r:1 w:1) - // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + // Storage: `Session::NextKeys` (r:1 w:1) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::KeyOwner` (r:1 w:1) + // Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { - (Weight::from_parts(27_480_000, 0)) + (Weight::from_parts(28_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Session NextKeys (r:1 w:1) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Session KeyOwner (r:0 w:1) - // Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + // Storage: `Session::NextKeys` (r:1 w:1) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::KeyOwner` (r:0 w:1) + // Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { - (Weight::from_parts(17_880_000, 0)) + (Weight::from_parts(17_750_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_timestamp.rs b/runtime/mangata-rococo/src/weights/pallet_timestamp.rs index a32d4dafb2..14a9eb72be 100644 --- a/runtime/mangata-rococo/src/weights/pallet_timestamp.rs +++ b/runtime/mangata-rococo/src/weights/pallet_timestamp.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -63,28 +63,28 @@ pub trait WeightInfo { /// Weights for pallet_timestamp using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_timestamp::WeightInfo for ModuleWeight { - // Storage: Timestamp Now (r:1 w:1) - // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + // Storage: `Timestamp::Now` (r:1 w:1) + // Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_350_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_220_000, 0)) + (Weight::from_parts(5_640_000, 0)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Timestamp Now (r:1 w:1) - // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + // Storage: `Timestamp::Now` (r:1 w:1) + // Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { - (Weight::from_parts(10_120_000, 0)) + (Weight::from_parts(10_350_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (Weight::from_parts(5_220_000, 0)) + (Weight::from_parts(5_640_000, 0)) } } diff --git a/runtime/mangata-rococo/src/weights/pallet_treasury.rs b/runtime/mangata-rococo/src/weights/pallet_treasury.rs index 89616a60b5..08231f5480 100644 --- a/runtime/mangata-rococo/src/weights/pallet_treasury.rs +++ b/runtime/mangata-rococo/src/weights/pallet_treasury.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -68,62 +68,62 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_treasury::WeightInfo for ModuleWeight { fn spend() -> Weight { - (Weight::from_parts(530_000, 0)) + (Weight::from_parts(490_000, 0)) } - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury ProposalCount (r:1 w:1) - // Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Treasury Proposals (r:0 w:1) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::ProposalCount` (r:1 w:1) + // Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Treasury::Proposals` (r:0 w:1) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn propose_spend() -> Weight { - (Weight::from_parts(46_150_000, 0)) + (Weight::from_parts(42_860_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Treasury Proposals (r:1 w:1) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Treasury::Proposals` (r:1 w:1) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn reject_proposal() -> Weight { - (Weight::from_parts(52_520_000, 0)) + (Weight::from_parts(49_050_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Treasury Proposals (r:1 w:0) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + // Storage: `Treasury::Proposals` (r:1 w:0) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_564_531, 0)) - // Standard Error: 1_841 - .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_679_125, 0)) + // Standard Error: 2_153 + .saturating_add((Weight::from_parts(79_739, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { - (Weight::from_parts(12_011_000, 0)) + (Weight::from_parts(12_580_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury Deactivated (r:1 w:0) - // Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - // Storage: Treasury Proposals (r:100 w:0) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::Deactivated` (r:1 w:0) + // Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + // Storage: `Treasury::Proposals` (r:100 w:0) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(41_108_943, 0)) - // Standard Error: 7_113 - .saturating_add((Weight::from_parts(4_261_200, 0)).saturating_mul(p as u64)) + (Weight::from_parts(39_886_974, 0)) + // Standard Error: 12_844 + .saturating_add((Weight::from_parts(4_375_723, 0)).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) @@ -133,62 +133,62 @@ impl pallet_treasury::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { fn spend() -> Weight { - (Weight::from_parts(530_000, 0)) + (Weight::from_parts(490_000, 0)) } - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury ProposalCount (r:1 w:1) - // Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Treasury Proposals (r:0 w:1) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::ProposalCount` (r:1 w:1) + // Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Treasury::Proposals` (r:0 w:1) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn propose_spend() -> Weight { - (Weight::from_parts(46_150_000, 0)) + (Weight::from_parts(42_860_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Treasury Proposals (r:1 w:1) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Treasury::Proposals` (r:1 w:1) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn reject_proposal() -> Weight { - (Weight::from_parts(52_520_000, 0)) + (Weight::from_parts(49_050_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Treasury Proposals (r:1 w:0) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + // Storage: `Treasury::Proposals` (r:1 w:0) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn approve_proposal(p: u32, ) -> Weight { - (Weight::from_parts(20_564_531, 0)) - // Standard Error: 1_841 - .saturating_add((Weight::from_parts(64_381, 0)).saturating_mul(p as u64)) + (Weight::from_parts(20_679_125, 0)) + // Standard Error: 2_153 + .saturating_add((Weight::from_parts(79_739, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { - (Weight::from_parts(12_011_000, 0)) + (Weight::from_parts(12_580_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Treasury Deactivated (r:1 w:0) - // Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - // Storage: Treasury Approvals (r:1 w:1) - // Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - // Storage: Treasury Proposals (r:100 w:0) - // Proof: Treasury Proposals (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Treasury::Deactivated` (r:1 w:0) + // Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + // Storage: `Treasury::Approvals` (r:1 w:1) + // Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + // Storage: `Treasury::Proposals` (r:100 w:0) + // Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn on_initialize_proposals(p: u32, ) -> Weight { - (Weight::from_parts(41_108_943, 0)) - // Standard Error: 7_113 - .saturating_add((Weight::from_parts(4_261_200, 0)).saturating_mul(p as u64)) + (Weight::from_parts(39_886_974, 0)) + // Standard Error: 12_844 + .saturating_add((Weight::from_parts(4_375_723, 0)).saturating_mul(p as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(p as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) diff --git a/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs b/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs index 933c8abfba..ab1c2d730b 100644 --- a/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs +++ b/runtime/mangata-rococo/src/weights/pallet_utility_mangata.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_utility_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -67,49 +67,49 @@ pub trait WeightInfo { pub struct ModuleWeight(PhantomData); impl pallet_utility_mangata::WeightInfo for ModuleWeight { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(9_547_364, 0)) - // Standard Error: 3_907 - .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_549_165, 0)) + // Standard Error: 21_923 + .saturating_add((Weight::from_parts(9_941_900, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_100_000, 0)) + (Weight::from_parts(9_530_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(9_586_041, 0)) - // Standard Error: 3_411 - .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) + (Weight::from_parts(65_951_534, 0)) + // Standard Error: 21_524 + .saturating_add((Weight::from_parts(10_171_670, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(17_000_000, 0)) + (Weight::from_parts(15_020_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(13_747_173, 0)) - // Standard Error: 3_163 - .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) + (Weight::from_parts(10_184_050, 0)) + // Standard Error: 19_026 + .saturating_add((Weight::from_parts(9_809_616, 0)).saturating_mul(c as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { fn batch(c: u32, ) -> Weight { - (Weight::from_parts(9_547_364, 0)) - // Standard Error: 3_907 - .saturating_add((Weight::from_parts(9_787_750, 0)).saturating_mul(c as u64)) + (Weight::from_parts(13_549_165, 0)) + // Standard Error: 21_923 + .saturating_add((Weight::from_parts(9_941_900, 0)).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (Weight::from_parts(10_100_000, 0)) + (Weight::from_parts(9_530_000, 0)) } fn batch_all(c: u32, ) -> Weight { - (Weight::from_parts(9_586_041, 0)) - // Standard Error: 3_411 - .saturating_add((Weight::from_parts(10_269_425, 0)).saturating_mul(c as u64)) + (Weight::from_parts(65_951_534, 0)) + // Standard Error: 21_524 + .saturating_add((Weight::from_parts(10_171_670, 0)).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (Weight::from_parts(17_000_000, 0)) + (Weight::from_parts(15_020_000, 0)) } fn force_batch(c: u32, ) -> Weight { - (Weight::from_parts(13_747_173, 0)) - // Standard Error: 3_163 - .saturating_add((Weight::from_parts(9_823_460, 0)).saturating_mul(c as u64)) + (Weight::from_parts(10_184_050, 0)) + // Standard Error: 19_026 + .saturating_add((Weight::from_parts(9_809_616, 0)).saturating_mul(c as u64)) } } diff --git a/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs b/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs index 1c975632c9..8823347a8f 100644 --- a/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs +++ b/runtime/mangata-rococo/src/weights/pallet_vesting_mangata.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_vesting_mangata //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -68,98 +68,98 @@ pub trait WeightInfo { /// Weights for pallet_vesting_mangata using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_vesting_mangata::WeightInfo for ModuleWeight { - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_243_152, 0)) - // Standard Error: 7_939 - .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_037_878, 0)) + // Standard Error: 9_285 + .saturating_add((Weight::from_parts(189_118, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(73_252_114, 0)) - // Standard Error: 3_434 - .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) + (Weight::from_parts(69_031_270, 0)) + // Standard Error: 6_823 + .saturating_add((Weight::from_parts(81_042, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_977_339, 0)) - // Standard Error: 7_858 - .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_418_107, 0)) + // Standard Error: 8_402 + .saturating_add((Weight::from_parts(191_408, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(72_574_520, 0)) - // Standard Error: 3_250 - .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) + (Weight::from_parts(69_183_201, 0)) + // Standard Error: 7_105 + .saturating_add((Weight::from_parts(101_627, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:0) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:0) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(88_550_017, 0)) - // Standard Error: 13_455 - .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) + (Weight::from_parts(86_734_759, 0)) + // Standard Error: 14_469 + .saturating_add((Weight::from_parts(289_455, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_212_340, 0)) - // Standard Error: 8_032 - .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) + (Weight::from_parts(55_379_787, 0)) + // Standard Error: 8_568 + .saturating_add((Weight::from_parts(182_811, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_783_090, 0)) - // Standard Error: 13_737 - .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_037_972, 0)) + // Standard Error: 14_559 + .saturating_add((Weight::from_parts(297_864, 0)).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -167,98 +167,98 @@ impl pallet_vesting_mangata::WeightInfo for ModuleWeigh // For backwards compatibility and tests impl WeightInfo for () { - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_243_152, 0)) - // Standard Error: 7_939 - .saturating_add((Weight::from_parts(234_970, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_037_878, 0)) + // Standard Error: 9_285 + .saturating_add((Weight::from_parts(189_118, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(73_252_114, 0)) - // Standard Error: 3_434 - .saturating_add((Weight::from_parts(27_698, 0)).saturating_mul(s as u64)) + (Weight::from_parts(69_031_270, 0)) + // Standard Error: 6_823 + .saturating_add((Weight::from_parts(81_042, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn vest_other_locked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(53_977_339, 0)) - // Standard Error: 7_858 - .saturating_add((Weight::from_parts(223_279, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_418_107, 0)) + // Standard Error: 8_402 + .saturating_add((Weight::from_parts(191_408, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:1) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:1) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(72_574_520, 0)) - // Standard Error: 3_250 - .saturating_add((Weight::from_parts(67_290, 0)).saturating_mul(s as u64)) + (Weight::from_parts(69_183_201, 0)) + // Standard Error: 7_105 + .saturating_add((Weight::from_parts(101_627, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:0) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:0) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(88_550_017, 0)) - // Standard Error: 13_455 - .saturating_add((Weight::from_parts(335_869, 0)).saturating_mul(s as u64)) + (Weight::from_parts(86_734_759, 0)) + // Standard Error: 14_469 + .saturating_add((Weight::from_parts(289_455, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn not_unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(54_212_340, 0)) - // Standard Error: 8_032 - .saturating_add((Weight::from_parts(248_035, 0)).saturating_mul(s as u64)) + (Weight::from_parts(55_379_787, 0)) + // Standard Error: 8_568 + .saturating_add((Weight::from_parts(182_811, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: Vesting Vesting (r:1 w:1) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:1 w:0) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) + // Storage: `Vesting::Vesting` (r:1 w:1) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:1 w:0) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) fn unlocking_merge_schedules(_l: u32, s: u32, ) -> Weight { - (Weight::from_parts(52_783_090, 0)) - // Standard Error: 13_737 - .saturating_add((Weight::from_parts(346_445, 0)).saturating_mul(s as u64)) + (Weight::from_parts(53_037_972, 0)) + // Standard Error: 14_559 + .saturating_add((Weight::from_parts(297_864, 0)).saturating_mul(s as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/pallet_xyk.rs b/runtime/mangata-rococo/src/weights/pallet_xyk.rs index c1f831ff19..9e0e7acb53 100644 --- a/runtime/mangata-rococo/src/weights/pallet_xyk.rs +++ b/runtime/mangata-rococo/src/weights/pallet_xyk.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for pallet_xyk //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -71,235 +71,237 @@ pub trait WeightInfo { /// Weights for pallet_xyk using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl pallet_xyk::WeightInfo for ModuleWeight { - // Storage: AssetRegistry Metadata (r:3 w:1) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk Pools (r:2 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:1) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:0 w:1) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: `AssetRegistry::Metadata` (r:3 w:1) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::Pools` (r:2 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:1) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:0 w:1) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityPools` (r:0 w:1) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) fn create_pool() -> Weight { - (Weight::from_parts(202_790_000, 0)) + (Weight::from_parts(206_040_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:3 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:6 w:6) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:3 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:6 w:6) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn sell_asset() -> Weight { - (Weight::from_parts(244_940_000, 0)) + (Weight::from_parts(243_550_000, 0)) .saturating_add(T::DbWeight::get().reads(16 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:99 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:100 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:100 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk Pools (r:297 w:198) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:400 w:400) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:99 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:100 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:100 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:297 w:198) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:400 w:400) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(661_629_000, 0)) - // Standard Error: 425_962 - .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + (Weight::from_parts(628_100_000, 0)) + // Standard Error: 450_557 + .saturating_add((Weight::from_parts(274_044_457, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(29 as u64)) .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:4 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:6 w:6) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:4 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:6 w:6) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn buy_asset() -> Weight { - (Weight::from_parts(253_260_000, 0)) + (Weight::from_parts(261_921_000, 0)) .saturating_add(T::DbWeight::get().reads(18 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:100 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:99 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:100 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:297 w:198) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:400 w:400) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:100 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:99 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:100 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:297 w:198) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:400 w:400) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(691_040_000, 0)) - // Standard Error: 480_931 - .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + (Weight::from_parts(699_390_000, 0)) + // Standard Error: 516_256 + .saturating_add((Weight::from_parts(290_225_626, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(29 as u64)) .saturating_add(T::DbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn mint_liquidity() -> Weight { - (Weight::from_parts(241_610_000, 0)) + (Weight::from_parts(246_950_000, 0)) .saturating_add(T::DbWeight::get().reads(15 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:2 w:2) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:2 w:2) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:2 w:2) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:2 w:2) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(277_529_000, 0)) + (Weight::from_parts(284_941_000, 0)) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:0) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn burn_liquidity() -> Weight { - (Weight::from_parts(223_960_000, 0)) - .saturating_add(T::DbWeight::get().reads(14 as u64)) + (Weight::from_parts(223_050_000, 0)) + .saturating_add(T::DbWeight::get().reads(15 as u64)) .saturating_add(T::DbWeight::get().writes(10 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:4 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:7 w:7) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:4 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:7 w:7) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(386_749_000, 0)) + (Weight::from_parts(394_410_000, 0)) .saturating_add(T::DbWeight::get().reads(22 as u64)) .saturating_add(T::DbWeight::get().writes(11 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:8 w:8) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:2 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:8 w:8) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:2 w:2) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:2 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn compound_rewards() -> Weight { - (Weight::from_parts(546_000_000, 0)) + (Weight::from_parts(543_550_000, 0)) .saturating_add(T::DbWeight::get().reads(25 as u64)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } @@ -307,235 +309,237 @@ impl pallet_xyk::WeightInfo for ModuleWeight { // For backwards compatibility and tests impl WeightInfo for () { - // Storage: AssetRegistry Metadata (r:3 w:1) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Bootstrap ActivePair (r:1 w:0) - // Proof Skipped: Bootstrap ActivePair (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk Pools (r:2 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:1) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:0 w:1) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk LiquidityPools (r:0 w:1) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) + // Storage: `AssetRegistry::Metadata` (r:3 w:1) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Bootstrap::ActivePair` (r:1 w:0) + // Proof: `Bootstrap::ActivePair` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::Pools` (r:2 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:1) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:0 w:1) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityPools` (r:0 w:1) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) fn create_pool() -> Weight { - (Weight::from_parts(202_790_000, 0)) + (Weight::from_parts(206_040_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(12 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:3 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:6 w:6) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:3 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:6 w:6) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn sell_asset() -> Weight { - (Weight::from_parts(244_940_000, 0)) + (Weight::from_parts(243_550_000, 0)) .saturating_add(RocksDbWeight::get().reads(16 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:99 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:100 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:100 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk Pools (r:297 w:198) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:400 w:400) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:99 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:100 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:100 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:297 w:198) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:400 w:400) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn multiswap_sell_asset(x: u32, ) -> Weight { - (Weight::from_parts(661_629_000, 0)) - // Standard Error: 425_962 - .saturating_add((Weight::from_parts(272_288_151, 0)).saturating_mul(x as u64)) + (Weight::from_parts(628_100_000, 0)) + // Standard Error: 450_557 + .saturating_add((Weight::from_parts(274_044_457, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(29 as u64)) .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:4 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:6 w:6) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:4 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:6 w:6) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn buy_asset() -> Weight { - (Weight::from_parts(253_260_000, 0)) + (Weight::from_parts(261_921_000, 0)) .saturating_add(RocksDbWeight::get().reads(18 as u64)) .saturating_add(RocksDbWeight::get().writes(9 as u64)) } - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:100 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:99 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:100 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:297 w:198) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:400 w:400) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:100 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:99 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:100 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:297 w:198) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:400 w:400) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn multiswap_buy_asset(x: u32, ) -> Weight { - (Weight::from_parts(691_040_000, 0)) - // Standard Error: 480_931 - .saturating_add((Weight::from_parts(286_614_272, 0)).saturating_mul(x as u64)) + (Weight::from_parts(699_390_000, 0)) + // Standard Error: 516_256 + .saturating_add((Weight::from_parts(290_225_626, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(29 as u64)) .saturating_add(RocksDbWeight::get().reads((10 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(x as u64))) } - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn mint_liquidity() -> Weight { - (Weight::from_parts(241_610_000, 0)) + (Weight::from_parts(246_950_000, 0)) .saturating_add(RocksDbWeight::get().reads(15 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Vesting Vesting (r:2 w:2) - // Proof: Vesting Vesting (max_values: None, max_size: Some(1869), added: 4344, mode: MaxEncodedLen) - // Storage: Tokens Locks (r:2 w:2) - // Proof: Tokens Locks (max_values: None, max_size: Some(1261), added: 3736, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Vesting::Vesting` (r:2 w:2) + // Proof: `Vesting::Vesting` (`max_values`: None, `max_size`: Some(1869), added: 4344, mode: `MaxEncodedLen`) + // Storage: `Tokens::Locks` (r:2 w:2) + // Proof: `Tokens::Locks` (`max_values`: None, `max_size`: Some(1261), added: 3736, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn mint_liquidity_using_vesting_native_tokens() -> Weight { - (Weight::from_parts(277_529_000, 0)) + (Weight::from_parts(284_941_000, 0)) .saturating_add(RocksDbWeight::get().reads(14 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:1 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:5 w:5) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:1 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:5 w:5) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::ActivatedNativeRewardsLiq` (r:1 w:0) + // Proof: `ProofOfStake::ActivatedNativeRewardsLiq` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) fn burn_liquidity() -> Weight { - (Weight::from_parts(223_960_000, 0)) - .saturating_add(RocksDbWeight::get().reads(14 as u64)) + (Weight::from_parts(223_050_000, 0)) + .saturating_add(RocksDbWeight::get().reads(15 as u64)) .saturating_add(RocksDbWeight::get().writes(10 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:4 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:7 w:7) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:4 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:7 w:7) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn provide_liquidity_with_conversion() -> Weight { - (Weight::from_parts(386_749_000, 0)) + (Weight::from_parts(394_410_000, 0)) .saturating_add(RocksDbWeight::get().reads(22 as u64)) .saturating_add(RocksDbWeight::get().writes(11 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: AssetRegistry Metadata (r:2 w:0) - // Proof Skipped: AssetRegistry Metadata (max_values: None, max_size: None, mode: Measured) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:0) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsInfo (r:1 w:1) - // Proof Skipped: ProofOfStake RewardsInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:8 w:8) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Xyk LiquidityAssets (r:2 w:0) - // Proof: Xyk LiquidityAssets (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:2 w:2) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:2 w:1) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Maintenance MaintenanceStatus (r:1 w:0) - // Proof: Maintenance MaintenanceStatus (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:2) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens NextCurrencyId (r:1 w:0) - // Proof: Tokens NextCurrencyId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: ProofOfStake TotalActivatedLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `AssetRegistry::Metadata` (r:2 w:0) + // Proof: `AssetRegistry::Metadata` (`max_values`: None, `max_size`: Some(756), added: 3231, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:0) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::RewardsInfo` (r:1 w:1) + // Proof: `ProofOfStake::RewardsInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:8 w:8) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Xyk::LiquidityAssets` (r:2 w:0) + // Proof: `Xyk::LiquidityAssets` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:2 w:2) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:2 w:1) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Maintenance::MaintenanceStatus` (r:1 w:0) + // Proof: `Maintenance::MaintenanceStatus` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:2) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::NextCurrencyId` (r:1 w:0) + // Proof: `Tokens::NextCurrencyId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:1 w:1) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) fn compound_rewards() -> Weight { - (Weight::from_parts(546_000_000, 0)) + (Weight::from_parts(543_550_000, 0)) .saturating_add(RocksDbWeight::get().reads(25 as u64)) .saturating_add(RocksDbWeight::get().writes(16 as u64)) } diff --git a/runtime/mangata-rococo/src/weights/parachain_staking.rs b/runtime/mangata-rococo/src/weights/parachain_staking.rs index aa9ad00b32..bac93023e0 100644 --- a/runtime/mangata-rococo/src/weights/parachain_staking.rs +++ b/runtime/mangata-rococo/src/weights/parachain_staking.rs @@ -19,16 +19,16 @@ //! Autogenerated weights for parachain_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama"), DB CACHE: 1024 +//! DATE: 2023-11-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("mangata-kusama"), DB CACHE: 1024 // Executed Command: // target/release/mangata-node // benchmark // pallet -// -l=info,xyk=error,collective-mangata=warn,bootstrap=warn +// -l=info,runtime::collective=warn,xyk=warn // --chain -// kusama +// mangata-kusama // --execution // wasm // --wasm-execution @@ -96,1030 +96,1022 @@ pub trait WeightInfo { /// Weights for parachain_staking using the Mangata node and recommended hardware. pub struct ModuleWeight(PhantomData); impl parachain_staking::WeightInfo for ModuleWeight { - // Storage: ParachainStaking TotalSelected (r:1 w:1) - // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::TotalSelected` (r:1 w:1) + // Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_total_selected() -> Weight { - (Weight::from_parts(18_150_000, 0)) + (Weight::from_parts(18_870_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CollatorCommission (r:1 w:1) - // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CollatorCommission` (r:1 w:1) + // Proof: `ParachainStaking::CollatorCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_530_000, 0)) + (Weight::from_parts(18_720_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:1 w:0) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:0) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:0) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:0) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:0) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(128_769_592, 0)) - // Standard Error: 5_183 - .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) - // Standard Error: 5_120 - .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) + (Weight::from_parts(130_382_781, 0)) + // Standard Error: 6_193 + .saturating_add((Weight::from_parts(115_219, 0)).saturating_mul(x as u64)) + // Standard Error: 6_117 + .saturating_add((Weight::from_parts(207_374, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(11 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(40_966_197, 0)) - // Standard Error: 1_766 - .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_947_760, 0)) + // Standard Error: 1_971 + .saturating_add((Weight::from_parts(125_665, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:30 w:30) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:29 w:29) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:30 w:30) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:30 w:30) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::DelegatorState` (r:29 w:29) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:0) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(61_759_888, 0)) - // Standard Error: 25_405 - .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) + (Weight::from_parts(70_829_514, 0)) + // Standard Error: 37_509 + .saturating_add((Weight::from_parts(31_438_101, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(1 as u64)) .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(x as u64))) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_197_562, 0)) - // Standard Error: 1_699 - .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_042_058, 0)) + // Standard Error: 1_850 + .saturating_add((Weight::from_parts(121_294, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_offline() -> Weight { - (Weight::from_parts(39_200_000, 0)) + (Weight::from_parts(38_830_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_online() -> Weight { - (Weight::from_parts(38_610_000, 0)) + (Weight::from_parts(38_480_000, 0)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:0) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:0) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(56_000_000, 0)) + (Weight::from_parts(55_820_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_740_000, 0)) + (Weight::from_parts(58_110_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(90_910_000, 0)) + (Weight::from_parts(93_820_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(87_720_000, 0)) + (Weight::from_parts(90_010_000, 0)) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(30_420_000, 0)) + (Weight::from_parts(30_160_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_860_000, 0)) + (Weight::from_parts(29_260_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking AggregatorMetadata (r:1 w:0) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:0) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(127_734_458, 0)) - // Standard Error: 7_698 - .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) - // Standard Error: 7_439 - .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) + (Weight::from_parts(131_821_406, 0)) + // Standard Error: 12_029 + .saturating_add((Weight::from_parts(301_209, 0)).saturating_mul(x as u64)) + // Standard Error: 11_624 + .saturating_add((Weight::from_parts(224_017, 0)).saturating_mul(y as u64)) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(33_410_000, 0)) + (Weight::from_parts(32_940_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:29 w:29) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:29 w:29) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_848_761, 0)) - // Standard Error: 26_767 - .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) + (Weight::from_parts(26_832_067, 0)) + // Standard Error: 59_764 + .saturating_add((Weight::from_parts(38_917_836, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(T::DbWeight::get().writes(4 as u64)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(x as u64))) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(31_130_000, 0)) + (Weight::from_parts(30_051_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(34_070_000, 0)) + (Weight::from_parts(33_500_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:0) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:0) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_650_000, 0)) + (Weight::from_parts(56_461_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(34_280_000, 0)) + (Weight::from_parts(33_200_000, 0)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(111_770_000, 0)) + (Weight::from_parts(114_090_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(103_940_000, 0)) + (Weight::from_parts(110_800_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(99_690_000, 0)) + (Weight::from_parts(104_330_000, 0)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(31_370_000, 0)) + (Weight::from_parts(31_231_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_290_000, 0)) + (Weight::from_parts(38_000_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_540_000, 0)) + (Weight::from_parts(38_200_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_340_872, 0)) - // Standard Error: 2_236 - .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_650_335, 0)) + // Standard Error: 2_597 + .saturating_add((Weight::from_parts(191_843, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_686_950, 0)) - // Standard Error: 1_638 - .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) + (Weight::from_parts(21_308_475, 0)) + // Standard Error: 2_044 + .saturating_add((Weight::from_parts(166_169, 0)).saturating_mul(x as u64)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:99 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:1 w:1) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:99 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:0) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:1) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:1) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(1_946_910_000, 0)) + (Weight::from_parts(1_823_320_000, 0)) .saturating_add(T::DbWeight::get().reads(102 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:1) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:2 w:2) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(122_120_000, 0)) + (Weight::from_parts(116_050_000, 0)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:32 w:32) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:32 w:31) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:2 w:1) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:32 w:32) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:32 w:31) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(1_493_000_000, 0)) + (Weight::from_parts(1_509_570_000, 0)) .saturating_add(T::DbWeight::get().reads(66 as u64)) .saturating_add(T::DbWeight::get().writes(64 as u64)) } - // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:1 w:1) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(87_790_000, 0)) + (Weight::from_parts(83_300_000, 0)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn passive_session_change() -> Weight { - (Weight::from_parts(7_670_000, 0)) + (Weight::from_parts(7_830_000, 0)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // Storage: ParachainStaking Round (r:1 w:1) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session CurrentIndex (r:1 w:1) - // Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session QueuedChanged (r:1 w:1) - // Proof Skipped: Session QueuedChanged (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session QueuedKeys (r:1 w:1) - // Proof Skipped: Session QueuedKeys (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session DisabledValidators (r:1 w:0) - // Proof Skipped: Session DisabledValidators (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Points (r:1 w:1) - // Proof Skipped: ParachainStaking Points (max_values: None, max_size: None, mode: Measured) - // Storage: Issuance SessionIssuance (r:1 w:1) - // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) - // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:52 w:51) - // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:51 w:102) - // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CollatorCommission (r:1 w:0) - // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:100 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:100 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:101 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:0) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:51 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: Issuance IssuanceConfigStore (r:1 w:0) - // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsSchedules (r:1 w:0) - // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:51 w:0) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Aura Authorities (r:1 w:0) - // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) - // Storage: ParachainStaking SelectedCandidates (r:0 w:1) - // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Session Validators (r:0 w:1) - // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::Round` (r:1 w:1) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::CurrentIndex` (r:1 w:1) + // Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::QueuedChanged` (r:1 w:1) + // Proof: `Session::QueuedChanged` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::QueuedKeys` (r:1 w:1) + // Proof: `Session::QueuedKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::DisabledValidators` (r:1 w:0) + // Proof: `Session::DisabledValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Points` (r:1 w:1) + // Proof: `ParachainStaking::Points` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Issuance::SessionIssuance` (r:1 w:1) + // Proof: `Issuance::SessionIssuance` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::RoundAggregatorInfo` (r:1 w:2) + // Proof: `ParachainStaking::RoundAggregatorInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AwardedPts` (r:52 w:51) + // Proof: `ParachainStaking::AwardedPts` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AtStake` (r:51 w:102) + // Proof: `ParachainStaking::AtStake` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CollatorCommission` (r:1 w:0) + // Proof: `ParachainStaking::CollatorCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:100 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:100 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:101 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:0) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:0) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::TotalSelected` (r:1 w:0) + // Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:51 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Issuance::IssuanceConfigStore` (r:1 w:0) + // Proof: `Issuance::IssuanceConfigStore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:1) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:100 w:0) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Session::NextKeys` (r:51 w:0) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Aura::Authorities` (r:1 w:0) + // Proof: `Aura::Authorities` (`max_values`: Some(1), `max_size`: Some(3200004), added: 3200499, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::SelectedCandidates` (r:0 w:1) + // Proof: `ParachainStaking::SelectedCandidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:0 w:51) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::Validators` (r:0 w:1) + // Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(1_634_783_507, 0)) - // Standard Error: 32_199 - .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) - // Standard Error: 66_033 - .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) - // Standard Error: 114_378 - .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) - .saturating_add(T::DbWeight::get().reads(226 as u64)) + (Weight::from_parts(1_800_080_164, 0)) + // Standard Error: 52_977 + .saturating_add((Weight::from_parts(19_522_895, 0)).saturating_mul(x as u64)) + // Standard Error: 108_644 + .saturating_add((Weight::from_parts(7_314_007, 0)).saturating_mul(y as u64)) + // Standard Error: 188_185 + .saturating_add((Weight::from_parts(46_450_704, 0)).saturating_mul(z as u64)) + .saturating_add(T::DbWeight::get().reads(224 as u64)) .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(220 as u64)) + .saturating_add(T::DbWeight::get().writes(219 as u64)) } } // For backwards compatibility and tests impl WeightInfo for () { - // Storage: ParachainStaking TotalSelected (r:1 w:1) - // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::TotalSelected` (r:1 w:1) + // Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_total_selected() -> Weight { - (Weight::from_parts(18_150_000, 0)) + (Weight::from_parts(18_870_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CollatorCommission (r:1 w:1) - // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CollatorCommission` (r:1 w:1) + // Proof: `ParachainStaking::CollatorCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_collator_commission() -> Weight { - (Weight::from_parts(18_530_000, 0)) + (Weight::from_parts(18_720_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:1 w:0) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:0) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:0) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:0) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:0) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn join_candidates(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(128_769_592, 0)) - // Standard Error: 5_183 - .saturating_add((Weight::from_parts(124_370, 0)).saturating_mul(x as u64)) - // Standard Error: 5_120 - .saturating_add((Weight::from_parts(134_647, 0)).saturating_mul(y as u64)) + (Weight::from_parts(130_382_781, 0)) + // Standard Error: 6_193 + .saturating_add((Weight::from_parts(115_219, 0)).saturating_mul(x as u64)) + // Standard Error: 6_117 + .saturating_add((Weight::from_parts(207_374, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(40_966_197, 0)) - // Standard Error: 1_766 - .saturating_add((Weight::from_parts(121_647, 0)).saturating_mul(x as u64)) + (Weight::from_parts(40_947_760, 0)) + // Standard Error: 1_971 + .saturating_add((Weight::from_parts(125_665, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:30 w:30) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:30 w:30) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking DelegatorState (r:29 w:29) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:30 w:30) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:30 w:30) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::DelegatorState` (r:29 w:29) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:0) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(61_759_888, 0)) - // Standard Error: 25_405 - .saturating_add((Weight::from_parts(31_682_004, 0)).saturating_mul(x as u64)) + (Weight::from_parts(70_829_514, 0)) + // Standard Error: 37_509 + .saturating_add((Weight::from_parts(31_438_101, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(x as u64))) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn cancel_leave_candidates(x: u32, ) -> Weight { - (Weight::from_parts(39_197_562, 0)) - // Standard Error: 1_699 - .saturating_add((Weight::from_parts(119_579, 0)).saturating_mul(x as u64)) + (Weight::from_parts(39_042_058, 0)) + // Standard Error: 1_850 + .saturating_add((Weight::from_parts(121_294, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_offline() -> Weight { - (Weight::from_parts(39_200_000, 0)) + (Weight::from_parts(38_830_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_online() -> Weight { - (Weight::from_parts(38_610_000, 0)) + (Weight::from_parts(38_480_000, 0)) .saturating_add(RocksDbWeight::get().reads(3 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:0) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:0) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_candidate_bond_more() -> Weight { - (Weight::from_parts(56_000_000, 0)) + (Weight::from_parts(55_820_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_candidate_bond_less() -> Weight { - (Weight::from_parts(57_740_000, 0)) + (Weight::from_parts(58_110_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_candidate_bond_more() -> Weight { - (Weight::from_parts(90_910_000, 0)) + (Weight::from_parts(93_820_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn execute_candidate_bond_less() -> Weight { - (Weight::from_parts(87_720_000, 0)) + (Weight::from_parts(90_010_000, 0)) .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(5 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_candidate_bond_more() -> Weight { - (Weight::from_parts(30_420_000, 0)) + (Weight::from_parts(30_160_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_candidate_bond_less() -> Weight { - (Weight::from_parts(29_860_000, 0)) + (Weight::from_parts(29_260_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking AggregatorMetadata (r:1 w:0) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:1 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:1 w:0) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:0) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:1 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:1 w:0) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn delegate(x: u32, y: u32, ) -> Weight { - (Weight::from_parts(127_734_458, 0)) - // Standard Error: 7_698 - .saturating_add((Weight::from_parts(369_909, 0)).saturating_mul(x as u64)) - // Standard Error: 7_439 - .saturating_add((Weight::from_parts(357_907, 0)).saturating_mul(y as u64)) + (Weight::from_parts(131_821_406, 0)) + // Standard Error: 12_029 + .saturating_add((Weight::from_parts(301_209, 0)).saturating_mul(x as u64)) + // Standard Error: 11_624 + .saturating_add((Weight::from_parts(224_017, 0)).saturating_mul(y as u64)) .saturating_add(RocksDbWeight::get().reads(10 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_leave_delegators() -> Weight { - (Weight::from_parts(33_410_000, 0)) + (Weight::from_parts(32_940_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:29 w:29) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:29 w:29) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_leave_delegators(x: u32, ) -> Weight { - (Weight::from_parts(24_848_761, 0)) - // Standard Error: 26_767 - .saturating_add((Weight::from_parts(38_484_757, 0)).saturating_mul(x as u64)) + (Weight::from_parts(26_832_067, 0)) + // Standard Error: 59_764 + .saturating_add((Weight::from_parts(38_917_836, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(x as u64))) .saturating_add(RocksDbWeight::get().writes(4 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(x as u64))) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_leave_delegators() -> Weight { - (Weight::from_parts(31_130_000, 0)) + (Weight::from_parts(30_051_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_revoke_delegation() -> Weight { - (Weight::from_parts(34_070_000, 0)) + (Weight::from_parts(33_500_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:0) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:0) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:0) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_delegator_bond_more() -> Weight { - (Weight::from_parts(56_650_000, 0)) + (Weight::from_parts(56_461_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn schedule_delegator_bond_less() -> Weight { - (Weight::from_parts(34_280_000, 0)) + (Weight::from_parts(33_200_000, 0)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_revoke_delegation() -> Weight { - (Weight::from_parts(111_770_000, 0)) + (Weight::from_parts(114_090_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_delegator_bond_more() -> Weight { - (Weight::from_parts(103_940_000, 0)) + (Weight::from_parts(110_800_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: MultiPurposeLiquidity ReserveStatus (r:1 w:1) - // Proof: MultiPurposeLiquidity ReserveStatus (max_values: None, max_size: Some(124), added: 2599, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:1) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:1) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Total (r:1 w:1) - // Proof Skipped: ParachainStaking Total (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:1 w:1) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `MultiPurposeLiquidity::ReserveStatus` (r:1 w:1) + // Proof: `MultiPurposeLiquidity::ReserveStatus` (`max_values`: None, `max_size`: Some(124), added: 2599, mode: `MaxEncodedLen`) + // Storage: `Tokens::Accounts` (r:1 w:1) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:1) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Total` (r:1 w:1) + // Proof: `ParachainStaking::Total` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute_delegator_bond_less() -> Weight { - (Weight::from_parts(99_690_000, 0)) + (Weight::from_parts(104_330_000, 0)) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(6 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_revoke_delegation() -> Weight { - (Weight::from_parts(31_370_000, 0)) + (Weight::from_parts(31_231_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_delegator_bond_more() -> Weight { - (Weight::from_parts(35_290_000, 0)) + (Weight::from_parts(38_000_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking DelegatorState (r:1 w:1) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:1) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) fn cancel_delegator_bond_less() -> Weight { - (Weight::from_parts(35_540_000, 0)) + (Weight::from_parts(38_200_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: Xyk LiquidityPools (r:1 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `Xyk::LiquidityPools` (r:1 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(28_340_872, 0)) - // Standard Error: 2_236 - .saturating_add((Weight::from_parts(153_025, 0)).saturating_mul(x as u64)) + (Weight::from_parts(28_650_335, 0)) + // Standard Error: 2_597 + .saturating_add((Weight::from_parts(191_843, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(2 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_staking_liquidity_token(x: u32, ) -> Weight { - (Weight::from_parts(20_686_950, 0)) - // Standard Error: 1_638 - .saturating_add((Weight::from_parts(140_026, 0)).saturating_mul(x as u64)) + (Weight::from_parts(21_308_475, 0)) + // Standard Error: 2_044 + .saturating_add((Weight::from_parts(166_169, 0)).saturating_mul(x as u64)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } - // Storage: ParachainStaking CandidateState (r:99 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking DelegatorState (r:1 w:0) - // Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:1 w:1) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:99 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::DelegatorState` (r:1 w:0) + // Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:1 w:1) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:1) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn aggregator_update_metadata() -> Weight { - (Weight::from_parts(1_946_910_000, 0)) + (Weight::from_parts(1_823_320_000, 0)) .saturating_add(RocksDbWeight::get().reads(102 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } - // Storage: ParachainStaking CandidateState (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:1) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking AggregatorMetadata (r:2 w:2) - // Proof Skipped: ParachainStaking AggregatorMetadata (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::CandidateState` (r:1 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:1) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AggregatorMetadata` (r:2 w:2) + // Proof: `ParachainStaking::AggregatorMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) fn update_candidate_aggregator() -> Weight { - (Weight::from_parts(122_120_000, 0)) + (Weight::from_parts(116_050_000, 0)) .saturating_add(RocksDbWeight::get().reads(4 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } - // Storage: ParachainStaking RoundCollatorRewardInfo (r:2 w:1) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:32 w:32) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:32 w:31) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:2 w:1) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:32 w:32) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:32 w:31) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn payout_collator_rewards() -> Weight { - (Weight::from_parts(1_493_000_000, 0)) + (Weight::from_parts(1_509_570_000, 0)) .saturating_add(RocksDbWeight::get().reads(66 as u64)) .saturating_add(RocksDbWeight::get().writes(64 as u64)) } - // Storage: ParachainStaking RoundCollatorRewardInfo (r:1 w:1) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: System Account (r:2 w:1) - // Proof Skipped: System Account (max_values: None, max_size: None, mode: Measured) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:1 w:1) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `System::Account` (r:2 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) fn payout_delegator_reward() -> Weight { - (Weight::from_parts(87_790_000, 0)) + (Weight::from_parts(83_300_000, 0)) .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } - // Storage: ParachainStaking Round (r:1 w:0) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::Round` (r:1 w:0) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn passive_session_change() -> Weight { - (Weight::from_parts(7_670_000, 0)) + (Weight::from_parts(7_830_000, 0)) .saturating_add(RocksDbWeight::get().reads(1 as u64)) } - // Storage: ParachainStaking Round (r:1 w:1) - // Proof Skipped: ParachainStaking Round (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session CurrentIndex (r:1 w:1) - // Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session QueuedChanged (r:1 w:1) - // Proof Skipped: Session QueuedChanged (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session QueuedKeys (r:1 w:1) - // Proof Skipped: Session QueuedKeys (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Session DisabledValidators (r:1 w:0) - // Proof Skipped: Session DisabledValidators (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking Points (r:1 w:1) - // Proof Skipped: ParachainStaking Points (max_values: None, max_size: None, mode: Measured) - // Storage: Issuance SessionIssuance (r:1 w:1) - // Proof Skipped: Issuance SessionIssuance (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking RoundAggregatorInfo (r:1 w:2) - // Proof Skipped: ParachainStaking RoundAggregatorInfo (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AwardedPts (r:52 w:51) - // Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking AtStake (r:51 w:102) - // Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) - // Storage: ParachainStaking CollatorCommission (r:1 w:0) - // Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking StakingLiquidityTokens (r:1 w:1) - // Proof Skipped: ParachainStaking StakingLiquidityTokens (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Xyk LiquidityPools (r:100 w:0) - // Proof: Xyk LiquidityPools (max_values: None, max_size: Some(41), added: 2516, mode: MaxEncodedLen) - // Storage: Xyk Pools (r:100 w:0) - // Proof: Xyk Pools (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - // Storage: Tokens TotalIssuance (r:101 w:1) - // Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) - // Storage: ParachainStaking CandidatePool (r:1 w:0) - // Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateAggregator (r:1 w:0) - // Proof Skipped: ParachainStaking CandidateAggregator (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking TotalSelected (r:1 w:0) - // Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking CandidateState (r:51 w:0) - // Proof Skipped: ParachainStaking CandidateState (max_values: None, max_size: None, mode: Measured) - // Storage: Issuance IssuanceConfigStore (r:1 w:0) - // Proof Skipped: Issuance IssuanceConfigStore (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake RewardsSchedules (r:1 w:0) - // Proof Skipped: ProofOfStake RewardsSchedules (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake ScheduleRewardsPerSingleLiquidity (r:1 w:1) - // Proof Skipped: ProofOfStake ScheduleRewardsPerSingleLiquidity (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake PromotedPoolRewards (r:1 w:1) - // Proof Skipped: ProofOfStake PromotedPoolRewards (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ProofOfStake TotalActivatedLiquidity (r:100 w:0) - // Proof Skipped: ProofOfStake TotalActivatedLiquidity (max_values: None, max_size: None, mode: Measured) - // Storage: Tokens Accounts (r:2 w:2) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - // Storage: Session NextKeys (r:51 w:0) - // Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - // Storage: Aura Authorities (r:1 w:0) - // Proof: Aura Authorities (max_values: Some(1), max_size: Some(3200004), added: 3200499, mode: MaxEncodedLen) - // Storage: ParachainStaking SelectedCandidates (r:0 w:1) - // Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) - // Storage: ParachainStaking RoundCollatorRewardInfo (r:0 w:51) - // Proof Skipped: ParachainStaking RoundCollatorRewardInfo (max_values: None, max_size: None, mode: Measured) - // Storage: Session Validators (r:0 w:1) - // Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) + // Storage: `ParachainStaking::Round` (r:1 w:1) + // Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::CurrentIndex` (r:1 w:1) + // Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::QueuedChanged` (r:1 w:1) + // Proof: `Session::QueuedChanged` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::QueuedKeys` (r:1 w:1) + // Proof: `Session::QueuedKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Session::DisabledValidators` (r:1 w:0) + // Proof: `Session::DisabledValidators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::Points` (r:1 w:1) + // Proof: `ParachainStaking::Points` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Issuance::SessionIssuance` (r:1 w:1) + // Proof: `Issuance::SessionIssuance` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::RoundAggregatorInfo` (r:1 w:2) + // Proof: `ParachainStaking::RoundAggregatorInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AwardedPts` (r:52 w:51) + // Proof: `ParachainStaking::AwardedPts` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::AtStake` (r:51 w:102) + // Proof: `ParachainStaking::AtStake` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CollatorCommission` (r:1 w:0) + // Proof: `ParachainStaking::CollatorCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::StakingLiquidityTokens` (r:1 w:1) + // Proof: `ParachainStaking::StakingLiquidityTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `Xyk::LiquidityPools` (r:100 w:0) + // Proof: `Xyk::LiquidityPools` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + // Storage: `Xyk::Pools` (r:100 w:0) + // Proof: `Xyk::Pools` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`) + // Storage: `Tokens::TotalIssuance` (r:101 w:1) + // Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::CandidatePool` (r:1 w:0) + // Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateAggregator` (r:1 w:0) + // Proof: `ParachainStaking::CandidateAggregator` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::TotalSelected` (r:1 w:0) + // Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::CandidateState` (r:51 w:0) + // Proof: `ParachainStaking::CandidateState` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Issuance::IssuanceConfigStore` (r:1 w:0) + // Proof: `Issuance::IssuanceConfigStore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::PromotedPoolRewards` (r:1 w:1) + // Proof: `ProofOfStake::PromotedPoolRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ProofOfStake::TotalActivatedLiquidity` (r:100 w:0) + // Proof: `ProofOfStake::TotalActivatedLiquidity` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Tokens::Accounts` (r:2 w:2) + // Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) + // Storage: `Session::NextKeys` (r:51 w:0) + // Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Aura::Authorities` (r:1 w:0) + // Proof: `Aura::Authorities` (`max_values`: Some(1), `max_size`: Some(3200004), added: 3200499, mode: `MaxEncodedLen`) + // Storage: `ParachainStaking::SelectedCandidates` (r:0 w:1) + // Proof: `ParachainStaking::SelectedCandidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + // Storage: `ParachainStaking::RoundCollatorRewardInfo` (r:0 w:51) + // Proof: `ParachainStaking::RoundCollatorRewardInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) + // Storage: `Session::Validators` (r:0 w:1) + // Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn active_session_change(x: u32, y: u32, z: u32, ) -> Weight { - (Weight::from_parts(1_634_783_507, 0)) - // Standard Error: 32_199 - .saturating_add((Weight::from_parts(18_829_187, 0)).saturating_mul(x as u64)) - // Standard Error: 66_033 - .saturating_add((Weight::from_parts(7_604_897, 0)).saturating_mul(y as u64)) - // Standard Error: 114_378 - .saturating_add((Weight::from_parts(47_173_573, 0)).saturating_mul(z as u64)) - .saturating_add(RocksDbWeight::get().reads(226 as u64)) + (Weight::from_parts(1_800_080_164, 0)) + // Standard Error: 52_977 + .saturating_add((Weight::from_parts(19_522_895, 0)).saturating_mul(x as u64)) + // Standard Error: 108_644 + .saturating_add((Weight::from_parts(7_314_007, 0)).saturating_mul(y as u64)) + // Standard Error: 188_185 + .saturating_add((Weight::from_parts(46_450_704, 0)).saturating_mul(z as u64)) + .saturating_add(RocksDbWeight::get().reads(224 as u64)) .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(x as u64))) - .saturating_add(RocksDbWeight::get().writes(220 as u64)) + .saturating_add(RocksDbWeight::get().writes(219 as u64)) } } From 9e9594f12d7923dae99e18d1728c86d11c871079 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Wed, 22 Nov 2023 16:34:07 +0100 Subject: [PATCH 124/125] Update docs with rules for unlocking tokens --- pallets/proof-of-stake/src/lib.rs | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 1ea8c25265..cbe10a9380 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -90,6 +90,48 @@ //! [`Pallet::deactivate_liquidity_for_3rdparty_rewards`]. //! * Liquidity can be activated for liquidity mining rewards [`Pallet::activate_liquidity`]. //! * Liquidity can be activated for scheduled rewards [`Pallet::activate_liquidity_for_3rdparty_rewards`] with [`ThirdPartyActivationKind::Mining`]. +//! +//! ## Unlocking tokens used for rewards +//! +//! Once liquidity tokens are used to sign up for rewards they persist on user account but they +//! become reserved/untransferable. In order to unlock them they need to be deactivated. Depending on rewards kind +//! (native or 3rdparty) deactivation process differs. +//! +//! ### Native rewards +//! - If liq tokens are used *only* for native rewards they are locked/unlocked in the same moment +//! liquidity is activated/deactivated. +//! - If liq tokens are `reactivated` (see [`ThirdPartyActivationKind::NativeRewardsLiquidity`]) +//! then: +//! * remaining( **not reactivated**) liq tokens that were not reactivated can be unlocked using [`Pallet::deactivate_liquidity_for_native_rewards`] +//! * reactivated liq tokens can be unlocked only after all of liquidity tokens ( **not only reactivated part** ) are deactivated from 3rdparty tokens and then [`Pallet::deactivate_liquidity_for_native_rewards`] is used +//! +//! ### 3rdparty rewards +//! If liq tokens are used for 3rdparty rewards they are locked in the moment of activation. To get +//! them unlocked you need to unlock all of them(liq tokens) for every 3rdparty rewards schedule/token they were used/activated. +//! Even if you want to deactivate only part of it, all of them needs to be deactivated, afterwards they +//! can be reactivated with no penalty in terms of recevied rewards (you will get same amount of rewards as you would +//! not be deactivating them) +//! +//! ### 3rdparty Rewards +//! +//! It may happen that a single liquidity token is rewarded with: +//! - Liquidity Mining Rewards - because the pool was promoted by the council. +//! - Scheduled rewards with token X - because Alice decided to do so. +//! - Scheduled rewards with token Y - because Bob decided to do so. +//! +//! In that case, a single liquidity token can be used to obtain rewards from multiple sources. There are +//! several options to do that: +//! +//! - The user can reuse liquidity used for liquidity mining rewards to claim scheduled rewards. In +//! this case, [`Pallet::activate_liquidity_for_3rdparty_rewards`] should be used with [`ActivateKind::LiquidityMining`]. +//! +//! - The user can reuse liquidity used for scheduled rewards (X) to sign up for rewards from other tokens (provided by Bob). In that case, [`Pallet::activate_liquidity_for_3rdparty_rewards`] should be used with [`ActivateKind::ActivatedLiquidity(X)`]. +//! +//! - The user can't directly provide liquidity activated for scheduled rewards to activate it for native rewards. Instead: +//! * Liquidity used for schedule rewards can be deactivated +//! [`Pallet::deactivate_liquidity_for_3rdparty_rewards`]. +//! * Liquidity can be activated for liquidity mining rewards [`Pallet::activate_liquidity`]. +//! * Liquidity can be activated for scheduled rewards [`Pallet::activate_liquidity_for_3rdparty_rewards`] with [`ThirdPartyActivationKind::Mining`]. use frame_support::pallet_prelude::*; From 53a619437f7df16ee9dc287bc61e07c176416df6 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Thu, 23 Nov 2023 17:27:32 +0100 Subject: [PATCH 125/125] Fix error type when user tries to deactivate more token than he owns --- pallets/proof-of-stake/src/reward_info.rs | 8 +++-- pallets/proof-of-stake/src/tests.rs | 40 +++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/pallets/proof-of-stake/src/reward_info.rs b/pallets/proof-of-stake/src/reward_info.rs index 3a6629055c..91380da981 100644 --- a/pallets/proof-of-stake/src/reward_info.rs +++ b/pallets/proof-of-stake/src/reward_info.rs @@ -243,11 +243,15 @@ where #[derive(Debug)] pub enum RewardsCalcError { CheckpointMathError, + NotEnoughAssets, } impl Into> for RewardsCalcError { fn into(self) -> Error { - Error::::LiquidityCheckpointMathError + match self { + RewardsCalcError::CheckpointMathError => Error::::LiquidityCheckpointMathError, + RewardsCalcError::NotEnoughAssets => Error::::NotEnoughAssets, + } } } @@ -326,7 +330,7 @@ where .rewards_info .activated_amount .checked_sub(&liquidity_assets_removed) - .ok_or(RewardsCalcError::CheckpointMathError)?; + .ok_or(RewardsCalcError::NotEnoughAssets)?; let missing_at_checkpoint_new = T::calculate_curve_position(&self.rewards_context, &self.rewards_info) diff --git a/pallets/proof-of-stake/src/tests.rs b/pallets/proof-of-stake/src/tests.rs index f5f3daa75b..6423af3b1e 100644 --- a/pallets/proof-of-stake/src/tests.rs +++ b/pallets/proof-of-stake/src/tests.rs @@ -4269,3 +4269,43 @@ fn user_can_withdraw_liquidity_from_withdrown_rewards_when_its_not_used_for_liqu ); }); } + +#[test] +#[serial] +fn test_NotEnoughAssets_is_triggered_when_user_wants_to_deactive_more_tokens_that_he_owns() { + ExtBuilder::new() + .issue(ALICE, REWARD_TOKEN, REWARD_AMOUNT) + .issue(BOB, LIQUIDITY_TOKEN, 100) + .execute_with_default_mocks(|| { + System::set_block_number(1); + + ProofOfStake::reward_pool( + RuntimeOrigin::signed(ALICE), + REWARDED_PAIR, + REWARD_TOKEN, + REWARD_AMOUNT, + 10u32.into(), + ) + .unwrap(); + + roll_to_session::(1); + ProofOfStake::activate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(BOB), + LIQUIDITY_TOKEN, + 100, + REWARD_TOKEN, + None, + ) + .unwrap(); + + assert_err_ignore_postinfo!( + ProofOfStake::deactivate_liquidity_for_3rdparty_rewards( + RuntimeOrigin::signed(CHARLIE), + LIQUIDITY_TOKEN, + 101, + REWARD_TOKEN, + ), + Error::::NotEnoughAssets + ); + }); +}