From 45bc717e0d993906bed89e18e2708b68c55c6966 Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Tue, 16 May 2023 16:07:13 +0200 Subject: [PATCH 01/10] feat(loans): `being_block` hook to update interest rates --- crates/loans/src/default_weights.rs | 29 +++++++++++++++++++++++++++ crates/loans/src/interest.rs | 5 +++++ crates/loans/src/lib.rs | 31 +++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) diff --git a/crates/loans/src/default_weights.rs b/crates/loans/src/default_weights.rs index 7a9e5d9329..0d648c19e0 100644 --- a/crates/loans/src/default_weights.rs +++ b/crates/loans/src/default_weights.rs @@ -37,6 +37,7 @@ use sp_std::marker::PhantomData; /// Weight functions needed for loans. pub trait WeightInfo { + fn on_initialize(u: u32, ) -> Weight; fn add_market() -> Weight; fn activate_market() -> Weight; fn update_rate_model() -> Weight; @@ -63,6 +64,20 @@ pub trait WeightInfo { /// Weights for loans using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { + fn on_initialize(u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1536 + u * (127 ±0)` + // Estimated: `16631 + u * (10916 ±0)` + // Minimum execution time: 63_664_000 picoseconds. + Weight::from_parts(64_646_000, 16631) + // Standard Error: 52_342 + .saturating_add(Weight::from_parts(28_651_201, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(u.into()))) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(u.into()))) + .saturating_add(Weight::from_parts(0, 10916).saturating_mul(u.into())) + } /// Storage: Loans Markets (r:2 w:1) /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) /// Storage: Loans UnderlyingAssetId (r:1 w:1) @@ -656,6 +671,20 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { + fn on_initialize(u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1536 + u * (127 ±0)` + // Estimated: `16631 + u * (10916 ±0)` + // Minimum execution time: 63_664_000 picoseconds. + Weight::from_parts(64_646_000, 16631) + // Standard Error: 52_342 + .saturating_add(Weight::from_parts(28_651_201, 0).saturating_mul(u.into())) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(u.into()))) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(u.into()))) + .saturating_add(Weight::from_parts(0, 10916).saturating_mul(u.into())) + } /// Storage: Loans Markets (r:2 w:1) /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) /// Storage: Loans UnderlyingAssetId (r:1 w:1) diff --git a/crates/loans/src/interest.rs b/crates/loans/src/interest.rs index 095113c14d..3000d0362e 100644 --- a/crates/loans/src/interest.rs +++ b/crates/loans/src/interest.rs @@ -48,6 +48,11 @@ impl Pallet { BorrowRate::::insert(asset_id, borrow_rate); SupplyRate::::insert(asset_id, supply_rate); ExchangeRate::::insert(asset_id, exchange_rate); + // Flip the re-accrual boolean flag. If the current accrual was triggered by a user, + // the flag is enabled, which causes the next block will accrue interest again and + // disable the flag. This ensures the redundant storage always has up-to-date interest + // rates which the UI can display. + MarketToReaccrue::::insert(asset_id, !Self::market_to_reaccrue(asset_id)); Self::on_exchange_rate_change(&asset_id); Self::deposit_event(Event::::InterestAccrued { diff --git a/crates/loans/src/lib.rs b/crates/loans/src/lib.rs index 0ec78e4ce6..8f1e9a278d 100644 --- a/crates/loans/src/lib.rs +++ b/crates/loans/src/lib.rs @@ -434,6 +434,14 @@ pub mod pallet { }, } + #[pallet::hooks] + impl Hooks for Pallet { + fn on_initialize(n: T::BlockNumber) -> Weight { + let iterations = Self::begin_block(n); + ::WeightInfo::on_initialize(iterations) + } + } + /// The timestamp of the last calculation of accrued interest #[pallet::storage] #[pallet::getter(fn last_accrued_interest_time)] @@ -506,6 +514,11 @@ pub mod pallet { #[pallet::storage] pub type Markets = StorageMap<_, Blake2_128Concat, CurrencyId, Market>>; + /// Mapping of underlying currency id to its market + #[pallet::storage] + #[pallet::getter(fn market_to_reaccrue)] + pub type MarketToReaccrue = StorageMap<_, Blake2_128Concat, CurrencyId, bool, ValueQuery>; + /// Mapping of lend_token id to underlying currency id /// `lend_token id`: voucher token id /// `asset id`: underlying token id @@ -1266,6 +1279,24 @@ pub mod pallet { } impl Pallet { + pub fn begin_block(_height: T::BlockNumber) -> u32 { + let mut iterations = 0; + for (asset_id, _) in Self::active_markets() { + iterations += 1; + if Self::market_to_reaccrue(asset_id) { + if let Err(e) = Self::accrue_interest(asset_id) { + log::trace!( + target: "loans::accrue_interest", + "error: {:?}, failed to accrue interest for: {:?}", + e, + asset_id, + ); + } + } + } + iterations + } + #[cfg_attr(any(test, feature = "integration-tests"), visibility::make(pub))] fn account_deposits(lend_token_id: CurrencyId, supplier: &T::AccountId) -> Amount { Amount::new(AccountDeposits::::get(lend_token_id, supplier), lend_token_id) From d06086bb6400aecf5361775f99f8733f7969ee3c Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Wed, 17 May 2023 14:47:31 +0200 Subject: [PATCH 02/10] test(loans): interest rate hook unit test --- crates/loans/src/lib.rs | 2 +- crates/loans/src/mock.rs | 2 +- crates/loans/src/tests.rs | 88 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 2 deletions(-) diff --git a/crates/loans/src/lib.rs b/crates/loans/src/lib.rs index 8f1e9a278d..5f658871b1 100644 --- a/crates/loans/src/lib.rs +++ b/crates/loans/src/lib.rs @@ -34,7 +34,7 @@ use frame_support::{ log, pallet_prelude::*, require_transactional, - traits::{tokens::fungibles::Inspect, OnRuntimeUpgrade, UnixTime}, + traits::{tokens::fungibles::Inspect, UnixTime}, transactional, PalletId, }; use frame_system::pallet_prelude::*; diff --git a/crates/loans/src/mock.rs b/crates/loans/src/mock.rs index f07478fee8..64dbac180b 100644 --- a/crates/loans/src/mock.rs +++ b/crates/loans/src/mock.rs @@ -363,8 +363,8 @@ pub(crate) fn _run_to_block(n: BlockNumber) { Loans::on_finalize(System::block_number()); for b in (System::block_number() + 1)..=n { System::set_block_number(b); - Loans::on_initialize(b); TimestampPallet::set_timestamp(6000 * b); + Loans::on_initialize(b); if b != n { Loans::on_finalize(b); } diff --git a/crates/loans/src/tests.rs b/crates/loans/src/tests.rs index 9990fa4299..f2bbe1b4a1 100644 --- a/crates/loans/src/tests.rs +++ b/crates/loans/src/tests.rs @@ -1519,3 +1519,91 @@ fn redeem_amount_matches_freed_underlying() { ); }) } + +fn read_interest_rates( + previous_supply_rate: &mut FixedU128, + previous_borrow_rate: &mut FixedU128, + current_supply_rate: &mut FixedU128, + current_borrow_rate: &mut FixedU128, +) { + *previous_supply_rate = *current_supply_rate; + *previous_borrow_rate = *current_borrow_rate; + *current_supply_rate = Loans::supply_rate(DOT); + *current_borrow_rate = Loans::borrow_rate(DOT); +} + +#[test] +fn interest_rate_hook_works() { + new_test_ext().execute_with(|| { + let mut previous_supply_rate = Default::default(); + let mut previous_borrow_rate = Default::default(); + + let mut current_supply_rate = Default::default(); + let mut current_borrow_rate = Default::default(); + + // Run to block 1 and accrue interest so further accruals set interest rate storage + _run_to_block(1); + Loans::accrue_interest(DOT).unwrap(); + + _run_to_block(2); + // Mint and borrow so both interest rates will be non-zero + // This enables the re-accrual flag for next block + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::deposit_all_collateral(RuntimeOrigin::signed(ALICE), DOT)); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(10))); + read_interest_rates( + &mut previous_supply_rate, + &mut previous_borrow_rate, + &mut current_supply_rate, + &mut current_borrow_rate, + ); + + // The hook on block 3 auto-accrues interest so storage items are updated + _run_to_block(3); + + read_interest_rates( + &mut previous_supply_rate, + &mut previous_borrow_rate, + &mut current_supply_rate, + &mut current_borrow_rate, + ); + // The previous block ended with a `borrow` that did not accrue interest. + // This means that re-accruing will increase both borrow and supply rates + // because market utilization increased. + assert!(current_supply_rate.gt(&previous_supply_rate)); + assert!(current_borrow_rate.gt(&previous_borrow_rate)); + + // The hook on block 4 does not auto-accrue interest + _run_to_block(4); + + read_interest_rates( + &mut previous_supply_rate, + &mut previous_borrow_rate, + &mut current_supply_rate, + &mut current_borrow_rate, + ); + assert_eq!(current_supply_rate, previous_supply_rate); + assert_eq!(current_borrow_rate, previous_borrow_rate); + // This enables the re-accrual flag for next block + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + + // The hook on block 5 accrues interest + _run_to_block(5); + read_interest_rates( + &mut previous_supply_rate, + &mut previous_borrow_rate, + &mut current_supply_rate, + &mut current_borrow_rate, + ); + // Interacting with the market during this block will not re-accrue + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + read_interest_rates( + &mut previous_supply_rate, + &mut previous_borrow_rate, + &mut current_supply_rate, + &mut current_borrow_rate, + ); + assert_eq!(current_supply_rate, previous_supply_rate); + assert_eq!(current_borrow_rate, previous_borrow_rate); + }); +} From 13e5d67574ac0bb4c782e53f1bdf03135d00656b Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Wed, 17 May 2023 18:05:38 +0200 Subject: [PATCH 03/10] chore(loans): add benchmark for `on_initialize` --- crates/loans/src/benchmarking.rs | 30 +- crates/loans/src/default_weights.rs | 994 +++++++++--------- .../runtime/kintsugi/src/weights/loans.rs | 209 ++-- .../testnet-interlay/src/weights/loans.rs | 553 +++++----- .../testnet-kintsugi/src/weights/loans.rs | 545 +++++----- 5 files changed, 1204 insertions(+), 1127 deletions(-) diff --git a/crates/loans/src/benchmarking.rs b/crates/loans/src/benchmarking.rs index df282400ad..bbd5141279 100644 --- a/crates/loans/src/benchmarking.rs +++ b/crates/loans/src/benchmarking.rs @@ -5,7 +5,7 @@ use super::*; use crate::{AccountBorrows, Pallet as Loans}; -use frame_benchmarking::v2::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller}; +use frame_benchmarking::v2::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller, Linear}; use frame_support::assert_ok; use frame_system::{self, RawOrigin as SystemOrigin}; use oracle::Pallet as Oracle; @@ -150,6 +150,34 @@ pub mod benchmarks { use super::*; + #[benchmark] + pub fn on_initialize(u: Linear<1, 2>) { + initialize::(); + + let caller: T::AccountId = whitelisted_caller(); + transfer_initial_balance::(caller.clone()); + let deposit_amount: u32 = 200_000_000; + let borrowed_amount: u32 = 100_000_000; + assert_ok!(Loans::::add_market( + SystemOrigin::Root.into(), + KBTC, + pending_market_mock::(LEND_KBTC) + )); + assert_ok!(Loans::::activate_market(SystemOrigin::Root.into(), KBTC)); + assert_ok!(Loans::::mint( + SystemOrigin::Signed(caller.clone()).into(), + KBTC, + deposit_amount.into() + )); + + #[block] + { + // Begin second block, because the first block is set in + // `initialize::()` + Loans::::begin_block(2u32.into()); + } + } + #[benchmark] pub fn add_market() { #[extrinsic_call] diff --git a/crates/loans/src/default_weights.rs b/crates/loans/src/default_weights.rs index 0d648c19e0..194c173dd1 100644 --- a/crates/loans/src/default_weights.rs +++ b/crates/loans/src/default_weights.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for loans //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-03, STEPS: `100`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-05-17, STEPS: `100`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `interlay-hetzner-01`, CPU: `AMD EPYC 7502P 32-Core Processor` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kintsugi-testnet-latest"), DB CACHE: 1024 @@ -26,7 +26,7 @@ // --output // ./crates/loans/src/default_weights.rs // --template -// .deploy/weight-template.hbs +// .deploy/default-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -64,82 +64,81 @@ pub trait WeightInfo { /// Weights for loans using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - fn on_initialize(u: u32, ) -> Weight { + /// Storage: Loans Markets (r:2 w:0) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:1 w:0) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + /// The range of component `u` is `[1, 2]`. + fn on_initialize(_u: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1536 + u * (127 ±0)` - // Estimated: `16631 + u * (10916 ±0)` - // Minimum execution time: 63_664_000 picoseconds. - Weight::from_parts(64_646_000, 16631) - // Standard Error: 52_342 - .saturating_add(Weight::from_parts(28_651_201, 0).saturating_mul(u.into())) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(u.into()))) - .saturating_add(T::DbWeight::get().writes(2_u64)) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(u.into()))) - .saturating_add(Weight::from_parts(0, 10916).saturating_mul(u.into())) + // Measured: `1063` + // Estimated: `7773` + // Minimum execution time: 25_470_000 picoseconds. + Weight::from_parts(26_720_153, 7773) + .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: Loans Markets (r:2 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:1) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans ExchangeRate (r:0 w:1) - /// Proof Skipped: Loans ExchangeRate (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans ExchangeRate (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:0 w:1) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn add_market() -> Weight { // Proof Size summary in bytes: - // Measured: `1207` - // Estimated: `13955` - // Minimum execution time: 63_487_000 picoseconds. - Weight::from_parts(64_509_000, 13955) + // Measured: `1213` + // Estimated: `8294` + // Minimum execution time: 63_247_000 picoseconds. + Weight::from_parts(63_648_000, 8294) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn activate_market() -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 38_988_000 picoseconds. - Weight::from_parts(39_729_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 40_050_000 picoseconds. + Weight::from_parts(41_192_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn update_rate_model() -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 39_930_000 picoseconds. - Weight::from_parts(40_290_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 40_721_000 picoseconds. + Weight::from_parts(41_503_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn update_market() -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 42_776_000 picoseconds. - Weight::from_parts(43_437_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 43_557_000 picoseconds. + Weight::from_parts(44_289_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans UnderlyingAssetId (r:1 w:1) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn force_update_market() -> Weight { // Proof Size summary in bytes: - // Measured: `1515` - // Estimated: `7980` - // Minimum execution time: 49_660_000 picoseconds. - Weight::from_parts(50_240_000, 7980) + // Measured: `1521` + // Estimated: `5148` + // Minimum execution time: 49_810_000 picoseconds. + Weight::from_parts(50_892_000, 5148) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -149,198 +148,198 @@ impl WeightInfo for SubstrateWeight { /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn add_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `2308` + // Measured: `2314` // Estimated: `7783` - // Minimum execution time: 94_319_000 picoseconds. - Weight::from_parts(95_110_000, 7783) + // Minimum execution time: 92_625_000 picoseconds. + Weight::from_parts(93_948_000, 7783) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:1) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) fn update_market_reward_speed() -> Weight { // Proof Size summary in bytes: - // Measured: `1518` - // Estimated: `22440` - // Minimum execution time: 71_924_000 picoseconds. - Weight::from_parts(72_495_000, 22440) + // Measured: `1524` + // Estimated: `15350` + // Minimum execution time: 72_144_000 picoseconds. + Weight::from_parts(73_307_000, 15350) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn claim_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `3492` - // Estimated: `80995` - // Minimum execution time: 210_812_000 picoseconds. - Weight::from_parts(211_623_000, 80995) + // Measured: `3498` + // Estimated: `43522` + // Minimum execution time: 209_278_000 picoseconds. + Weight::from_parts(210_792_000, 43522) .saturating_add(T::DbWeight::get().reads(17_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans Markets (r:1 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn claim_reward_for_market() -> Weight { // Proof Size summary in bytes: - // Measured: `3492` - // Estimated: `78520` - // Minimum execution time: 196_984_000 picoseconds. - Weight::from_parts(197_816_000, 78520) + // Measured: `3498` + // Estimated: `40887` + // Minimum execution time: 195_852_000 picoseconds. + Weight::from_parts(202_365_000, 40887) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn mint() -> Weight { // Proof Size summary in bytes: - // Measured: `2944` - // Estimated: `73490` - // Minimum execution time: 274_890_000 picoseconds. - Weight::from_parts(276_413_000, 73490) + // Measured: `2950` + // Estimated: `41937` + // Minimum execution time: 272_476_000 picoseconds. + Weight::from_parts(275_451_000, 41937) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn borrow() -> Weight { // Proof Size summary in bytes: - // Measured: `3312` - // Estimated: `90329` - // Minimum execution time: 262_856_000 picoseconds. - Weight::from_parts(265_230_000, 90329) + // Measured: `3318` + // Estimated: `44958` + // Minimum execution time: 259_449_000 picoseconds. + Weight::from_parts(271_733_000, 44958) .saturating_add(T::DbWeight::get().reads(20_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) @@ -348,162 +347,162 @@ impl WeightInfo for SubstrateWeight { /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) fn redeem() -> Weight { // Proof Size summary in bytes: - // Measured: `3368` - // Estimated: `82017` - // Minimum execution time: 324_119_000 picoseconds. - Weight::from_parts(324_981_000, 82017) + // Measured: `3374` + // Estimated: `42448` + // Minimum execution time: 325_902_000 picoseconds. + Weight::from_parts(333_778_000, 42448) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) fn redeem_all() -> Weight { // Proof Size summary in bytes: - // Measured: `3368` - // Estimated: `82017` - // Minimum execution time: 325_041_000 picoseconds. - Weight::from_parts(327_495_000, 82017) + // Measured: `3374` + // Estimated: `42448` + // Minimum execution time: 324_148_000 picoseconds. + Weight::from_parts(335_191_000, 42448) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn repay_borrow() -> Weight { // Proof Size summary in bytes: - // Measured: `3407` - // Estimated: `61096` - // Minimum execution time: 179_189_000 picoseconds. - Weight::from_parts(180_952_000, 61096) + // Measured: `3413` + // Estimated: `31226` + // Minimum execution time: 179_108_000 picoseconds. + Weight::from_parts(181_473_000, 31226) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn repay_borrow_all() -> Weight { // Proof Size summary in bytes: - // Measured: `3407` - // Estimated: `61096` - // Minimum execution time: 197_625_000 picoseconds. - Weight::from_parts(198_568_000, 61096) + // Measured: `3413` + // Estimated: `31226` + // Minimum execution time: 198_547_000 picoseconds. + Weight::from_parts(200_992_000, 31226) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:1 w:1) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn deposit_all_collateral() -> Weight { // Proof Size summary in bytes: - // Measured: `2295` - // Estimated: `19375` - // Minimum execution time: 102_335_000 picoseconds. - Weight::from_parts(103_146_000, 19375) + // Measured: `2301` + // Estimated: `12939` + // Minimum execution time: 101_513_000 picoseconds. + Weight::from_parts(103_066_000, 12939) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:1) @@ -511,34 +510,34 @@ impl WeightInfo for SubstrateWeight { /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) fn withdraw_all_collateral() -> Weight { // Proof Size summary in bytes: - // Measured: `3242` - // Estimated: `60764` - // Minimum execution time: 225_110_000 picoseconds. - Weight::from_parts(226_403_000, 60764) + // Measured: `3248` + // Estimated: `32295` + // Minimum execution time: 226_383_000 picoseconds. + Weight::from_parts(232_094_000, 32295) .saturating_add(T::DbWeight::get().reads(15_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:2 w:2) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans Markets (r:3 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:4 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:6 w:5) @@ -546,52 +545,52 @@ impl WeightInfo for SubstrateWeight { /// Storage: System Account (r:4 w:2) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:2 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Security ParachainStatus (r:1 w:0) - /// Proof Skipped: Security ParachainStatus (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Security ParachainStatus (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) /// Storage: Oracle Aggregate (r:1 w:0) - /// Proof Skipped: Oracle Aggregate (max_values: None, max_size: None, mode: Measured) + /// Proof: Oracle Aggregate (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:3 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:3 w:3) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:3 w:3) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn liquidate_borrow() -> Weight { // Proof Size summary in bytes: - // Measured: `5226` - // Estimated: `201519` - // Minimum execution time: 762_145_000 picoseconds. - Weight::from_parts(766_944_000, 201519) + // Measured: `5268` + // Estimated: `104483` + // Minimum execution time: 765_723_000 picoseconds. + Weight::from_parts(787_957_000, 104483) .saturating_add(T::DbWeight::get().reads(44_u64)) .saturating_add(T::DbWeight::get().writes(21_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:4 w:4) @@ -599,71 +598,71 @@ impl WeightInfo for SubstrateWeight { /// Storage: System Account (r:2 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) fn reduce_incentive_reserves() -> Weight { // Proof Size summary in bytes: - // Measured: `4362` - // Estimated: `99138` - // Minimum execution time: 413_086_000 picoseconds. - Weight::from_parts(417_575_000, 99138) + // Measured: `4368` + // Estimated: `47641` + // Minimum execution time: 413_468_000 picoseconds. + Weight::from_parts(418_607_000, 47641) .saturating_add(T::DbWeight::get().reads(21_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:1) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn add_reserves() -> Weight { // Proof Size summary in bytes: - // Measured: `2768` - // Estimated: `26490` - // Minimum execution time: 131_052_000 picoseconds. - Weight::from_parts(132_405_000, 26490) + // Measured: `2774` + // Estimated: `18584` + // Minimum execution time: 132_174_000 picoseconds. + Weight::from_parts(133_928_000, 18584) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:1) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn reduce_reserves() -> Weight { // Proof Size summary in bytes: - // Measured: `2857` - // Estimated: `26757` - // Minimum execution time: 115_421_000 picoseconds. - Weight::from_parts(116_053_000, 26757) + // Measured: `2863` + // Estimated: `18584` + // Minimum execution time: 115_912_000 picoseconds. + Weight::from_parts(117_946_000, 18584) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -671,82 +670,81 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - fn on_initialize(u: u32, ) -> Weight { + /// Storage: Loans Markets (r:2 w:0) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:1 w:0) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + /// The range of component `u` is `[1, 2]`. + fn on_initialize(_u: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1536 + u * (127 ±0)` - // Estimated: `16631 + u * (10916 ±0)` - // Minimum execution time: 63_664_000 picoseconds. - Weight::from_parts(64_646_000, 16631) - // Standard Error: 52_342 - .saturating_add(Weight::from_parts(28_651_201, 0).saturating_mul(u.into())) - .saturating_add(RocksDbWeight::get().reads(5_u64)) - .saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(u.into()))) - .saturating_add(RocksDbWeight::get().writes(2_u64)) - .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(u.into()))) - .saturating_add(Weight::from_parts(0, 10916).saturating_mul(u.into())) + // Measured: `1063` + // Estimated: `7773` + // Minimum execution time: 25_470_000 picoseconds. + Weight::from_parts(26_720_153, 7773) + .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: Loans Markets (r:2 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:1) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans ExchangeRate (r:0 w:1) - /// Proof Skipped: Loans ExchangeRate (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans ExchangeRate (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:0 w:1) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn add_market() -> Weight { // Proof Size summary in bytes: - // Measured: `1207` - // Estimated: `13955` - // Minimum execution time: 63_487_000 picoseconds. - Weight::from_parts(64_509_000, 13955) + // Measured: `1213` + // Estimated: `8294` + // Minimum execution time: 63_247_000 picoseconds. + Weight::from_parts(63_648_000, 8294) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn activate_market() -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 38_988_000 picoseconds. - Weight::from_parts(39_729_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 40_050_000 picoseconds. + Weight::from_parts(41_192_000, 2635) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn update_rate_model() -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 39_930_000 picoseconds. - Weight::from_parts(40_290_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 40_721_000 picoseconds. + Weight::from_parts(41_503_000, 2635) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn update_market() -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 42_776_000 picoseconds. - Weight::from_parts(43_437_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 43_557_000 picoseconds. + Weight::from_parts(44_289_000, 2635) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: Loans UnderlyingAssetId (r:1 w:1) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn force_update_market() -> Weight { // Proof Size summary in bytes: - // Measured: `1515` - // Estimated: `7980` - // Minimum execution time: 49_660_000 picoseconds. - Weight::from_parts(50_240_000, 7980) + // Measured: `1521` + // Estimated: `5148` + // Minimum execution time: 49_810_000 picoseconds. + Weight::from_parts(50_892_000, 5148) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -756,198 +754,198 @@ impl WeightInfo for () { /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn add_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `2308` + // Measured: `2314` // Estimated: `7783` - // Minimum execution time: 94_319_000 picoseconds. - Weight::from_parts(95_110_000, 7783) + // Minimum execution time: 92_625_000 picoseconds. + Weight::from_parts(93_948_000, 7783) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:1) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) fn update_market_reward_speed() -> Weight { // Proof Size summary in bytes: - // Measured: `1518` - // Estimated: `22440` - // Minimum execution time: 71_924_000 picoseconds. - Weight::from_parts(72_495_000, 22440) + // Measured: `1524` + // Estimated: `15350` + // Minimum execution time: 72_144_000 picoseconds. + Weight::from_parts(73_307_000, 15350) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn claim_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `3492` - // Estimated: `80995` - // Minimum execution time: 210_812_000 picoseconds. - Weight::from_parts(211_623_000, 80995) + // Measured: `3498` + // Estimated: `43522` + // Minimum execution time: 209_278_000 picoseconds. + Weight::from_parts(210_792_000, 43522) .saturating_add(RocksDbWeight::get().reads(17_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans Markets (r:1 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn claim_reward_for_market() -> Weight { // Proof Size summary in bytes: - // Measured: `3492` - // Estimated: `78520` - // Minimum execution time: 196_984_000 picoseconds. - Weight::from_parts(197_816_000, 78520) + // Measured: `3498` + // Estimated: `40887` + // Minimum execution time: 195_852_000 picoseconds. + Weight::from_parts(202_365_000, 40887) .saturating_add(RocksDbWeight::get().reads(16_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn mint() -> Weight { // Proof Size summary in bytes: - // Measured: `2944` - // Estimated: `73490` - // Minimum execution time: 274_890_000 picoseconds. - Weight::from_parts(276_413_000, 73490) + // Measured: `2950` + // Estimated: `41937` + // Minimum execution time: 272_476_000 picoseconds. + Weight::from_parts(275_451_000, 41937) .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(9_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn borrow() -> Weight { // Proof Size summary in bytes: - // Measured: `3312` - // Estimated: `90329` - // Minimum execution time: 262_856_000 picoseconds. - Weight::from_parts(265_230_000, 90329) + // Measured: `3318` + // Estimated: `44958` + // Minimum execution time: 259_449_000 picoseconds. + Weight::from_parts(271_733_000, 44958) .saturating_add(RocksDbWeight::get().reads(20_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) @@ -955,162 +953,162 @@ impl WeightInfo for () { /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) fn redeem() -> Weight { // Proof Size summary in bytes: - // Measured: `3368` - // Estimated: `82017` - // Minimum execution time: 324_119_000 picoseconds. - Weight::from_parts(324_981_000, 82017) + // Measured: `3374` + // Estimated: `42448` + // Minimum execution time: 325_902_000 picoseconds. + Weight::from_parts(333_778_000, 42448) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) fn redeem_all() -> Weight { // Proof Size summary in bytes: - // Measured: `3368` - // Estimated: `82017` - // Minimum execution time: 325_041_000 picoseconds. - Weight::from_parts(327_495_000, 82017) + // Measured: `3374` + // Estimated: `42448` + // Minimum execution time: 324_148_000 picoseconds. + Weight::from_parts(335_191_000, 42448) .saturating_add(RocksDbWeight::get().reads(19_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn repay_borrow() -> Weight { // Proof Size summary in bytes: - // Measured: `3407` - // Estimated: `61096` - // Minimum execution time: 179_189_000 picoseconds. - Weight::from_parts(180_952_000, 61096) + // Measured: `3413` + // Estimated: `31226` + // Minimum execution time: 179_108_000 picoseconds. + Weight::from_parts(181_473_000, 31226) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn repay_borrow_all() -> Weight { // Proof Size summary in bytes: - // Measured: `3407` - // Estimated: `61096` - // Minimum execution time: 197_625_000 picoseconds. - Weight::from_parts(198_568_000, 61096) + // Measured: `3413` + // Estimated: `31226` + // Minimum execution time: 198_547_000 picoseconds. + Weight::from_parts(200_992_000, 31226) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:1 w:1) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn deposit_all_collateral() -> Weight { // Proof Size summary in bytes: - // Measured: `2295` - // Estimated: `19375` - // Minimum execution time: 102_335_000 picoseconds. - Weight::from_parts(103_146_000, 19375) + // Measured: `2301` + // Estimated: `12939` + // Minimum execution time: 101_513_000 picoseconds. + Weight::from_parts(103_066_000, 12939) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:1) @@ -1118,34 +1116,34 @@ impl WeightInfo for () { /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) fn withdraw_all_collateral() -> Weight { // Proof Size summary in bytes: - // Measured: `3242` - // Estimated: `60764` - // Minimum execution time: 225_110_000 picoseconds. - Weight::from_parts(226_403_000, 60764) + // Measured: `3248` + // Estimated: `32295` + // Minimum execution time: 226_383_000 picoseconds. + Weight::from_parts(232_094_000, 32295) .saturating_add(RocksDbWeight::get().reads(15_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:2 w:2) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans Markets (r:3 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:4 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:6 w:5) @@ -1153,52 +1151,52 @@ impl WeightInfo for () { /// Storage: System Account (r:4 w:2) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:2 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Security ParachainStatus (r:1 w:0) - /// Proof Skipped: Security ParachainStatus (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Security ParachainStatus (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) /// Storage: Oracle Aggregate (r:1 w:0) - /// Proof Skipped: Oracle Aggregate (max_values: None, max_size: None, mode: Measured) + /// Proof: Oracle Aggregate (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:3 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:3 w:3) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:3 w:3) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn liquidate_borrow() -> Weight { // Proof Size summary in bytes: - // Measured: `5226` - // Estimated: `201519` - // Minimum execution time: 762_145_000 picoseconds. - Weight::from_parts(766_944_000, 201519) + // Measured: `5268` + // Estimated: `104483` + // Minimum execution time: 765_723_000 picoseconds. + Weight::from_parts(787_957_000, 104483) .saturating_add(RocksDbWeight::get().reads(44_u64)) .saturating_add(RocksDbWeight::get().writes(21_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:4 w:4) @@ -1206,71 +1204,71 @@ impl WeightInfo for () { /// Storage: System Account (r:2 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) fn reduce_incentive_reserves() -> Weight { // Proof Size summary in bytes: - // Measured: `4362` - // Estimated: `99138` - // Minimum execution time: 413_086_000 picoseconds. - Weight::from_parts(417_575_000, 99138) + // Measured: `4368` + // Estimated: `47641` + // Minimum execution time: 413_468_000 picoseconds. + Weight::from_parts(418_607_000, 47641) .saturating_add(RocksDbWeight::get().reads(21_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:1) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn add_reserves() -> Weight { // Proof Size summary in bytes: - // Measured: `2768` - // Estimated: `26490` - // Minimum execution time: 131_052_000 picoseconds. - Weight::from_parts(132_405_000, 26490) + // Measured: `2774` + // Estimated: `18584` + // Minimum execution time: 132_174_000 picoseconds. + Weight::from_parts(133_928_000, 18584) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:1) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn reduce_reserves() -> Weight { // Proof Size summary in bytes: - // Measured: `2857` - // Estimated: `26757` - // Minimum execution time: 115_421_000 picoseconds. - Weight::from_parts(116_053_000, 26757) + // Measured: `2863` + // Estimated: `18584` + // Minimum execution time: 115_912_000 picoseconds. + Weight::from_parts(117_946_000, 18584) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } diff --git a/parachain/runtime/kintsugi/src/weights/loans.rs b/parachain/runtime/kintsugi/src/weights/loans.rs index 35ec72ef06..5b01609002 100644 --- a/parachain/runtime/kintsugi/src/weights/loans.rs +++ b/parachain/runtime/kintsugi/src/weights/loans.rs @@ -2,29 +2,29 @@ //! Autogenerated weights for loans //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-14, STEPS: `100`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-05-17, STEPS: `100`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `sander-dell`, CPU: `11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz` +//! HOSTNAME: `interlay-hetzner-01`, CPU: `AMD EPYC 7502P 32-Core Processor` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kintsugi-dev"), DB CACHE: 1024 // Executed Command: // target/release/interbtc-parachain // benchmark // pallet -// --pallet -// * -// --extrinsic -// * // --chain // kintsugi-dev // --execution=wasm // --wasm-execution=compiled +// --pallet +// loans +// --extrinsic +// * // --steps // 100 // --repeat // 10 // --output -// /tmp/weights/ +// parachain/runtime/kintsugi/src/weights/loans.rs // --template // .deploy/runtime-weight-template.hbs @@ -37,7 +37,22 @@ use sp_std::marker::PhantomData; /// Weights for loans using the Substrate node and recommended hardware. pub struct WeightInfo(PhantomData); + impl loans::WeightInfo for WeightInfo { + + /// Storage: Loans Markets (r:2 w:0) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:1 w:0) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + /// The range of component `u` is `[1, 2]`. + fn on_initialize (_u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1063` + // Estimated: `7773` + // Minimum execution time: 24_960_000 picoseconds. + Weight::from_parts(26_044_108, 7773) + .saturating_add(T::DbWeight::get().reads(3_u64)) + } /// Storage: Loans Markets (r:2 w:1) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:1) @@ -48,45 +63,45 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans ExchangeRate (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:0 w:1) /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) - fn add_market() -> Weight { + fn add_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1209` + // Measured: `1215` // Estimated: `8294` - // Minimum execution time: 41_193_000 picoseconds. - Weight::from_parts(42_080_000, 8294) + // Minimum execution time: 62_866_000 picoseconds. + Weight::from_parts(63_757_000, 8294) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: Loans Markets (r:1 w:1) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) - fn activate_market() -> Weight { + fn activate_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1506` + // Measured: `1512` // Estimated: `2635` - // Minimum execution time: 25_681_000 picoseconds. - Weight::from_parts(26_298_000, 2635) + // Minimum execution time: 38_437_000 picoseconds. + Weight::from_parts(38_968_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans Markets (r:1 w:1) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) - fn update_rate_model() -> Weight { + fn update_rate_model () -> Weight { // Proof Size summary in bytes: - // Measured: `1506` + // Measured: `1512` // Estimated: `2635` - // Minimum execution time: 27_073_000 picoseconds. - Weight::from_parts(28_564_000, 2635) + // Minimum execution time: 39_940_000 picoseconds. + Weight::from_parts(40_381_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans Markets (r:1 w:1) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) - fn update_market() -> Weight { + fn update_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1506` + // Measured: `1512` // Estimated: `2635` - // Minimum execution time: 29_007_000 picoseconds. - Weight::from_parts(29_562_000, 2635) + // Minimum execution time: 42_916_000 picoseconds. + Weight::from_parts(43_767_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -94,12 +109,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans Markets (r:1 w:1) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) - fn force_update_market() -> Weight { + fn force_update_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1517` + // Measured: `1523` // Estimated: `5148` - // Minimum execution time: 56_438_000 picoseconds. - Weight::from_parts(57_753_000, 5148) + // Minimum execution time: 50_421_000 picoseconds. + Weight::from_parts(51_052_000, 5148) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -107,12 +122,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn add_reward() -> Weight { + fn add_reward () -> Weight { // Proof Size summary in bytes: - // Measured: `1731` + // Measured: `1771` // Estimated: `7783` - // Minimum execution time: 57_625_000 picoseconds. - Weight::from_parts(59_889_000, 7783) + // Minimum execution time: 87_986_000 picoseconds. + Weight::from_parts(89_208_000, 7783) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -126,12 +141,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) - fn update_market_reward_speed() -> Weight { + fn update_market_reward_speed () -> Weight { // Proof Size summary in bytes: - // Measured: `1520` + // Measured: `1526` // Estimated: `15350` - // Minimum execution time: 47_440_000 picoseconds. - Weight::from_parts(48_348_000, 15350) + // Minimum execution time: 71_513_000 picoseconds. + Weight::from_parts(72_275_000, 15350) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -163,12 +178,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn claim_reward() -> Weight { + fn claim_reward () -> Weight { // Proof Size summary in bytes: - // Measured: `3184` + // Measured: `3224` // Estimated: `43522` - // Minimum execution time: 137_121_000 picoseconds. - Weight::from_parts(141_686_000, 43522) + // Minimum execution time: 204_359_000 picoseconds. + Weight::from_parts(206_724_000, 43522) .saturating_add(T::DbWeight::get().reads(17_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -200,12 +215,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn claim_reward_for_market() -> Weight { + fn claim_reward_for_market () -> Weight { // Proof Size summary in bytes: - // Measured: `3184` + // Measured: `3224` // Estimated: `40887` - // Minimum execution time: 127_320_000 picoseconds. - Weight::from_parts(134_087_000, 40887) + // Minimum execution time: 190_391_000 picoseconds. + Weight::from_parts(193_617_000, 40887) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -237,13 +252,15 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - fn mint() -> Weight { + /// Storage: Loans AccountDeposits (r:1 w:0) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + fn mint () -> Weight { // Proof Size summary in bytes: - // Measured: `2572` - // Estimated: `39371` - // Minimum execution time: 153_650_000 picoseconds. - Weight::from_parts(159_346_000, 39371) - .saturating_add(T::DbWeight::get().reads(17_u64)) + // Measured: `2611` + // Estimated: `41937` + // Minimum execution time: 270_431_000 picoseconds. + Weight::from_parts(272_245_000, 41937) + .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: Loans Markets (r:2 w:0) @@ -282,12 +299,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) - fn borrow() -> Weight { + fn borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `3012` + // Measured: `3051` // Estimated: `44958` - // Minimum execution time: 167_293_000 picoseconds. - Weight::from_parts(178_508_000, 44958) + // Minimum execution time: 257_295_000 picoseconds. + Weight::from_parts(261_012_000, 44958) .saturating_add(T::DbWeight::get().reads(20_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -323,12 +340,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - fn redeem() -> Weight { + fn redeem () -> Weight { // Proof Size summary in bytes: - // Measured: `3068` + // Measured: `3107` // Estimated: `42448` - // Minimum execution time: 188_190_000 picoseconds. - Weight::from_parts(204_075_000, 42448) + // Minimum execution time: 321_795_000 picoseconds. + Weight::from_parts(327_085_000, 42448) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -364,12 +381,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - fn redeem_all() -> Weight { + fn redeem_all () -> Weight { // Proof Size summary in bytes: - // Measured: `3068` + // Measured: `3107` // Estimated: `42448` - // Minimum execution time: 182_156_000 picoseconds. - Weight::from_parts(192_854_000, 42448) + // Minimum execution time: 323_818_000 picoseconds. + Weight::from_parts(326_764_000, 42448) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -395,12 +412,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) - fn repay_borrow() -> Weight { + fn repay_borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `3036` + // Measured: `3075` // Estimated: `31226` - // Minimum execution time: 116_628_000 picoseconds. - Weight::from_parts(120_918_000, 31226) + // Minimum execution time: 176_493_000 picoseconds. + Weight::from_parts(177_355_000, 31226) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -426,12 +443,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) - fn repay_borrow_all() -> Weight { + fn repay_borrow_all () -> Weight { // Proof Size summary in bytes: - // Measured: `3036` + // Measured: `3075` // Estimated: `31226` - // Minimum execution time: 128_466_000 picoseconds. - Weight::from_parts(130_120_000, 31226) + // Minimum execution time: 193_778_000 picoseconds. + Weight::from_parts(196_483_000, 31226) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -443,12 +460,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:1) /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - fn deposit_all_collateral() -> Weight { + fn deposit_all_collateral () -> Weight { // Proof Size summary in bytes: - // Measured: `2127` + // Measured: `2167` // Estimated: `12939` - // Minimum execution time: 67_045_000 picoseconds. - Weight::from_parts(68_525_000, 12939) + // Minimum execution time: 99_520_000 picoseconds. + Weight::from_parts(100_741_000, 12939) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -478,12 +495,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) - fn withdraw_all_collateral() -> Weight { + fn withdraw_all_collateral () -> Weight { // Proof Size summary in bytes: - // Measured: `2942` + // Measured: `2981` // Estimated: `32295` - // Minimum execution time: 146_246_000 picoseconds. - Weight::from_parts(148_922_000, 32295) + // Minimum execution time: 224_359_000 picoseconds. + Weight::from_parts(226_854_000, 32295) .saturating_add(T::DbWeight::get().reads(15_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -493,7 +510,7 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans Markets (r:3 w:0) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) - /// Storage: Loans AccountDeposits (r:2 w:1) + /// Storage: Loans AccountDeposits (r:4 w:1) /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) @@ -533,13 +550,13 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:3 w:3) /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) - fn liquidate_borrow() -> Weight { + fn liquidate_borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `4882` - // Estimated: `99351` - // Minimum execution time: 442_945_000 picoseconds. - Weight::from_parts(499_390_000, 99351) - .saturating_add(T::DbWeight::get().reads(42_u64)) + // Measured: `4921` + // Estimated: `104483` + // Minimum execution time: 751_524_000 picoseconds. + Weight::from_parts(758_108_000, 104483) + .saturating_add(T::DbWeight::get().reads(44_u64)) .saturating_add(T::DbWeight::get().writes(21_u64)) } /// Storage: Loans Markets (r:2 w:0) @@ -574,12 +591,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - fn reduce_incentive_reserves() -> Weight { + fn reduce_incentive_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `4060` + // Measured: `4099` // Estimated: `47641` - // Minimum execution time: 240_502_000 picoseconds. - Weight::from_parts(247_316_000, 47641) + // Minimum execution time: 404_991_000 picoseconds. + Weight::from_parts(409_720_000, 47641) .saturating_add(T::DbWeight::get().reads(21_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } @@ -595,12 +612,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:1) /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) - fn add_reserves() -> Weight { + fn add_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `2396` + // Measured: `2435` // Estimated: `18584` - // Minimum execution time: 79_300_000 picoseconds. - Weight::from_parts(88_501_000, 18584) + // Minimum execution time: 126_113_000 picoseconds. + Weight::from_parts(127_315_000, 18584) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -616,12 +633,12 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn reduce_reserves() -> Weight { + fn reduce_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `2557` + // Measured: `2596` // Estimated: `18584` - // Minimum execution time: 72_911_000 picoseconds. - Weight::from_parts(76_188_000, 18584) + // Minimum execution time: 114_318_000 picoseconds. + Weight::from_parts(114_910_000, 18584) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } diff --git a/parachain/runtime/testnet-interlay/src/weights/loans.rs b/parachain/runtime/testnet-interlay/src/weights/loans.rs index 4e9520d367..4cc1f35207 100644 --- a/parachain/runtime/testnet-interlay/src/weights/loans.rs +++ b/parachain/runtime/testnet-interlay/src/weights/loans.rs @@ -2,29 +2,29 @@ //! Autogenerated weights for loans //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `100`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-05-17, STEPS: `100`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `sander-dell`, CPU: `11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz` +//! HOSTNAME: `interlay-hetzner-01`, CPU: `AMD EPYC 7502P 32-Core Processor` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("interlay-testnet-latest"), DB CACHE: 1024 // Executed Command: // target/release/interbtc-parachain // benchmark // pallet -// --pallet -// * -// --extrinsic -// * // --chain // interlay-testnet-latest // --execution=wasm // --wasm-execution=compiled +// --pallet +// loans +// --extrinsic +// * // --steps // 100 // --repeat // 10 // --output -// parachain/runtime/testnet-interlay/src/weights/ +// parachain/runtime/testnet-interlay/src/weights/loans.rs // --template // .deploy/runtime-weight-template.hbs @@ -37,69 +37,86 @@ use sp_std::marker::PhantomData; /// Weights for loans using the Substrate node and recommended hardware. pub struct WeightInfo(PhantomData); + impl loans::WeightInfo for WeightInfo { + + /// Storage: Loans Markets (r:2 w:0) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:1 w:0) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + /// The range of component `u` is `[1, 2]`. + fn on_initialize (u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1063` + // Estimated: `7773` + // Minimum execution time: 25_491_000 picoseconds. + Weight::from_parts(26_550_459, 7773) + // Standard Error: 178_537 + .saturating_add(Weight::from_parts(592_520, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + } /// Storage: Loans Markets (r:2 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:1) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans ExchangeRate (r:0 w:1) - /// Proof Skipped: Loans ExchangeRate (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans ExchangeRate (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:0 w:1) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) - fn add_market() -> Weight { + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + fn add_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1207` - // Estimated: `13955` - // Minimum execution time: 41_618_000 picoseconds. - Weight::from_parts(42_808_000, 13955) + // Measured: `1213` + // Estimated: `8294` + // Minimum execution time: 64_038_000 picoseconds. + Weight::from_parts(66_463_000, 8294) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) - fn activate_market() -> Weight { + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + fn activate_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 26_773_000 picoseconds. - Weight::from_parts(28_878_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 39_188_000 picoseconds. + Weight::from_parts(40_771_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) - fn update_rate_model() -> Weight { + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + fn update_rate_model () -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 26_702_000 picoseconds. - Weight::from_parts(28_451_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 41_233_000 picoseconds. + Weight::from_parts(41_663_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) - fn update_market() -> Weight { + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + fn update_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 28_263_000 picoseconds. - Weight::from_parts(29_581_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 44_098_000 picoseconds. + Weight::from_parts(45_210_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans UnderlyingAssetId (r:1 w:1) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) - fn force_update_market() -> Weight { + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + fn force_update_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1515` - // Estimated: `7980` - // Minimum execution time: 32_751_000 picoseconds. - Weight::from_parts(33_602_000, 7980) + // Measured: `1521` + // Estimated: `5148` + // Minimum execution time: 51_142_000 picoseconds. + Weight::from_parts(52_355_000, 5148) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -107,204 +124,204 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn add_reward() -> Weight { + fn add_reward () -> Weight { // Proof Size summary in bytes: - // Measured: `2242` + // Measured: `2248` // Estimated: `7783` - // Minimum execution time: 61_282_000 picoseconds. - Weight::from_parts(62_808_000, 7783) + // Minimum execution time: 95_000_000 picoseconds. + Weight::from_parts(96_173_000, 7783) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:1) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) - fn update_market_reward_speed() -> Weight { + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) + fn update_market_reward_speed () -> Weight { // Proof Size summary in bytes: - // Measured: `1518` - // Estimated: `22440` - // Minimum execution time: 47_353_000 picoseconds. - Weight::from_parts(48_353_000, 22440) + // Measured: `1524` + // Estimated: `15350` + // Minimum execution time: 74_559_000 picoseconds. + Weight::from_parts(75_682_000, 15350) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn claim_reward() -> Weight { + fn claim_reward () -> Weight { // Proof Size summary in bytes: - // Measured: `3492` - // Estimated: `80995` - // Minimum execution time: 138_438_000 picoseconds. - Weight::from_parts(144_472_000, 80995) + // Measured: `3498` + // Estimated: `43522` + // Minimum execution time: 215_572_000 picoseconds. + Weight::from_parts(217_996_000, 43522) .saturating_add(T::DbWeight::get().reads(17_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans Markets (r:1 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn claim_reward_for_market() -> Weight { + fn claim_reward_for_market () -> Weight { // Proof Size summary in bytes: - // Measured: `3492` - // Estimated: `78520` - // Minimum execution time: 127_833_000 picoseconds. - Weight::from_parts(133_696_000, 78520) + // Measured: `3498` + // Estimated: `40887` + // Minimum execution time: 202_155_000 picoseconds. + Weight::from_parts(205_150_000, 40887) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) - fn mint() -> Weight { + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + fn mint () -> Weight { // Proof Size summary in bytes: - // Measured: `2944` - // Estimated: `73490` - // Minimum execution time: 175_466_000 picoseconds. - Weight::from_parts(179_716_000, 73490) + // Measured: `2950` + // Estimated: `41937` + // Minimum execution time: 280_832_000 picoseconds. + Weight::from_parts(284_029_000, 41937) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Security ParachainStatus (r:1 w:0) - /// Proof Skipped: Security ParachainStatus (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Security ParachainStatus (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) /// Storage: Oracle Aggregate (r:1 w:0) - /// Proof Skipped: Oracle Aggregate (max_values: None, max_size: None, mode: Measured) + /// Proof: Oracle Aggregate (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) - fn borrow() -> Weight { + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + fn borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `3564` - // Estimated: `103955` - // Minimum execution time: 173_830_000 picoseconds. - Weight::from_parts(180_461_000, 103955) + // Measured: `3570` + // Estimated: `47973` + // Minimum execution time: 285_681_000 picoseconds. + Weight::from_parts(291_945_000, 47973) .saturating_add(T::DbWeight::get().reads(22_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) @@ -312,162 +329,162 @@ impl loans::WeightInfo for WeightInfo { /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) - fn redeem() -> Weight { + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + fn redeem () -> Weight { // Proof Size summary in bytes: - // Measured: `3368` - // Estimated: `82017` - // Minimum execution time: 197_346_000 picoseconds. - Weight::from_parts(220_509_000, 82017) + // Measured: `3374` + // Estimated: `42448` + // Minimum execution time: 329_520_000 picoseconds. + Weight::from_parts(334_479_000, 42448) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) - fn redeem_all() -> Weight { + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + fn redeem_all () -> Weight { // Proof Size summary in bytes: - // Measured: `3368` - // Estimated: `82017` - // Minimum execution time: 195_823_000 picoseconds. - Weight::from_parts(208_789_000, 82017) + // Measured: `3374` + // Estimated: `42448` + // Minimum execution time: 333_367_000 picoseconds. + Weight::from_parts(340_712_000, 42448) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) - fn repay_borrow() -> Weight { + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + fn repay_borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `3407` - // Estimated: `61096` - // Minimum execution time: 116_486_000 picoseconds. - Weight::from_parts(124_461_000, 61096) + // Measured: `3413` + // Estimated: `31226` + // Minimum execution time: 184_139_000 picoseconds. + Weight::from_parts(186_664_000, 31226) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) - fn repay_borrow_all() -> Weight { + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + fn repay_borrow_all () -> Weight { // Proof Size summary in bytes: - // Measured: `3407` - // Estimated: `61096` - // Minimum execution time: 124_777_000 picoseconds. - Weight::from_parts(137_936_000, 61096) + // Measured: `3413` + // Estimated: `31226` + // Minimum execution time: 204_609_000 picoseconds. + Weight::from_parts(207_796_000, 31226) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:1 w:1) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) - fn deposit_all_collateral() -> Weight { + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + fn deposit_all_collateral () -> Weight { // Proof Size summary in bytes: - // Measured: `2295` - // Estimated: `19375` - // Minimum execution time: 65_891_000 picoseconds. - Weight::from_parts(70_468_000, 19375) + // Measured: `2301` + // Estimated: `12939` + // Minimum execution time: 105_661_000 picoseconds. + Weight::from_parts(107_926_000, 12939) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:1) @@ -475,38 +492,38 @@ impl loans::WeightInfo for WeightInfo { /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Security ParachainStatus (r:1 w:0) - /// Proof Skipped: Security ParachainStatus (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Security ParachainStatus (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) /// Storage: Oracle Aggregate (r:1 w:0) - /// Proof Skipped: Oracle Aggregate (max_values: None, max_size: None, mode: Measured) + /// Proof: Oracle Aggregate (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) - fn withdraw_all_collateral() -> Weight { + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) + fn withdraw_all_collateral () -> Weight { // Proof Size summary in bytes: - // Measured: `3494` - // Estimated: `72990` - // Minimum execution time: 152_292_000 picoseconds. - Weight::from_parts(154_881_000, 72990) + // Measured: `3500` + // Estimated: `35310` + // Minimum execution time: 251_122_000 picoseconds. + Weight::from_parts(254_048_000, 35310) .saturating_add(T::DbWeight::get().reads(17_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:2 w:2) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans Markets (r:3 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:4 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:6 w:5) @@ -514,52 +531,52 @@ impl loans::WeightInfo for WeightInfo { /// Storage: System Account (r:4 w:2) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:2 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Security ParachainStatus (r:1 w:0) - /// Proof Skipped: Security ParachainStatus (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Security ParachainStatus (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) /// Storage: Oracle Aggregate (r:2 w:0) - /// Proof Skipped: Oracle Aggregate (max_values: None, max_size: None, mode: Measured) + /// Proof: Oracle Aggregate (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:3 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:3 w:3) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:3 w:3) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) - fn liquidate_borrow() -> Weight { + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + fn liquidate_borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `5267` - // Estimated: `204773` - // Minimum execution time: 484_507_000 picoseconds. - Weight::from_parts(498_696_000, 204773) + // Measured: `5273` + // Estimated: `107002` + // Minimum execution time: 791_874_000 picoseconds. + Weight::from_parts(811_093_000, 107002) .saturating_add(T::DbWeight::get().reads(45_u64)) .saturating_add(T::DbWeight::get().writes(21_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:4 w:4) @@ -567,71 +584,71 @@ impl loans::WeightInfo for WeightInfo { /// Storage: System Account (r:2 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) - fn reduce_incentive_reserves() -> Weight { + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + fn reduce_incentive_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `4362` - // Estimated: `99138` - // Minimum execution time: 256_764_000 picoseconds. - Weight::from_parts(269_959_000, 99138) + // Measured: `4368` + // Estimated: `47641` + // Minimum execution time: 413_347_000 picoseconds. + Weight::from_parts(425_451_000, 47641) .saturating_add(T::DbWeight::get().reads(21_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:1) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) - fn add_reserves() -> Weight { + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + fn add_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `2768` - // Estimated: `26490` - // Minimum execution time: 85_693_000 picoseconds. - Weight::from_parts(92_952_000, 26490) + // Measured: `2774` + // Estimated: `18584` + // Minimum execution time: 136_403_000 picoseconds. + Weight::from_parts(139_890_000, 18584) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:1) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn reduce_reserves() -> Weight { + fn reduce_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `2857` - // Estimated: `26757` - // Minimum execution time: 73_803_000 picoseconds. - Weight::from_parts(76_275_000, 26757) + // Measured: `2863` + // Estimated: `18584` + // Minimum execution time: 119_469_000 picoseconds. + Weight::from_parts(121_714_000, 18584) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } diff --git a/parachain/runtime/testnet-kintsugi/src/weights/loans.rs b/parachain/runtime/testnet-kintsugi/src/weights/loans.rs index 55691f4dc2..cf1fad900b 100644 --- a/parachain/runtime/testnet-kintsugi/src/weights/loans.rs +++ b/parachain/runtime/testnet-kintsugi/src/weights/loans.rs @@ -2,29 +2,29 @@ //! Autogenerated weights for loans //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-13, STEPS: `100`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-05-17, STEPS: `100`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `sander-dell`, CPU: `11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz` +//! HOSTNAME: `interlay-hetzner-01`, CPU: `AMD EPYC 7502P 32-Core Processor` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kintsugi-testnet-latest"), DB CACHE: 1024 // Executed Command: // target/release/interbtc-parachain // benchmark // pallet -// --pallet -// * -// --extrinsic -// * // --chain // kintsugi-testnet-latest // --execution=wasm // --wasm-execution=compiled +// --pallet +// loans +// --extrinsic +// * // --steps // 100 // --repeat // 10 // --output -// parachain/runtime/testnet-kintsugi/src/weights/ +// parachain/runtime/testnet-kintsugi/src/weights/loans.rs // --template // .deploy/runtime-weight-template.hbs @@ -37,69 +37,86 @@ use sp_std::marker::PhantomData; /// Weights for loans using the Substrate node and recommended hardware. pub struct WeightInfo(PhantomData); + impl loans::WeightInfo for WeightInfo { + + /// Storage: Loans Markets (r:2 w:0) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:1 w:0) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + /// The range of component `u` is `[1, 2]`. + fn on_initialize (u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1063` + // Estimated: `7773` + // Minimum execution time: 25_451_000 picoseconds. + Weight::from_parts(26_327_315, 7773) + // Standard Error: 67_359 + .saturating_add(Weight::from_parts(22_758, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + } /// Storage: Loans Markets (r:2 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:1) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans ExchangeRate (r:0 w:1) - /// Proof Skipped: Loans ExchangeRate (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans ExchangeRate (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:0 w:1) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) - fn add_market() -> Weight { + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + fn add_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1207` - // Estimated: `13955` - // Minimum execution time: 41_570_000 picoseconds. - Weight::from_parts(42_767_000, 13955) + // Measured: `1213` + // Estimated: `8294` + // Minimum execution time: 62_265_000 picoseconds. + Weight::from_parts(63_186_000, 8294) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) - fn activate_market() -> Weight { + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + fn activate_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 26_185_000 picoseconds. - Weight::from_parts(26_946_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 38_346_000 picoseconds. + Weight::from_parts(39_529_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) - fn update_rate_model() -> Weight { + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + fn update_rate_model () -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 26_638_000 picoseconds. - Weight::from_parts(27_327_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 39_579_000 picoseconds. + Weight::from_parts(40_180_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) - fn update_market() -> Weight { + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + fn update_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1504` - // Estimated: `3979` - // Minimum execution time: 28_448_000 picoseconds. - Weight::from_parts(29_270_000, 3979) + // Measured: `1510` + // Estimated: `2635` + // Minimum execution time: 42_334_000 picoseconds. + Weight::from_parts(43_978_000, 2635) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Loans UnderlyingAssetId (r:1 w:1) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans Markets (r:1 w:1) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) - fn force_update_market() -> Weight { + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + fn force_update_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1515` - // Estimated: `7980` - // Minimum execution time: 33_082_000 picoseconds. - Weight::from_parts(33_529_000, 7980) + // Measured: `1521` + // Estimated: `5148` + // Minimum execution time: 49_790_000 picoseconds. + Weight::from_parts(50_562_000, 5148) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -107,200 +124,200 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn add_reward() -> Weight { + fn add_reward () -> Weight { // Proof Size summary in bytes: - // Measured: `2308` + // Measured: `2314` // Estimated: `7783` - // Minimum execution time: 59_413_000 picoseconds. - Weight::from_parts(61_213_000, 7783) + // Minimum execution time: 93_236_000 picoseconds. + Weight::from_parts(93_998_000, 7783) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:1) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) - fn update_market_reward_speed() -> Weight { + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) + fn update_market_reward_speed () -> Weight { // Proof Size summary in bytes: - // Measured: `1518` - // Estimated: `22440` - // Minimum execution time: 47_825_000 picoseconds. - Weight::from_parts(49_261_000, 22440) + // Measured: `1524` + // Estimated: `15350` + // Minimum execution time: 71_493_000 picoseconds. + Weight::from_parts(72_315_000, 15350) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn claim_reward() -> Weight { + fn claim_reward () -> Weight { // Proof Size summary in bytes: - // Measured: `3492` - // Estimated: `80995` - // Minimum execution time: 136_377_000 picoseconds. - Weight::from_parts(141_361_000, 80995) + // Measured: `3498` + // Estimated: `43522` + // Minimum execution time: 208_337_000 picoseconds. + Weight::from_parts(210_671_000, 43522) .saturating_add(T::DbWeight::get().reads(17_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans Markets (r:1 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn claim_reward_for_market() -> Weight { + fn claim_reward_for_market () -> Weight { // Proof Size summary in bytes: - // Measured: `3492` - // Estimated: `78520` - // Minimum execution time: 122_502_000 picoseconds. - Weight::from_parts(127_738_000, 78520) + // Measured: `3498` + // Estimated: `40887` + // Minimum execution time: 194_730_000 picoseconds. + Weight::from_parts(196_142_000, 40887) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) - fn mint() -> Weight { + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + fn mint () -> Weight { // Proof Size summary in bytes: - // Measured: `2944` - // Estimated: `73490` - // Minimum execution time: 173_373_000 picoseconds. - Weight::from_parts(180_009_000, 73490) + // Measured: `2950` + // Estimated: `41937` + // Minimum execution time: 270_832_000 picoseconds. + Weight::from_parts(273_016_000, 41937) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) - fn borrow() -> Weight { + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + fn borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `3312` - // Estimated: `90329` - // Minimum execution time: 165_367_000 picoseconds. - Weight::from_parts(174_974_000, 90329) + // Measured: `3318` + // Estimated: `44958` + // Minimum execution time: 260_461_000 picoseconds. + Weight::from_parts(262_586_000, 44958) .saturating_add(T::DbWeight::get().reads(20_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) @@ -308,162 +325,162 @@ impl loans::WeightInfo for WeightInfo { /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) - fn redeem() -> Weight { + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + fn redeem () -> Weight { // Proof Size summary in bytes: - // Measured: `3368` - // Estimated: `82017` - // Minimum execution time: 196_696_000 picoseconds. - Weight::from_parts(215_776_000, 82017) + // Measured: `3374` + // Estimated: `42448` + // Minimum execution time: 321_613_000 picoseconds. + Weight::from_parts(325_210_000, 42448) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:3 w:3) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) - fn redeem_all() -> Weight { + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + fn redeem_all () -> Weight { // Proof Size summary in bytes: - // Measured: `3368` - // Estimated: `82017` - // Minimum execution time: 198_239_000 picoseconds. - Weight::from_parts(208_062_000, 82017) + // Measured: `3374` + // Estimated: `42448` + // Minimum execution time: 325_452_000 picoseconds. + Weight::from_parts(328_027_000, 42448) .saturating_add(T::DbWeight::get().reads(19_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) - fn repay_borrow() -> Weight { + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + fn repay_borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `3407` - // Estimated: `61096` - // Minimum execution time: 113_730_000 picoseconds. - Weight::from_parts(119_126_000, 61096) + // Measured: `3413` + // Estimated: `31226` + // Minimum execution time: 178_598_000 picoseconds. + Weight::from_parts(180_290_000, 31226) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) - fn repay_borrow_all() -> Weight { + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + fn repay_borrow_all () -> Weight { // Proof Size summary in bytes: - // Measured: `3407` - // Estimated: `61096` - // Minimum execution time: 125_769_000 picoseconds. - Weight::from_parts(130_191_000, 61096) + // Measured: `3413` + // Estimated: `31226` + // Minimum execution time: 197_095_000 picoseconds. + Weight::from_parts(198_677_000, 31226) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:1 w:1) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) - fn deposit_all_collateral() -> Weight { + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + fn deposit_all_collateral () -> Weight { // Proof Size summary in bytes: - // Measured: `2295` - // Estimated: `19375` - // Minimum execution time: 64_058_000 picoseconds. - Weight::from_parts(66_335_000, 19375) + // Measured: `2301` + // Estimated: `12939` + // Minimum execution time: 101_563_000 picoseconds. + Weight::from_parts(102_806_000, 12939) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:1) @@ -471,34 +488,34 @@ impl loans::WeightInfo for WeightInfo { /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) - fn withdraw_all_collateral() -> Weight { + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) + fn withdraw_all_collateral () -> Weight { // Proof Size summary in bytes: - // Measured: `3242` - // Estimated: `60764` - // Minimum execution time: 141_400_000 picoseconds. - Weight::from_parts(151_825_000, 60764) + // Measured: `3248` + // Estimated: `32295` + // Minimum execution time: 225_902_000 picoseconds. + Weight::from_parts(228_878_000, 32295) .saturating_add(T::DbWeight::get().reads(15_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:2 w:2) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans Markets (r:3 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:4 w:1) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:0) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:6 w:5) @@ -506,52 +523,52 @@ impl loans::WeightInfo for WeightInfo { /// Storage: System Account (r:4 w:2) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:2 w:1) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Security ParachainStatus (r:1 w:0) - /// Proof Skipped: Security ParachainStatus (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Security ParachainStatus (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) /// Storage: Oracle Aggregate (r:1 w:0) - /// Proof Skipped: Oracle Aggregate (max_values: None, max_size: None, mode: Measured) + /// Proof: Oracle Aggregate (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:3 w:1) - /// Proof Skipped: Loans AccountBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) - /// Proof Skipped: Loans BorrowIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowState (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowSpeed (r:1 w:0) - /// Proof Skipped: Loans RewardBorrowSpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowSpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardBorrowerIndex (r:1 w:1) - /// Proof Skipped: Loans RewardBorrowerIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardBorrowerIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:3 w:3) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:3 w:3) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) - fn liquidate_borrow() -> Weight { + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + fn liquidate_borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `5262` - // Estimated: `202203` - // Minimum execution time: 469_747_000 picoseconds. - Weight::from_parts(485_938_000, 202203) + // Measured: `5268` + // Estimated: `104483` + // Minimum execution time: 761_915_000 picoseconds. + Weight::from_parts(785_442_000, 104483) .saturating_add(T::DbWeight::get().reads(44_u64)) .saturating_add(T::DbWeight::get().writes(21_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:0) - /// Proof Skipped: Loans UnderlyingAssetId (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans UnderlyingAssetId (max_values: None, max_size: Some(38), added: 2513, mode: MaxEncodedLen) /// Storage: Tokens TotalIssuance (r:1 w:1) /// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:4 w:4) @@ -559,71 +576,71 @@ impl loans::WeightInfo for WeightInfo { /// Storage: System Account (r:2 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:0) - /// Proof Skipped: Loans TotalBorrows (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:0) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans MinExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MinExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans MaxExchangeRate (r:1 w:0) - /// Proof Skipped: Loans MaxExchangeRate (max_values: Some(1), max_size: None, mode: Measured) + /// Proof: Loans MaxExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) - /// Proof Skipped: Loans AccountDeposits (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardSupplyState (r:1 w:1) - /// Proof Skipped: Loans RewardSupplyState (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplyState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) /// Storage: Loans RewardSupplySpeed (r:1 w:0) - /// Proof Skipped: Loans RewardSupplySpeed (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:1 w:1) - /// Proof Skipped: Loans RewardSupplierIndex (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) - /// Proof Skipped: Loans RewardAccrued (max_values: None, max_size: None, mode: Measured) - fn reduce_incentive_reserves() -> Weight { + /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + fn reduce_incentive_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `4362` - // Estimated: `99138` - // Minimum execution time: 252_564_000 picoseconds. - Weight::from_parts(264_648_000, 99138) + // Measured: `4368` + // Estimated: `47641` + // Minimum execution time: 410_992_000 picoseconds. + Weight::from_parts(417_806_000, 47641) .saturating_add(T::DbWeight::get().reads(21_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:1) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) - fn add_reserves() -> Weight { + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + fn add_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `2768` - // Estimated: `26490` - // Minimum execution time: 83_672_000 picoseconds. - Weight::from_parts(91_097_000, 26490) + // Measured: `2774` + // Estimated: `18584` + // Minimum execution time: 131_624_000 picoseconds. + Weight::from_parts(133_317_000, 18584) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } /// Storage: Loans Markets (r:2 w:0) - /// Proof Skipped: Loans Markets (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) /// Storage: Loans LastAccruedInterestTime (r:1 w:1) - /// Proof Skipped: Loans LastAccruedInterestTime (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:1) - /// Proof Skipped: Loans TotalReserves (max_values: None, max_size: None, mode: Measured) + /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Tokens Accounts (r:2 w:2) /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - fn reduce_reserves() -> Weight { + fn reduce_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `2857` - // Estimated: `26757` - // Minimum execution time: 74_469_000 picoseconds. - Weight::from_parts(77_439_000, 26757) + // Measured: `2863` + // Estimated: `18584` + // Minimum execution time: 116_102_000 picoseconds. + Weight::from_parts(117_154_000, 18584) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } From bd5199d034b1352efdc789e4bc0b564850d2762d Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Wed, 17 May 2023 18:08:42 +0200 Subject: [PATCH 04/10] fix(loans): `MarketToReaccrue` item doc comment --- crates/loans/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/loans/src/lib.rs b/crates/loans/src/lib.rs index 5f658871b1..a13b2d4ab5 100644 --- a/crates/loans/src/lib.rs +++ b/crates/loans/src/lib.rs @@ -514,7 +514,8 @@ pub mod pallet { #[pallet::storage] pub type Markets = StorageMap<_, Blake2_128Concat, CurrencyId, Market>>; - /// Mapping of underlying currency id to its market + /// Mapping of underlying currency id of a market to the flag indicating + /// whether the marked should have interest accrued in the `on_initialize` hook #[pallet::storage] #[pallet::getter(fn market_to_reaccrue)] pub type MarketToReaccrue = StorageMap<_, Blake2_128Concat, CurrencyId, bool, ValueQuery>; From 96a76666f7b75b5ad5c82002cd9514c66acfe54e Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Wed, 17 May 2023 18:35:44 +0200 Subject: [PATCH 05/10] fix(loans): interest reaccrual flag --- crates/loans/src/interest.rs | 12 +++++------ crates/loans/src/lib.rs | 26 +++++++++++------------ crates/loans/src/mock.rs | 2 +- crates/loans/src/tests.rs | 17 ++++++++++----- crates/loans/src/tests/edge_cases.rs | 11 +++++++--- crates/loans/src/tests/interest_rate.rs | 2 +- standalone/runtime/tests/test_fee_pool.rs | 2 +- 7 files changed, 42 insertions(+), 30 deletions(-) diff --git a/crates/loans/src/interest.rs b/crates/loans/src/interest.rs index 3000d0362e..b179cac531 100644 --- a/crates/loans/src/interest.rs +++ b/crates/loans/src/interest.rs @@ -23,7 +23,12 @@ use crate::*; impl Pallet { /// Accrue interest and update corresponding storage #[cfg_attr(any(test, feature = "integration-tests"), visibility::make(pub))] - pub(crate) fn accrue_interest(asset_id: CurrencyId) -> DispatchResult { + pub(crate) fn accrue_interest(asset_id: CurrencyId, reaccrue_next_block: bool) -> DispatchResult { + // Ensure redundant storage always has up-to-date interest + // rates which the UI can display. + // This operations mutates storage even if accruing fails. + MarketToReaccrue::::insert(asset_id, reaccrue_next_block); + let now = T::UnixTime::now().as_secs(); let last_accrued_interest_time = Self::last_accrued_interest_time(asset_id); if last_accrued_interest_time.is_zero() { @@ -48,11 +53,6 @@ impl Pallet { BorrowRate::::insert(asset_id, borrow_rate); SupplyRate::::insert(asset_id, supply_rate); ExchangeRate::::insert(asset_id, exchange_rate); - // Flip the re-accrual boolean flag. If the current accrual was triggered by a user, - // the flag is enabled, which causes the next block will accrue interest again and - // disable the flag. This ensures the redundant storage always has up-to-date interest - // rates which the UI can display. - MarketToReaccrue::::insert(asset_id, !Self::market_to_reaccrue(asset_id)); Self::on_exchange_rate_change(&asset_id); Self::deposit_event(Event::::InterestAccrued { diff --git a/crates/loans/src/lib.rs b/crates/loans/src/lib.rs index a13b2d4ab5..95dcc2d7b6 100644 --- a/crates/loans/src/lib.rs +++ b/crates/loans/src/lib.rs @@ -1073,7 +1073,7 @@ pub mod pallet { pub fn repay_borrow_all(origin: OriginFor, asset_id: CurrencyId) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id)?; + Self::accrue_interest(asset_id, true)?; let account_borrows = Self::current_borrow_balance(&who, asset_id)?; ensure!(!account_borrows.is_zero(), Error::::InvalidAmount); Self::do_repay_borrow(&who, &account_borrows)?; @@ -1151,8 +1151,8 @@ pub mod pallet { collateral_asset_id: CurrencyId, ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; - Self::accrue_interest(liquidation_asset_id)?; - Self::accrue_interest(collateral_asset_id)?; + Self::accrue_interest(liquidation_asset_id, true)?; + Self::accrue_interest(collateral_asset_id, true)?; ensure!(!repay_amount.is_zero(), Error::::InvalidAmount); let liquidation = Amount::new(repay_amount, liquidation_asset_id); Self::do_liquidate_borrow(who, borrower, &liquidation, collateral_asset_id)?; @@ -1182,7 +1182,7 @@ pub mod pallet { T::ReserveOrigin::ensure_origin(origin)?; let payer = T::Lookup::lookup(payer)?; Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id)?; + Self::accrue_interest(asset_id, true)?; ensure!(!amount_to_transfer.is_zero(), Error::::InvalidAmount); amount_to_transfer.transfer(&payer, &Self::account_id())?; @@ -1219,7 +1219,7 @@ pub mod pallet { T::ReserveOrigin::ensure_origin(origin)?; let receiver = T::Lookup::lookup(receiver)?; Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id)?; + Self::accrue_interest(asset_id, true)?; let amount_to_transfer = Amount::new(reduce_amount, asset_id); @@ -1261,7 +1261,7 @@ pub mod pallet { let receiver = T::Lookup::lookup(receiver)?; let from = Self::incentive_reward_account_id(); Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id)?; + Self::accrue_interest(asset_id, true)?; let underlying = Amount::new(redeem_amount, asset_id); @@ -1285,7 +1285,7 @@ impl Pallet { for (asset_id, _) in Self::active_markets() { iterations += 1; if Self::market_to_reaccrue(asset_id) { - if let Err(e) = Self::accrue_interest(asset_id) { + if let Err(e) = Self::accrue_interest(asset_id, false) { log::trace!( target: "loans::accrue_interest", "error: {:?}, failed to accrue interest for: {:?}", @@ -1901,7 +1901,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< Self::ensure_active_market(asset_id)?; Self::ensure_under_supply_cap(&amount)?; - Self::accrue_interest(asset_id)?; + Self::accrue_interest(asset_id, true)?; // update supply index before modify supply balance. Self::update_reward_supply_index(asset_id)?; @@ -1926,7 +1926,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< let asset_id = borrow.currency(); Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id)?; + Self::accrue_interest(asset_id, true)?; Self::borrow_allowed(borrower, &borrow)?; // update borrow index after accrue interest. @@ -2025,7 +2025,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< fn do_repay_borrow(borrower: &AccountIdOf, borrow: &Amount) -> Result<(), DispatchError> { let asset_id = borrow.currency(); Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id)?; + Self::accrue_interest(asset_id, true)?; let account_borrows = Self::current_borrow_balance(borrower, asset_id)?; Self::do_repay_borrow_with_amount(borrower, asset_id, &account_borrows, &borrow)?; Self::deposit_event(Event::::RepaidBorrow { @@ -2048,7 +2048,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< } Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id)?; + Self::accrue_interest(asset_id, true)?; Self::redeem_allowed(supplier, &voucher)?; @@ -2080,7 +2080,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< // outdated exchange rate. Call `accrue_interest` to avoid this. let underlying_id = Self::underlying_id(lend_tokens.currency())?; Self::ensure_active_market(underlying_id)?; - Self::accrue_interest(underlying_id)?; + Self::accrue_interest(underlying_id, true)?; let exchange_rate = Self::exchange_rate_stored(underlying_id)?; Ok(lend_tokens.checked_mul(&exchange_rate)?.set_currency(underlying_id)) } @@ -2098,7 +2098,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< // possibly not having accrued for a few blocks. This would result in using an // outdated exchange rate. Call `accrue_interest` to avoid this. Self::ensure_active_market(underlying.currency())?; - Self::accrue_interest(underlying.currency())?; + Self::accrue_interest(underlying.currency(), true)?; let exchange_rate = Self::exchange_rate_stored(underlying.currency())?; let lend_token_id = Self::lend_token_id(underlying.currency())?; diff --git a/crates/loans/src/mock.rs b/crates/loans/src/mock.rs index 64dbac180b..489c8d1855 100644 --- a/crates/loans/src/mock.rs +++ b/crates/loans/src/mock.rs @@ -381,7 +381,7 @@ pub fn almost_equal(target: u128, value: u128) -> bool { pub fn accrue_interest_per_block(asset_id: CurrencyId, block_delta_secs: u64, run_to_block: u64) { for i in 1..run_to_block { TimestampPallet::set_timestamp(6000 + (block_delta_secs * 1000 * i)); - Loans::accrue_interest(asset_id).unwrap(); + Loans::accrue_interest(asset_id, false).unwrap(); } } diff --git a/crates/loans/src/tests.rs b/crates/loans/src/tests.rs index f2bbe1b4a1..a5700970a2 100644 --- a/crates/loans/src/tests.rs +++ b/crates/loans/src/tests.rs @@ -738,7 +738,7 @@ fn total_reserves_are_updated_on_withdrawal() { let blocks_to_run = 1000; _run_to_block(blocks_to_run); - Loans::accrue_interest(DOT).unwrap(); + Loans::accrue_interest(DOT, false).unwrap(); let intermediary_total_reserves = Loans::total_reserves(DOT); _run_to_block(2 * blocks_to_run); @@ -764,7 +764,7 @@ fn total_reserves_are_updated_on_deposit() { let blocks_to_run = 1000; _run_to_block(blocks_to_run); - Loans::accrue_interest(DOT).unwrap(); + Loans::accrue_interest(DOT, false).unwrap(); let intermediary_total_reserves = Loans::total_reserves(DOT); _run_to_block(2 * blocks_to_run); @@ -898,7 +898,7 @@ fn update_exchange_rate_works() { // Initialize value of exchange rate is 0.02 assert_eq!(Loans::exchange_rate(DOT), Rate::saturating_from_rational(2, 100)); - assert_ok!(Loans::accrue_interest(DOT)); + assert_ok!(Loans::accrue_interest(DOT, false)); assert_eq!( Loans::exchange_rate_stored(DOT).unwrap(), Rate::saturating_from_rational(2, 100) @@ -1543,7 +1543,9 @@ fn interest_rate_hook_works() { // Run to block 1 and accrue interest so further accruals set interest rate storage _run_to_block(1); - Loans::accrue_interest(DOT).unwrap(); + Loans::accrue_interest(DOT, false).unwrap(); + // Accruing interest on the first block does not enable the flag + assert_eq!(Loans::market_to_reaccrue(DOT), false); _run_to_block(2); // Mint and borrow so both interest rates will be non-zero @@ -1557,10 +1559,11 @@ fn interest_rate_hook_works() { &mut current_supply_rate, &mut current_borrow_rate, ); + assert_eq!(Loans::market_to_reaccrue(DOT), true); // The hook on block 3 auto-accrues interest so storage items are updated _run_to_block(3); - + assert_eq!(Loans::market_to_reaccrue(DOT), false); read_interest_rates( &mut previous_supply_rate, &mut previous_borrow_rate, @@ -1586,9 +1589,11 @@ fn interest_rate_hook_works() { assert_eq!(current_borrow_rate, previous_borrow_rate); // This enables the re-accrual flag for next block assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_eq!(Loans::market_to_reaccrue(DOT), true); // The hook on block 5 accrues interest _run_to_block(5); + assert_eq!(Loans::market_to_reaccrue(DOT), false); read_interest_rates( &mut previous_supply_rate, &mut previous_borrow_rate, @@ -1605,5 +1610,7 @@ fn interest_rate_hook_works() { ); assert_eq!(current_supply_rate, previous_supply_rate); assert_eq!(current_borrow_rate, previous_borrow_rate); + // But it should still enable the flag + assert_eq!(Loans::market_to_reaccrue(DOT), true); }); } diff --git a/crates/loans/src/tests/edge_cases.rs b/crates/loans/src/tests/edge_cases.rs index 09f754be18..226a8ad183 100644 --- a/crates/loans/src/tests/edge_cases.rs +++ b/crates/loans/src/tests/edge_cases.rs @@ -145,7 +145,12 @@ fn prevent_the_exchange_rate_attack() { ); TimestampPallet::set_timestamp(12000); // Eve can not let the exchange rate greater than 1 - assert_noop!(Loans::accrue_interest(Token(DOT)), Error::::InvalidExchangeRate); + // Use `assert_err` instead of `assert_noop` because the `MarketToReaccrue` + // storage item may be mutated even if interest accrual fails. + assert_err!( + Loans::accrue_interest(Token(DOT), false), + Error::::InvalidExchangeRate + ); // Mock a BIG exchange_rate: 100000000000.02 ExchangeRate::::insert(Token(DOT), Rate::saturating_from_rational(100000000000020u128, 20 * 50)); @@ -297,7 +302,7 @@ fn small_loans_have_interest_rounded_up() { assert_ok!(batch_call.clone().dispatch(RuntimeOrigin::signed(BOB))); _run_to_block(initial_block + 10000); - Loans::accrue_interest(Token(IBTC)).unwrap(); + Loans::accrue_interest(Token(IBTC), false).unwrap(); let borrow_index = Loans::borrow_index(Token(IBTC)); let current_borrow_balance = Loans::current_borrow_balance(&BOB, Token(IBTC)).unwrap(); let total_borrowed_amount = borrow_amount_small + borrow_amount_big; @@ -323,7 +328,7 @@ fn big_loan_following_a_small_loan_still_accrues_interest() { assert_ok!(Loans::borrow(RuntimeOrigin::signed(BOB), Token(IBTC), 1)); _run_to_block(initial_block + 1); - Loans::accrue_interest(Token(IBTC)).unwrap(); + Loans::accrue_interest(Token(IBTC), false).unwrap(); // Interest gets accrued immediately (rounded up), to prevent // giving out interest-free loans due to truncating the interest. assert_eq!(Loans::current_borrow_balance(&BOB, Token(IBTC)).unwrap().amount(), 2); diff --git a/crates/loans/src/tests/interest_rate.rs b/crates/loans/src/tests/interest_rate.rs index 0c1e2d3166..cd590f56a4 100644 --- a/crates/loans/src/tests/interest_rate.rs +++ b/crates/loans/src/tests/interest_rate.rs @@ -78,7 +78,7 @@ fn interest_rate_model_works() { for i in 1..49 { let delta_time = 6u128; TimestampPallet::set_timestamp(6000 * (i + 1)); - assert_ok!(Loans::accrue_interest(Token(DOT))); + assert_ok!(Loans::accrue_interest(Token(DOT), false)); // utilizationRatio = totalBorrows / (totalCash + totalBorrows - totalReserves) let util_ratio = Ratio::from_rational(total_borrows, total_cash + total_borrows - total_reserves); assert_eq!(Loans::utilization_ratio(Token(DOT)), util_ratio); diff --git a/standalone/runtime/tests/test_fee_pool.rs b/standalone/runtime/tests/test_fee_pool.rs index 0aa9e1fe33..ac4179b624 100644 --- a/standalone/runtime/tests/test_fee_pool.rs +++ b/standalone/runtime/tests/test_fee_pool.rs @@ -1046,7 +1046,7 @@ fn accrued_lend_token_interest_increases_reward_share() { Timestamp::set_timestamp(*slot_to_set * AuraPallet::slot_duration()); // Manually trigger interest accrual - assert_ok!(LoansPallet::accrue_interest(Token(DOT),)); + assert_ok!(LoansPallet::accrue_interest(Token(DOT), false)); let final_lend_token_stake: u128 = CapacityRewardsPallet::get_stake(&(), &vault_id.collateral_currency()).unwrap(); assert!( From f245ec2c1c9103cf843cfcdd55596059df70b028 Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Wed, 17 May 2023 18:42:34 +0200 Subject: [PATCH 06/10] docs(loans): add doc comment to `accrue_interest` --- crates/loans/src/interest.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/loans/src/interest.rs b/crates/loans/src/interest.rs index b179cac531..ad071cde61 100644 --- a/crates/loans/src/interest.rs +++ b/crates/loans/src/interest.rs @@ -22,6 +22,11 @@ use crate::*; impl Pallet { /// Accrue interest and update corresponding storage + /// - `asset_id`: Underlying currency to accrue interest for + /// - `reaccrue_next_block`: Re-accrue interest next block via a substrate hook, so that + /// redundant storage about interest rates is updated. This helps the UI reflect changes to the interest + /// rates caused by market interactions which happened this block. All extrinsics calling this function + /// must pass a `true` value for this argument, while the substrate hook must pass `false`. #[cfg_attr(any(test, feature = "integration-tests"), visibility::make(pub))] pub(crate) fn accrue_interest(asset_id: CurrencyId, reaccrue_next_block: bool) -> DispatchResult { // Ensure redundant storage always has up-to-date interest From 567ee55fe117ba3b3375a9a336a08e34c820c534 Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Tue, 23 May 2023 14:19:09 +0200 Subject: [PATCH 07/10] fix: rerun loans benchmark for `interlay` runtime --- .../runtime/interlay/src/weights/loans.rs | 250 ++++++++++-------- 1 file changed, 145 insertions(+), 105 deletions(-) diff --git a/parachain/runtime/interlay/src/weights/loans.rs b/parachain/runtime/interlay/src/weights/loans.rs index c721a8c508..f9d0cf73eb 100644 --- a/parachain/runtime/interlay/src/weights/loans.rs +++ b/parachain/runtime/interlay/src/weights/loans.rs @@ -2,29 +2,29 @@ //! Autogenerated weights for loans //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-04, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-05-23, STEPS: `100`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `enterprise`, CPU: `Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz` +//! HOSTNAME: `interlay-hetzner-01`, CPU: `AMD EPYC 7502P 32-Core Processor` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("interlay-dev"), DB CACHE: 1024 // Executed Command: -// ./target/release/interbtc-parachain +// target/release/interbtc-parachain // benchmark // pallet -// --pallet -// loans -// --extrinsic -// * // --chain // interlay-dev // --execution=wasm // --wasm-execution=compiled +// --pallet +// loans +// --extrinsic +// * // --steps -// 2 +// 100 // --repeat -// 1 +// 10 // --output -// parachain/runtime/interlay/src/weights/ +// parachain/runtime/interlay/src/weights/loans.rs // --template // .deploy/runtime-weight-template.hbs @@ -40,6 +40,24 @@ pub struct WeightInfo(PhantomData); impl loans::WeightInfo for WeightInfo { + /// Storage: Loans Markets (r:2 w:0) + /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:1 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) + /// Storage: Timestamp Now (r:1 w:0) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: Loans LastAccruedInterestTime (r:1 w:1) + /// Proof: Loans LastAccruedInterestTime (max_values: None, max_size: Some(35), added: 2510, mode: MaxEncodedLen) + /// The range of component `u` is `[1, 2]`. + fn on_initialize (_u: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `489` + // Estimated: `14746` + // Minimum execution time: 36_714_000 picoseconds. + Weight::from_parts(38_240_706, 14746) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } /// Storage: Loans Markets (r:2 w:1) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) /// Storage: Loans UnderlyingAssetId (r:1 w:1) @@ -52,10 +70,10 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) fn add_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1215` - // Estimated: `8294` - // Minimum execution time: 64_718_000 picoseconds. - Weight::from_parts(64_718_000, 8294) + // Measured: `78` + // Estimated: `11264` + // Minimum execution time: 55_251_000 picoseconds. + Weight::from_parts(56_032_000, 11264) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -63,10 +81,10 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn activate_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1512` - // Estimated: `2635` - // Minimum execution time: 46_802_000 picoseconds. - Weight::from_parts(46_802_000, 2635) + // Measured: `343` + // Estimated: `3625` + // Minimum execution time: 28_157_000 picoseconds. + Weight::from_parts(28_617_000, 3625) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -74,10 +92,10 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn update_rate_model () -> Weight { // Proof Size summary in bytes: - // Measured: `1512` - // Estimated: `2635` - // Minimum execution time: 49_885_000 picoseconds. - Weight::from_parts(49_885_000, 2635) + // Measured: `343` + // Estimated: `3625` + // Minimum execution time: 29_579_000 picoseconds. + Weight::from_parts(30_230_000, 3625) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -85,10 +103,10 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn update_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1512` - // Estimated: `2635` - // Minimum execution time: 46_076_000 picoseconds. - Weight::from_parts(46_076_000, 2635) + // Measured: `343` + // Estimated: `3625` + // Minimum execution time: 33_297_000 picoseconds. + Weight::from_parts(33_517_000, 3625) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -98,10 +116,10 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) fn force_update_market () -> Weight { // Proof Size summary in bytes: - // Measured: `1523` - // Estimated: `5148` - // Minimum execution time: 52_475_000 picoseconds. - Weight::from_parts(52_475_000, 5148) + // Measured: `354` + // Estimated: `7128` + // Minimum execution time: 40_431_000 picoseconds. + Weight::from_parts(40_841_000, 7128) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -111,10 +129,10 @@ impl loans::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn add_reward () -> Weight { // Proof Size summary in bytes: - // Measured: `1737` - // Estimated: `7783` - // Minimum execution time: 81_987_000 picoseconds. - Weight::from_parts(81_987_000, 7783) + // Measured: `490` + // Estimated: `9763` + // Minimum execution time: 80_751_000 picoseconds. + Weight::from_parts(81_233_000, 9763) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -130,10 +148,10 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardBorrowState (max_values: None, max_size: Some(47), added: 2522, mode: MaxEncodedLen) fn update_market_reward_speed () -> Weight { // Proof Size summary in bytes: - // Measured: `1526` - // Estimated: `15350` - // Minimum execution time: 70_988_000 picoseconds. - Weight::from_parts(70_988_000, 15350) + // Measured: `357` + // Estimated: `20300` + // Minimum execution time: 64_108_000 picoseconds. + Weight::from_parts(64_368_000, 20300) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -167,10 +185,10 @@ impl loans::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn claim_reward () -> Weight { // Proof Size summary in bytes: - // Measured: `3190` - // Estimated: `43522` - // Minimum execution time: 170_808_000 picoseconds. - Weight::from_parts(170_808_000, 43522) + // Measured: `1842` + // Estimated: `57382` + // Minimum execution time: 203_227_000 picoseconds. + Weight::from_parts(205_050_000, 57382) .saturating_add(T::DbWeight::get().reads(17_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -204,10 +222,10 @@ impl loans::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn claim_reward_for_market () -> Weight { // Proof Size summary in bytes: - // Measured: `3190` - // Estimated: `40887` - // Minimum execution time: 156_390_000 picoseconds. - Weight::from_parts(156_390_000, 40887) + // Measured: `1842` + // Estimated: `54747` + // Minimum execution time: 192_476_000 picoseconds. + Weight::from_parts(196_083_000, 54747) .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -241,14 +259,16 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans MinExchangeRate (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) /// Storage: Loans AccountDeposits (r:1 w:0) /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn mint () -> Weight { // Proof Size summary in bytes: - // Measured: `2578` - // Estimated: `41937` - // Minimum execution time: 222_425_000 picoseconds. - Weight::from_parts(222_425_000, 41937) + // Measured: `1188` + // Estimated: `56787` + // Minimum execution time: 285_662_000 picoseconds. + Weight::from_parts(289_309_000, 56787) .saturating_add(T::DbWeight::get().reads(18_u64)) - .saturating_add(T::DbWeight::get().writes(9_u64)) + .saturating_add(T::DbWeight::get().writes(10_u64)) } /// Storage: Loans Markets (r:2 w:0) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) @@ -290,14 +310,16 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) /// Storage: Loans BorrowIndex (r:1 w:0) /// Proof: Loans BorrowIndex (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `3270` - // Estimated: `47973` - // Minimum execution time: 222_834_000 picoseconds. - Weight::from_parts(222_834_000, 47973) + // Measured: `1984` + // Estimated: `67773` + // Minimum execution time: 286_834_000 picoseconds. + Weight::from_parts(294_440_000, 67773) .saturating_add(T::DbWeight::get().reads(22_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) + .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: Loans Markets (r:2 w:0) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) @@ -331,14 +353,16 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn redeem () -> Weight { // Proof Size summary in bytes: - // Measured: `3074` - // Estimated: `42448` - // Minimum execution time: 254_883_000 picoseconds. - Weight::from_parts(254_883_000, 42448) + // Measured: `1757` + // Estimated: `58288` + // Minimum execution time: 349_910_000 picoseconds. + Weight::from_parts(352_326_000, 58288) .saturating_add(T::DbWeight::get().reads(19_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) + .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: Loans Markets (r:2 w:0) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) @@ -372,14 +396,16 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn redeem_all () -> Weight { // Proof Size summary in bytes: - // Measured: `3074` - // Estimated: `42448` - // Minimum execution time: 253_754_000 picoseconds. - Weight::from_parts(253_754_000, 42448) + // Measured: `1757` + // Estimated: `58288` + // Minimum execution time: 349_500_000 picoseconds. + Weight::from_parts(356_715_000, 58288) .saturating_add(T::DbWeight::get().reads(19_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) + .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: Loans Markets (r:2 w:0) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) @@ -403,14 +429,16 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn repay_borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `3042` - // Estimated: `31226` - // Minimum execution time: 145_768_000 picoseconds. - Weight::from_parts(145_768_000, 31226) + // Measured: `1653` + // Estimated: `42116` + // Minimum execution time: 175_181_000 picoseconds. + Weight::from_parts(176_504_000, 42116) .saturating_add(T::DbWeight::get().reads(13_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) + .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: Loans Markets (r:2 w:0) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) @@ -434,14 +462,16 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: Loans TotalBorrows (r:1 w:1) /// Proof: Loans TotalBorrows (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn repay_borrow_all () -> Weight { // Proof Size summary in bytes: - // Measured: `3042` - // Estimated: `31226` - // Minimum execution time: 159_901_000 picoseconds. - Weight::from_parts(159_901_000, 31226) + // Measured: `1653` + // Estimated: `42116` + // Minimum execution time: 198_437_000 picoseconds. + Weight::from_parts(200_492_000, 42116) .saturating_add(T::DbWeight::get().reads(13_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) + .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: Loans Markets (r:2 w:0) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) @@ -453,10 +483,10 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans AccountDeposits (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn deposit_all_collateral () -> Weight { // Proof Size summary in bytes: - // Measured: `2133` - // Estimated: `12939` - // Minimum execution time: 89_073_000 picoseconds. - Weight::from_parts(89_073_000, 12939) + // Measured: `1000` + // Estimated: `16899` + // Minimum execution time: 95_681_000 picoseconds. + Weight::from_parts(97_556_000, 16899) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -490,14 +520,16 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Oracle Aggregate (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// Storage: Loans AccountBorrows (r:1 w:0) /// Proof: Loans AccountBorrows (max_values: None, max_size: Some(107), added: 2582, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn withdraw_all_collateral () -> Weight { // Proof Size summary in bytes: - // Measured: `3200` - // Estimated: `35310` - // Minimum execution time: 201_533_000 picoseconds. - Weight::from_parts(201_533_000, 35310) + // Measured: `1913` + // Estimated: `50160` + // Minimum execution time: 246_765_000 picoseconds. + Weight::from_parts(249_560_000, 50160) .saturating_add(T::DbWeight::get().reads(17_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) @@ -545,14 +577,16 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardSupplySpeed (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) /// Storage: Loans RewardSupplierIndex (r:3 w:3) /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:2) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn liquidate_borrow () -> Weight { // Proof Size summary in bytes: - // Measured: `4893` - // Estimated: `107002` - // Minimum execution time: 653_649_000 picoseconds. - Weight::from_parts(653_649_000, 107002) + // Measured: `3386` + // Estimated: `129772` + // Minimum execution time: 838_859_000 picoseconds. + Weight::from_parts(847_917_000, 129772) .saturating_add(T::DbWeight::get().reads(45_u64)) - .saturating_add(T::DbWeight::get().writes(21_u64)) + .saturating_add(T::DbWeight::get().writes(23_u64)) } /// Storage: Loans Markets (r:2 w:0) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) @@ -586,14 +620,16 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Loans RewardSupplierIndex (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) /// Storage: Loans RewardAccrued (r:1 w:1) /// Proof: Loans RewardAccrued (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn reduce_incentive_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `4066` - // Estimated: `47641` - // Minimum execution time: 359_799_000 picoseconds. - Weight::from_parts(359_799_000, 47641) + // Measured: `2687` + // Estimated: `63481` + // Minimum execution time: 447_496_000 picoseconds. + Weight::from_parts(454_060_000, 63481) .saturating_add(T::DbWeight::get().reads(21_u64)) - .saturating_add(T::DbWeight::get().writes(10_u64)) + .saturating_add(T::DbWeight::get().writes(11_u64)) } /// Storage: Loans Markets (r:2 w:0) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) @@ -607,14 +643,16 @@ impl loans::WeightInfo for WeightInfo { /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Loans TotalReserves (r:1 w:1) /// Proof: Loans TotalReserves (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn add_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `2402` - // Estimated: `18584` - // Minimum execution time: 125_902_000 picoseconds. - Weight::from_parts(125_902_000, 18584) + // Measured: `1012` + // Estimated: `24524` + // Minimum execution time: 126_002_000 picoseconds. + Weight::from_parts(126_783_000, 24524) .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().writes(5_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: Loans Markets (r:2 w:0) /// Proof: Loans Markets (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) @@ -628,13 +666,15 @@ impl loans::WeightInfo for WeightInfo { /// Proof: Tokens Accounts (max_values: None, max_size: Some(115), added: 2590, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Loans MarketToReaccrue (r:0 w:1) + /// Proof: Loans MarketToReaccrue (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen) fn reduce_reserves () -> Weight { // Proof Size summary in bytes: - // Measured: `2563` - // Estimated: `18584` - // Minimum execution time: 113_321_000 picoseconds. - Weight::from_parts(113_321_000, 18584) + // Measured: `1276` + // Estimated: `24524` + // Minimum execution time: 110_181_000 picoseconds. + Weight::from_parts(112_265_000, 24524) .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) } } \ No newline at end of file From e9c7a9301533546a3da05c506b66f5e86e15c3b7 Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Fri, 26 May 2023 13:04:35 +0200 Subject: [PATCH 08/10] feat(loans): accrue interest on each block --- crates/loans/src/interest.rs | 11 +----- crates/loans/src/lib.rs | 46 ++++++++++------------- crates/loans/src/mock.rs | 2 +- crates/loans/src/tests.rs | 32 ++++++---------- crates/loans/src/tests/edge_cases.rs | 9 ++--- crates/loans/src/tests/interest_rate.rs | 2 +- standalone/runtime/tests/test_fee_pool.rs | 2 +- 7 files changed, 38 insertions(+), 66 deletions(-) diff --git a/crates/loans/src/interest.rs b/crates/loans/src/interest.rs index ad071cde61..b5760e2e57 100644 --- a/crates/loans/src/interest.rs +++ b/crates/loans/src/interest.rs @@ -23,17 +23,8 @@ use crate::*; impl Pallet { /// Accrue interest and update corresponding storage /// - `asset_id`: Underlying currency to accrue interest for - /// - `reaccrue_next_block`: Re-accrue interest next block via a substrate hook, so that - /// redundant storage about interest rates is updated. This helps the UI reflect changes to the interest - /// rates caused by market interactions which happened this block. All extrinsics calling this function - /// must pass a `true` value for this argument, while the substrate hook must pass `false`. #[cfg_attr(any(test, feature = "integration-tests"), visibility::make(pub))] - pub(crate) fn accrue_interest(asset_id: CurrencyId, reaccrue_next_block: bool) -> DispatchResult { - // Ensure redundant storage always has up-to-date interest - // rates which the UI can display. - // This operations mutates storage even if accruing fails. - MarketToReaccrue::::insert(asset_id, reaccrue_next_block); - + pub(crate) fn accrue_interest(asset_id: CurrencyId) -> DispatchResult { let now = T::UnixTime::now().as_secs(); let last_accrued_interest_time = Self::last_accrued_interest_time(asset_id); if last_accrued_interest_time.is_zero() { diff --git a/crates/loans/src/lib.rs b/crates/loans/src/lib.rs index 95dcc2d7b6..d88738ff6b 100644 --- a/crates/loans/src/lib.rs +++ b/crates/loans/src/lib.rs @@ -514,12 +514,6 @@ pub mod pallet { #[pallet::storage] pub type Markets = StorageMap<_, Blake2_128Concat, CurrencyId, Market>>; - /// Mapping of underlying currency id of a market to the flag indicating - /// whether the marked should have interest accrued in the `on_initialize` hook - #[pallet::storage] - #[pallet::getter(fn market_to_reaccrue)] - pub type MarketToReaccrue = StorageMap<_, Blake2_128Concat, CurrencyId, bool, ValueQuery>; - /// Mapping of lend_token id to underlying currency id /// `lend_token id`: voucher token id /// `asset id`: underlying token id @@ -1073,7 +1067,7 @@ pub mod pallet { pub fn repay_borrow_all(origin: OriginFor, asset_id: CurrencyId) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id, true)?; + Self::accrue_interest(asset_id)?; let account_borrows = Self::current_borrow_balance(&who, asset_id)?; ensure!(!account_borrows.is_zero(), Error::::InvalidAmount); Self::do_repay_borrow(&who, &account_borrows)?; @@ -1151,8 +1145,8 @@ pub mod pallet { collateral_asset_id: CurrencyId, ) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; - Self::accrue_interest(liquidation_asset_id, true)?; - Self::accrue_interest(collateral_asset_id, true)?; + Self::accrue_interest(liquidation_asset_id)?; + Self::accrue_interest(collateral_asset_id)?; ensure!(!repay_amount.is_zero(), Error::::InvalidAmount); let liquidation = Amount::new(repay_amount, liquidation_asset_id); Self::do_liquidate_borrow(who, borrower, &liquidation, collateral_asset_id)?; @@ -1182,7 +1176,7 @@ pub mod pallet { T::ReserveOrigin::ensure_origin(origin)?; let payer = T::Lookup::lookup(payer)?; Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id, true)?; + Self::accrue_interest(asset_id)?; ensure!(!amount_to_transfer.is_zero(), Error::::InvalidAmount); amount_to_transfer.transfer(&payer, &Self::account_id())?; @@ -1219,7 +1213,7 @@ pub mod pallet { T::ReserveOrigin::ensure_origin(origin)?; let receiver = T::Lookup::lookup(receiver)?; Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id, true)?; + Self::accrue_interest(asset_id)?; let amount_to_transfer = Amount::new(reduce_amount, asset_id); @@ -1261,7 +1255,7 @@ pub mod pallet { let receiver = T::Lookup::lookup(receiver)?; let from = Self::incentive_reward_account_id(); Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id, true)?; + Self::accrue_interest(asset_id)?; let underlying = Amount::new(redeem_amount, asset_id); @@ -1284,15 +1278,13 @@ impl Pallet { let mut iterations = 0; for (asset_id, _) in Self::active_markets() { iterations += 1; - if Self::market_to_reaccrue(asset_id) { - if let Err(e) = Self::accrue_interest(asset_id, false) { - log::trace!( - target: "loans::accrue_interest", - "error: {:?}, failed to accrue interest for: {:?}", - e, - asset_id, - ); - } + if let Err(e) = Self::accrue_interest(asset_id) { + log::trace!( + target: "loans::accrue_interest", + "error: {:?}, failed to accrue interest for: {:?}", + e, + asset_id, + ); } } iterations @@ -1901,7 +1893,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< Self::ensure_active_market(asset_id)?; Self::ensure_under_supply_cap(&amount)?; - Self::accrue_interest(asset_id, true)?; + Self::accrue_interest(asset_id)?; // update supply index before modify supply balance. Self::update_reward_supply_index(asset_id)?; @@ -1926,7 +1918,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< let asset_id = borrow.currency(); Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id, true)?; + Self::accrue_interest(asset_id)?; Self::borrow_allowed(borrower, &borrow)?; // update borrow index after accrue interest. @@ -2025,7 +2017,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< fn do_repay_borrow(borrower: &AccountIdOf, borrow: &Amount) -> Result<(), DispatchError> { let asset_id = borrow.currency(); Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id, true)?; + Self::accrue_interest(asset_id)?; let account_borrows = Self::current_borrow_balance(borrower, asset_id)?; Self::do_repay_borrow_with_amount(borrower, asset_id, &account_borrows, &borrow)?; Self::deposit_event(Event::::RepaidBorrow { @@ -2048,7 +2040,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< } Self::ensure_active_market(asset_id)?; - Self::accrue_interest(asset_id, true)?; + Self::accrue_interest(asset_id)?; Self::redeem_allowed(supplier, &voucher)?; @@ -2080,7 +2072,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< // outdated exchange rate. Call `accrue_interest` to avoid this. let underlying_id = Self::underlying_id(lend_tokens.currency())?; Self::ensure_active_market(underlying_id)?; - Self::accrue_interest(underlying_id, true)?; + Self::accrue_interest(underlying_id)?; let exchange_rate = Self::exchange_rate_stored(underlying_id)?; Ok(lend_tokens.checked_mul(&exchange_rate)?.set_currency(underlying_id)) } @@ -2098,7 +2090,7 @@ impl LoansTrait, AccountIdOf, Amount> for Pallet< // possibly not having accrued for a few blocks. This would result in using an // outdated exchange rate. Call `accrue_interest` to avoid this. Self::ensure_active_market(underlying.currency())?; - Self::accrue_interest(underlying.currency(), true)?; + Self::accrue_interest(underlying.currency())?; let exchange_rate = Self::exchange_rate_stored(underlying.currency())?; let lend_token_id = Self::lend_token_id(underlying.currency())?; diff --git a/crates/loans/src/mock.rs b/crates/loans/src/mock.rs index ea16a9bf26..24bba40fae 100644 --- a/crates/loans/src/mock.rs +++ b/crates/loans/src/mock.rs @@ -404,7 +404,7 @@ pub fn almost_equal(target: u128, value: u128) -> bool { pub fn accrue_interest_per_block(asset_id: CurrencyId, block_delta_secs: u64, run_to_block: u64) { for i in 1..run_to_block { TimestampPallet::set_timestamp(6000 + (block_delta_secs * 1000 * i)); - Loans::accrue_interest(asset_id, false).unwrap(); + Loans::accrue_interest(asset_id).unwrap(); } } diff --git a/crates/loans/src/tests.rs b/crates/loans/src/tests.rs index 18a60d0a43..fc37ff3522 100644 --- a/crates/loans/src/tests.rs +++ b/crates/loans/src/tests.rs @@ -738,7 +738,7 @@ fn total_reserves_are_updated_on_withdrawal() { let blocks_to_run = 1000; _run_to_block(blocks_to_run); - Loans::accrue_interest(DOT, false).unwrap(); + Loans::accrue_interest(DOT).unwrap(); let intermediary_total_reserves = Loans::total_reserves(DOT); _run_to_block(2 * blocks_to_run); @@ -764,7 +764,7 @@ fn total_reserves_are_updated_on_deposit() { let blocks_to_run = 1000; _run_to_block(blocks_to_run); - Loans::accrue_interest(DOT, false).unwrap(); + Loans::accrue_interest(DOT).unwrap(); let intermediary_total_reserves = Loans::total_reserves(DOT); _run_to_block(2 * blocks_to_run); @@ -898,7 +898,7 @@ fn update_exchange_rate_works() { // Initialize value of exchange rate is 0.02 assert_eq!(Loans::exchange_rate(DOT), Rate::saturating_from_rational(2, 100)); - assert_ok!(Loans::accrue_interest(DOT, false)); + assert_ok!(Loans::accrue_interest(DOT)); assert_eq!( Loans::exchange_rate_stored(DOT).unwrap(), Rate::saturating_from_rational(2, 100) @@ -1601,10 +1601,9 @@ fn interest_rate_hook_works() { // Run to block 1 and accrue interest so further accruals set interest rate storage _run_to_block(1); - Loans::accrue_interest(DOT, false).unwrap(); - // Accruing interest on the first block does not enable the flag - assert_eq!(Loans::market_to_reaccrue(DOT), false); + Loans::accrue_interest(DOT).unwrap(); + // The hook on block 2 auto-accrues interest _run_to_block(2); // Mint and borrow so both interest rates will be non-zero // This enables the re-accrual flag for next block @@ -1617,11 +1616,9 @@ fn interest_rate_hook_works() { &mut current_supply_rate, &mut current_borrow_rate, ); - assert_eq!(Loans::market_to_reaccrue(DOT), true); - // The hook on block 3 auto-accrues interest so storage items are updated + // The hook on block 3 auto-accrues interest _run_to_block(3); - assert_eq!(Loans::market_to_reaccrue(DOT), false); read_interest_rates( &mut previous_supply_rate, &mut previous_borrow_rate, @@ -1634,7 +1631,7 @@ fn interest_rate_hook_works() { assert!(current_supply_rate.gt(&previous_supply_rate)); assert!(current_borrow_rate.gt(&previous_borrow_rate)); - // The hook on block 4 does not auto-accrue interest + // The hook on block 4 auto-accrues interest _run_to_block(4); read_interest_rates( @@ -1643,15 +1640,12 @@ fn interest_rate_hook_works() { &mut current_supply_rate, &mut current_borrow_rate, ); - assert_eq!(current_supply_rate, previous_supply_rate); - assert_eq!(current_borrow_rate, previous_borrow_rate); - // This enables the re-accrual flag for next block + assert!(current_supply_rate.gt(&previous_supply_rate)); + assert!(current_borrow_rate.gt(&previous_borrow_rate)); assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); - assert_eq!(Loans::market_to_reaccrue(DOT), true); - // The hook on block 5 accrues interest + // The hook on block 5 auto-accrues interest _run_to_block(5); - assert_eq!(Loans::market_to_reaccrue(DOT), false); read_interest_rates( &mut previous_supply_rate, &mut previous_borrow_rate, @@ -1666,9 +1660,7 @@ fn interest_rate_hook_works() { &mut current_supply_rate, &mut current_borrow_rate, ); - assert_eq!(current_supply_rate, previous_supply_rate); - assert_eq!(current_borrow_rate, previous_borrow_rate); - // But it should still enable the flag - assert_eq!(Loans::market_to_reaccrue(DOT), true); + assert!(current_supply_rate.gt(&previous_supply_rate)); + assert!(current_borrow_rate.gt(&previous_borrow_rate)); }); } diff --git a/crates/loans/src/tests/edge_cases.rs b/crates/loans/src/tests/edge_cases.rs index 226a8ad183..c5a8a3e4f1 100644 --- a/crates/loans/src/tests/edge_cases.rs +++ b/crates/loans/src/tests/edge_cases.rs @@ -147,10 +147,7 @@ fn prevent_the_exchange_rate_attack() { // Eve can not let the exchange rate greater than 1 // Use `assert_err` instead of `assert_noop` because the `MarketToReaccrue` // storage item may be mutated even if interest accrual fails. - assert_err!( - Loans::accrue_interest(Token(DOT), false), - Error::::InvalidExchangeRate - ); + assert_err!(Loans::accrue_interest(Token(DOT)), Error::::InvalidExchangeRate); // Mock a BIG exchange_rate: 100000000000.02 ExchangeRate::::insert(Token(DOT), Rate::saturating_from_rational(100000000000020u128, 20 * 50)); @@ -302,7 +299,7 @@ fn small_loans_have_interest_rounded_up() { assert_ok!(batch_call.clone().dispatch(RuntimeOrigin::signed(BOB))); _run_to_block(initial_block + 10000); - Loans::accrue_interest(Token(IBTC), false).unwrap(); + Loans::accrue_interest(Token(IBTC)).unwrap(); let borrow_index = Loans::borrow_index(Token(IBTC)); let current_borrow_balance = Loans::current_borrow_balance(&BOB, Token(IBTC)).unwrap(); let total_borrowed_amount = borrow_amount_small + borrow_amount_big; @@ -328,7 +325,7 @@ fn big_loan_following_a_small_loan_still_accrues_interest() { assert_ok!(Loans::borrow(RuntimeOrigin::signed(BOB), Token(IBTC), 1)); _run_to_block(initial_block + 1); - Loans::accrue_interest(Token(IBTC), false).unwrap(); + Loans::accrue_interest(Token(IBTC)).unwrap(); // Interest gets accrued immediately (rounded up), to prevent // giving out interest-free loans due to truncating the interest. assert_eq!(Loans::current_borrow_balance(&BOB, Token(IBTC)).unwrap().amount(), 2); diff --git a/crates/loans/src/tests/interest_rate.rs b/crates/loans/src/tests/interest_rate.rs index cd590f56a4..0c1e2d3166 100644 --- a/crates/loans/src/tests/interest_rate.rs +++ b/crates/loans/src/tests/interest_rate.rs @@ -78,7 +78,7 @@ fn interest_rate_model_works() { for i in 1..49 { let delta_time = 6u128; TimestampPallet::set_timestamp(6000 * (i + 1)); - assert_ok!(Loans::accrue_interest(Token(DOT), false)); + assert_ok!(Loans::accrue_interest(Token(DOT))); // utilizationRatio = totalBorrows / (totalCash + totalBorrows - totalReserves) let util_ratio = Ratio::from_rational(total_borrows, total_cash + total_borrows - total_reserves); assert_eq!(Loans::utilization_ratio(Token(DOT)), util_ratio); diff --git a/standalone/runtime/tests/test_fee_pool.rs b/standalone/runtime/tests/test_fee_pool.rs index ac4179b624..bbc98b8e7f 100644 --- a/standalone/runtime/tests/test_fee_pool.rs +++ b/standalone/runtime/tests/test_fee_pool.rs @@ -1046,7 +1046,7 @@ fn accrued_lend_token_interest_increases_reward_share() { Timestamp::set_timestamp(*slot_to_set * AuraPallet::slot_duration()); // Manually trigger interest accrual - assert_ok!(LoansPallet::accrue_interest(Token(DOT), false)); + assert_ok!(LoansPallet::accrue_interest(Token(DOT))); let final_lend_token_stake: u128 = CapacityRewardsPallet::get_stake(&(), &vault_id.collateral_currency()).unwrap(); assert!( From 9642a89cecb8ef39ca6731249ea44f9661893aa9 Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Fri, 26 May 2023 20:57:16 +0200 Subject: [PATCH 09/10] fix(loans): failing tests and add comment explaining edge case --- crates/loans/src/tests.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/crates/loans/src/tests.rs b/crates/loans/src/tests.rs index fc37ff3522..49b324e588 100644 --- a/crates/loans/src/tests.rs +++ b/crates/loans/src/tests.rs @@ -1640,8 +1640,13 @@ fn interest_rate_hook_works() { &mut current_supply_rate, &mut current_borrow_rate, ); - assert!(current_supply_rate.gt(&previous_supply_rate)); - assert!(current_borrow_rate.gt(&previous_borrow_rate)); + // NOTE: There were no market interactions in the previous block, so + // lending and borrowing rates should remain the same. + // However, `Ratio::from_rational(10000000057077, 100000000048516)` in `calc_utilization_ratio` + // returns 0.09999 instead of 0.1, which causes interest rates to also drop slightly. + // This may be confusing but is just due a rounding error, so the two assertions below are commented out. + // assert_eq!(current_supply_rate, previous_supply_rate); + // assert_eq!(current_borrow_rate, previous_borrow_rate); assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); // The hook on block 5 auto-accrues interest @@ -1660,7 +1665,7 @@ fn interest_rate_hook_works() { &mut current_supply_rate, &mut current_borrow_rate, ); - assert!(current_supply_rate.gt(&previous_supply_rate)); - assert!(current_borrow_rate.gt(&previous_borrow_rate)); + assert_eq!(current_supply_rate, previous_supply_rate); + assert_eq!(current_borrow_rate, previous_borrow_rate); }); } From b8e89cfe7e75b13dbe9a544a5c46b28bee4c7fb9 Mon Sep 17 00:00:00 2001 From: Sander Bosma Date: Mon, 29 May 2023 11:29:36 +0200 Subject: [PATCH 10/10] fix: calc_utilization_ratio rounding/ --- crates/loans/src/interest.rs | 17 ++++++++++++++++- crates/loans/src/tests.rs | 9 ++------- crates/loans/src/tests/interest_rate.rs | 9 +++++++++ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/crates/loans/src/interest.rs b/crates/loans/src/interest.rs index b5760e2e57..6ce3e364f5 100644 --- a/crates/loans/src/interest.rs +++ b/crates/loans/src/interest.rs @@ -16,6 +16,8 @@ // limitations under the License. use primitives::{Timestamp, SECONDS_PER_YEAR}; +use sp_arithmetic::PerThing; +use sp_core::U256; use sp_runtime::{traits::Zero, DispatchResult}; use crate::*; @@ -148,7 +150,20 @@ impl Pallet { } let total = cash.checked_add(&borrows)?.checked_sub(&reserves)?; - Ok(Ratio::from_rational(borrows.amount(), total.amount())) + // The code below essentially returns Ratio::from_rational(borrows, total). + // The reason why we don't use the aforementioned method is that is has some weird + // rounding behavior that can cause an unexpected decrease in the utilization ratio. + // For example, Ratio::from_rational(10000000057077, 100000000048516) returns 0.09999 + // rather than 0.1 + let borrows: U256 = borrows.amount().into(); // convert to u256 so we can safely multiply by ACCURACY + let raw_ratio = borrows + .saturating_mul(Ratio::ACCURACY.into()) + .checked_div(total.amount().into()) + .ok_or(ArithmeticError::DivisionByZero)? + .try_into() + .map_err(|_| currency::Error::::TryIntoIntError)?; + + Ok(Ratio::from_parts(raw_ratio)) } /// The exchange rate should be greater than the `MinExchangeRate` storage value and less than diff --git a/crates/loans/src/tests.rs b/crates/loans/src/tests.rs index 49b324e588..3c91a07a74 100644 --- a/crates/loans/src/tests.rs +++ b/crates/loans/src/tests.rs @@ -1640,13 +1640,8 @@ fn interest_rate_hook_works() { &mut current_supply_rate, &mut current_borrow_rate, ); - // NOTE: There were no market interactions in the previous block, so - // lending and borrowing rates should remain the same. - // However, `Ratio::from_rational(10000000057077, 100000000048516)` in `calc_utilization_ratio` - // returns 0.09999 instead of 0.1, which causes interest rates to also drop slightly. - // This may be confusing but is just due a rounding error, so the two assertions below are commented out. - // assert_eq!(current_supply_rate, previous_supply_rate); - // assert_eq!(current_borrow_rate, previous_borrow_rate); + assert_eq!(current_supply_rate, previous_supply_rate); + assert_eq!(current_borrow_rate, previous_borrow_rate); assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); // The hook on block 5 auto-accrues interest diff --git a/crates/loans/src/tests/interest_rate.rs b/crates/loans/src/tests/interest_rate.rs index 0c1e2d3166..532aa6c81a 100644 --- a/crates/loans/src/tests/interest_rate.rs +++ b/crates/loans/src/tests/interest_rate.rs @@ -31,6 +31,15 @@ fn utilization_rate_works() { Loans::calc_utilization_ratio(&ksm(0), &ksm(1), &ksm(0)).unwrap(), Ratio::from_percent(100) ); + + // Ratio::from_rational(10000000057077, 100000000048516) returns 0.09999 + // check that calc_utilization_ratio correctly returns 0.1 + let cash = 100000000048516u128 - 10000000057077u128; + let borrows = 10000000057077u128; + assert_eq!( + Loans::calc_utilization_ratio(&ksm(cash), &ksm(borrows), &ksm(0)).unwrap(), + Ratio::from_percent(10) + ); } #[test]